-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: add a bias to IsExpired to avoid potential timing issues where nodeA thinks it's been 300 seconds but nodeB only thinks it's been 295 for some reason
#5276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ogabrielides
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
UdjinM6
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm... I think you need to add bias to IsExpired calls in UpdatedBlockTip and StartQuorumDataRecoveryThread too then. OR maybe keep it 0 on the requesting side (revert changes in RequestQuorumData) and relax conditions (add negative bias) on the receiving side (in ProcessMessage).
Might also need to fix tests.
src/llmq/quorums.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| bool IsExpired(int bias=0) const { return (GetTime() - nTime) >= (EXPIRATION_TIMEOUT + bias); } | |
| bool IsExpired(int bias = 0) const { return (GetTime() - nTime) >= (EXPIRATION_TIMEOUT + bias); } |
… nodeA thinks it's been 300 seconds but nodeB only thinks it's been 295 for some reason
9bcb3d7 to
c4b9979
Compare
|
See latest |
ogabrielides
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Merging so we can move forward with an RC. Please post merge review @UdjinM6 |
#5281 should help |
…quorum_data.py` (#5281) ## Issue being fixed or feature implemented fix `p2p_quorum_data.py` test broken by #5276 ## What was done? adjust data request expiration timeout in tests ## How Has This Been Tested? `./test/functional/test_runner.py p2p_quorum_data.py` ## Breaking Changes n/a ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [x] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation **For repository code-owners and collaborators only** - [x] I have assigned this pull request to a milestone
…quorum_data.py` (dashpay#5281) ## Issue being fixed or feature implemented fix `p2p_quorum_data.py` test broken by dashpay#5276 ## What was done? adjust data request expiration timeout in tests ## How Has This Been Tested? `./test/functional/test_runner.py p2p_quorum_data.py` ## Breaking Changes n/a ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [x] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation **For repository code-owners and collaborators only** - [x] I have assigned this pull request to a milestone
… nodeA thinks it's been 300 seconds but nodeB only thinks it's been 295 for some reason (dashpay#5276) ## Issue being fixed or feature implemented add a bias to IsExpired to avoid potential timing issues where nodeA thinks it's been 300 seconds but nodeB only thinks it's been 295 for some reason ## What was done? ## How Has This Been Tested? ## Breaking Changes ## Checklist: - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation **For repository code-owners and collaborators only** - [x] I have assigned this pull request to a milestone
Issue being fixed or feature implemented
What was done?
How Has This Been Tested?
Breaking Changes
Checklist:
For repository code-owners and collaborators only