-
Notifications
You must be signed in to change notification settings - Fork 933
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
EIP-7549: replace committee_bits with committee_indices #3688
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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.
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 wonder if we should enforce these committee indices to be sorted
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.
tbh, I don’t know, do we have any reason for enforcing them to be sorted?
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.
Nothing other than it being cheap to do and nice to display, but whoever displays it can also sort it out of band. I'm indifferent, but thought it's worth considering so I don't miss anything.
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.
Yeah, it worth considering! but beyond potential UX improvement I don’t see any reason to enforce that. So by default i’d leave it as is unless there are other reasons for doing that
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 feel like enforcing sorting makes things more clear and preserve equality: with non-sorted we may have
Attestation1.hash_root
!=Attestation2.hash_root
but they could have exact same coverage. (correct me if i'm wrong)Having a unique way of expressing the same thing maybe isn't super important but seems a nice property to have.
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.
as per offline discussion, worth noting that, as we introduce potential duplications in index list, then the the assumption
same attestation -> same hash_root
will be broken anywayThere 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.
duplications would imply that signature is different already (since each entry represents a term being added to the aggregate sig), which was the motivation for this PR..
I'd be interested to see how much of an improvement this possibility actually provides, ie how often is it that when we're packing attestations, we would benefit from overlapping aggregates - this would imply that aggregators observed different attestations which should be rare.
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.
basically, if I casually look at the aggregates coming in from aggregators, apart from poor quality due to timing most likely, it's rare that there are multiple overlapping aggregates of equal quality.
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.
If we take a look at on chain data (i picked a few random blocks — not that representative tho), they have duplicates. Probably, those duplicates are added by the proposer from what it has observed in the attestation subnet itself as the duplicates are usually scarce.
The issue that we have discussed with @tbenr is that the same attestation can have different representations. Consider we have
n
aggregates from the same committee in one on chain aggregate, if we enforce the order of committee indices in the array then by changing the order of the aggregation bits we can get up ton!
different on chain aggregates with distincthash_tree_root()
each that are actually carrying the same information.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.
Sure, as long as they're permutations - I misunderstood it as entries with different number of duplicates being discussed.
I'm bringing it up because one alternative encoding is to list the validators that were not included - usually, there's only a few of those and this way we would probably have a significantly smaller list, but that again brings us back to the only-one-item territory - it's been discussed as an optimisation strategy as well, ie keep an aggregated committee key and subtract - probably makes more sense for sync committee messages but still.