fix: preserve order in message containers#533
Merged
mergify[bot] merged 3 commits intosigp:release-v0.3.0from Aug 27, 2025
Merged
fix: preserve order in message containers#533mergify[bot] merged 3 commits intosigp:release-v0.3.0from
mergify[bot] merged 3 commits intosigp:release-v0.3.0from
Conversation
Member
|
@Zacholme7 is this still a draft? |
Member
Author
|
Whoops, its good to go |
e76507c to
4b05e19
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR changes the internal storage structure of the MessageContainer to preserve message insertion order, which is critical for consistent signature generation. The change replaces a nested HashMap structure with a Vec-based approach while maintaining duplicate prevention through a separate tracking mechanism.
- Replaces nested HashMap with Vec storage to maintain insertion order
- Adds separate HashSet tracking to prevent duplicate messages from the same sender
- Updates iteration logic throughout the codebase to work with the new Vec-based storage
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
diegomrsantos
approved these changes
Aug 27, 2025
Member
|
@dknopik do you want to give it a final review? |
diegomrsantos
pushed a commit
to diegomrsantos/anchor
that referenced
this pull request
Sep 17, 2025
Messages must be stored in the order that they arrive in. This is important for the resulting signatures as even if we have the same messages, if they are not in the expected order this results in different encodings and signatures. go-ssv just does this through a [slice](https://github.com/ssvlabs/ssv-spec/blob/d4c734909677b5fd3304e1d9220963cc9d794f09/qbft/message_container.go#L9)
jking-aus
pushed a commit
to jking-aus/anchor
that referenced
this pull request
Oct 8, 2025
Messages must be stored in the order that they arrive in. This is important for the resulting signatures as even if we have the same messages, if they are not in the expected order this results in different encodings and signatures. go-ssv just does this through a [slice](https://github.com/ssvlabs/ssv-spec/blob/d4c734909677b5fd3304e1d9220963cc9d794f09/qbft/message_container.go#L9)
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 Addressed
Messages must be stored in the order that they arrive in. This is important for the resulting signatures as even if we have the same messages, if they are not in the expected order this results in different encodings and signatures.
go-ssv just does this through a slice