-
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
[reconfig] Tolerate redundant committee insert #6926
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
); | ||
if let Some(old_committee) = self.get_committee(&new_committee.epoch)? { | ||
// If somehow we already have this committee in the store, they must be the same. | ||
assert_eq!(&old_committee, new_committee); |
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.
Should we return from the function after this assert?
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.
It's an assert, which would panic?
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.
I mean do we still need the insert below if the existing committee in the db is same as what we are going to insert again.
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.
When this happens, we probably have a fork. So it probably doesn't matte which committee we keep for this epoch.
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.
I think @sadhansood is referring to a fact that if we did have a committee and it does match current value, we could have a separate branch for this case and just skip call to insert
(which will save some serialization/io).
We could be inserting the same committee several times from different sources, e.g. from state sync and from reconfiguration flow. This should be ok.