Assign each retransmission request a unique id#3383
Merged
lukasz-zimnoch merged 2 commits intomainfrom Oct 26, 2022
Merged
Conversation
Previously we were identifying retransmission handlers by context. This did work well when each state for each member had a separate context in the synchronous state machine. It did not work well though when the same context was shared for all states in the async state machine. Given that the retransmission ticker identified retransmission functions by context, new retransmission requests were overwriting previous ones using the same context. We fixed it temporarily by creating new instances of child contexts but that was not a final solution we wanted to go with. This commit fixes the problem in a proper way (TM). Each retransmission has a unique ID and no matter if the same or separate contexts are used, registering new retransmission requests does not overwrite existing ones.
We no longer mark members as inactive. With the new state.AsyncMachine used for signing we wait for all messages or for a global signing timeout. The functions were unused and the staticcheck was complaining about them.
lukasz-zimnoch
approved these changes
Oct 26, 2022
lukasz-zimnoch
approved these changes
Oct 26, 2022
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.
Refs #3366
See #3379 (comment)
See 16a91a1
Previously we were identifying retransmission handlers by context. This did work well when each state for each member had a separate context in the synchronous state machine. It did not work well though when the same context was shared for all states in the async state machine. Given that the retransmission ticker identified retransmission functions by context, new retransmission requests were overwriting previous ones using the same context. We fixed it temporarily by creating new instances of child contexts but that was not a final solution we wanted to go with. This commit fixes the problem in a proper way (TM). Each retransmission has a unique ID and no matter if the same or separate contexts are used, registering new retransmission requests does not overwrite existing ones.
Tested this PR by running a single signing that succeeded in ~3 minutes (with announcement phase included).