-
Notifications
You must be signed in to change notification settings - Fork 28
feat(aggregation): score recursive aggregation through a per-aggregator subnet window #613
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
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
bd76661
feat(aggregation): add subnet reach and window primitives
MegaRedHand a7c75fb
refactor(aggregation): tighten the subnet window primitives
MegaRedHand c0ca3e2
feat(aggregation): score child selection through a subnet window
MegaRedHand c49f5e0
docs(aggregation): correct why child selection covers out-of-window ids
MegaRedHand 234a549
feat(aggregation): add the redundancy-skipping width rotation
MegaRedHand 9ed9ab4
refactor(aggregation): floor the rotation width and document its edges
MegaRedHand 0018e49
feat(aggregation): derive a per-candidate subnet window
MegaRedHand 02a738d
fix(aggregation): derive the duty subnet from the subscription set
MegaRedHand 68b8f4b
feat(blockchain): carry the aggregation duty subnet on the actor
MegaRedHand f1a9254
fix(aggregation): reduce the duty subnet before the width rotation
MegaRedHand 05ab79b
feat(cli): add --skip-redundant-aggregation and duty-subnet resolution
MegaRedHand 0641ddb
docs(cli): document the duty subnet and log how it resolved
MegaRedHand 57b3233
docs: document the aggregation window metrics
MegaRedHand 6041332
test(aggregation): pin the four-aggregator reduction tree
MegaRedHand e5825f0
docs: shorten the aggregation metric rows and correct the pinned reading
MegaRedHand 5653ae7
test(aggregation): make the duty-subnet reduction test discriminate
MegaRedHand 0f41273
fix(aggregation): fall back to the full window when a window declines…
MegaRedHand ee8ea8d
feat(cli): warn when the redundancy-skipping rotation cannot rotate
MegaRedHand b4ef8fa
docs(aggregation): describe the window's real cadence
MegaRedHand 1782908
docs: describe subnet-windowed aggregation in the architecture guide
MegaRedHand e58eb20
feat(aggregation): anchor the subnet window on the duty subnet's best…
MegaRedHand aab43b1
Merge branch 'main' into feat/subnet-windowed-aggregation
MegaRedHand 255d75f
Merge branch 'main' into feat/subnet-windowed-aggregation
MegaRedHand e98b4db
refactor(aggregation): cut duplicated scans and clones from the windo…
MegaRedHand 61e21ab
fix(cli): reject an --aggregate-subnet-ids value the committee has no…
MegaRedHand f33b308
fix(aggregation): count window fallbacks that recover a merge, not ev…
MegaRedHand 8ac6dfc
docs(aggregation): state the window's two unenforced preconditions
MegaRedHand 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 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
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
Oops, something went wrong.
Oops, something went wrong.
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.
The duty subnet is later reduced modulo
committee_countinwindow_for_candidate, but the subscription set built at line 263 keeps the raw--aggregate-subnet-idsvalues and the swarm subscribes to those raw topics.With
--attestation-committee-count 4 --aggregate-subnet-ids 5this node subscribes to topic 5, which no validator publishes on, and aggregates as duty subnet 1, which it does not listen to. The startup log prints 5, so the mismatch is invisible to the operator.Rather than reducing silently, reject any
--aggregate-subnet-idsvalue at or above the committee count here, next to the existingattestation_committee_count >= 1check. That fixes the pre-existing dead subscription too, and the modulo inwindow_for_candidatepluswindow_for_candidate_reduces_an_out_of_range_duty_subnetcan then go.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, the silent reduction was the wrong call. 61e21ab adds
validate_aggregate_subnet_ids, called fromrun_noderight after the committee count resolves (it cannot live in clap, since the count comes from the flag orvalidator-config.yaml). Every id is checked, not just the first: only the first becomes the duty subnet, but all of them become subscriptions. That closes the pre-existing dead subscription too.One deviation from your suggestion: I kept the modulo in
window_for_candidateand its test.AggregationWindowConfigandsnapshot_aggregation_inputsarepub, so the blockchain crate cannot lean on the binary's validation, andSubnetWindow::newreducesstartregardless. Dropping the reduction only inwindow_for_candidatewould leave the ownership test running on the raw value while the window ran on the reduced one, which is precisely the desync that test pins. So it is all-or-nothing, and three lines guarding a public API seemed the better side to land on. The comment there now says the binary is what actually enforces it.