-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
[Consensus 2.0] fix mysticeti committee member ordering #16679
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,10 +110,10 @@ impl ConsensusManagerTrait for MysticetiManager { | |
|
||
let name: AuthorityName = self.keypair.public().into(); | ||
|
||
let sui_committee = system_state.get_sui_committee(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you explain why you got the committee from the system state here instead of epoch store? What is the difference? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There shouldn't be a difference (in theory & in practice) - nothing wrong reading from epoch store - but since we are getting the mysticeti committee via the system state then I've considered more straightforward to do the same for the SUI committee as well so we don't read relevant information from two different sources. |
||
let authority_index: AuthorityIndex = committee | ||
.to_authority_index( | ||
epoch_store | ||
.committee() | ||
sui_committee | ||
.authority_index(&name) | ||
.expect("Should have valid index for own authority") as usize, | ||
) | ||
|
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.
The order should be provided by the caller or SUI in this case right? That would make sure we are aligned if something changes in the future on the Sui side?
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.
Good suggestion.
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.
Agreed, I was very in between this approach and the one that I went with , but it seems it makes more sense. I'll refactor. Thanks @arun-koshy