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
Merged
PastaPastaPasta merged 1 commit intodashpay:developfrom Mar 30, 2023
Conversation
UdjinM6
requested changes
Mar 29, 2023
UdjinM6
left a comment
There was a problem hiding this comment.
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.
Suggested change
| 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
Member
Author
|
See latest |
Member
Author
|
Merging so we can move forward with an RC. Please post merge review @UdjinM6 |
5 tasks
#5281 should help |
PastaPastaPasta
pushed a commit
that referenced
this pull request
Mar 30, 2023
…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
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Mar 30, 2023
…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
PastaPastaPasta
added a commit
to PastaPastaPasta/dash
that referenced
this pull request
Mar 30, 2023
… 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue being fixed or feature implemented
What was done?
How Has This Been Tested?
Breaking Changes
Checklist:
For repository code-owners and collaborators only