This repository has been archived by the owner on Feb 27, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
Flatten memberships into a single type #3867
Merged
Merged
Conversation
This file contains 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
0d9e849
to
859aa47
Compare
859aa47
to
c67fb3a
Compare
dbd49cf
to
d4815f9
Compare
tbro
commented
Nov 19, 2024
d4815f9
to
572e6a2
Compare
Delete Memberships and replace functionality. Add some methods to `Membership` trait to deal w/ collapsing into one type both kinds of memberships (stake and DA). * avoid passing membership into `is_valid_cert * for DA, avoid proxying threshold through `Threshold` trait * remove `Topic` param from `Membership::new * Split cert impls by marker (#3891) * add membership methods to Cert trait * remove non-existent tests from justfile
0e1c8e9
to
3483bfd
Compare
tbro
commented
Nov 20, 2024
We can keep the old name where we only have one membership type to keep the diff smaller.
ss-es
reviewed
Nov 22, 2024
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.
left some comments, but couldn't find the issue. I'll check a few more things
rob-maron
reviewed
Nov 22, 2024
Always use quorum for leader selection
ss-es
approved these changes
Nov 24, 2024
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.
approving, but I think we should follow-up on some of the changes here (left some comments on Zulip)
ss-es
suggested changes
Nov 24, 2024
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.
oops, forgot one thing -- I think da_membership
is the wrong name here
ss-es
approved these changes
Nov 25, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Needed for #3726
This PR:
Removes
Memberships
struct and updatesMembership
trait to support DA and Quorum w/ a single interface. Essentially, instead of havingqourom_membership
andcommittee_membership
(DA) fields in most places we now have a singlemembership
field. In some places, where only one of the membership types was previously used, the previous name is preserved. To obtain the correct data, we now have to call the correct method:membership.leader()
for quorummembership.da_leader()
for da.This PR does not:
Shouldn't change behavior. It is only preparation for EspressoSystems/espresso-sequencer#2237
Key places to review:
The trait is used extensively and there are changes across many files.
crates/types/src/traits/election.rs
SimpleCert
impls incrates/types/src/simple_certificate.rs