Skip to content

Assign each retransmission request a unique id#3383

Merged
lukasz-zimnoch merged 2 commits intomainfrom
retransmission-fix
Oct 26, 2022
Merged

Assign each retransmission request a unique id#3383
lukasz-zimnoch merged 2 commits intomainfrom
retransmission-fix

Conversation

@pdyraga
Copy link
Copy Markdown
Member

@pdyraga pdyraga commented Oct 26, 2022

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).

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.
@pdyraga pdyraga added this to the v2.0.0-m2 milestone Oct 26, 2022
@pdyraga pdyraga self-assigned this Oct 26, 2022
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 lukasz-zimnoch merged commit d52340e into main Oct 26, 2022
@lukasz-zimnoch lukasz-zimnoch deleted the retransmission-fix branch October 26, 2022 12:18
@pdyraga pdyraga removed their assignment Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants