-
Notifications
You must be signed in to change notification settings - Fork 40
Committee aggregation #282
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
base: main
Are you sure you want to change the base?
Changes from 28 commits
b5b6d8a
4867d7d
7bcedca
980b5e8
60468af
213504a
4fac983
f2651d8
cc7548c
cb1a21b
e398823
90fc114
cdae6a4
b24d3ed
5c952ff
8a0c121
cb952f8
9d721bd
baddbeb
6556e81
3477d6e
9174f5b
3115ef5
3fffe71
d0462aa
e2fd644
d40199c
d46dd08
2439177
61b8100
d66dfd3
360bfb0
379ddd6
fe8317c
6af933b
2b68c0c
22bd960
7cf9773
6e85356
da21184
6ad7b19
ac9b2e3
73429c6
5fd7e0b
113e136
0616107
5cabfbd
e39b042
0ec04f1
4bd283c
7d1e0f2
3a06ccd
1943eda
9f3e05b
ed02f93
583201d
8f6c63c
9a2a75f
d48d9c3
db34a77
8271f78
6c94cd6
4ddaccd
72a6f78
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 |
|---|---|---|
|
|
@@ -2,8 +2,9 @@ | |
|
|
||
| ## Overview | ||
|
|
||
| Validators participate in consensus by proposing blocks and producing attestations. This | ||
| document describes what honest validators do. | ||
| Validators participate in consensus by proposing blocks and producing attestations. | ||
| Optionally validators can opt-in to behave as aggregators in their committee . | ||
| This document describes what honest validators do. | ||
|
|
||
| ## Validator Assignment | ||
|
|
||
|
|
@@ -16,6 +17,32 @@ diversity helps test interoperability. | |
| In production, validator assignment will work differently. The current approach | ||
| is temporary for devnet testing. | ||
|
|
||
| ## Attestation Committees and Subnets | ||
|
|
||
| Attestation committee is a group of validators contributing to the common | ||
| aggregated attestations. Subnets are network channels dedicated to specific committees. | ||
|
|
||
| In the devnet-3 design, however, there is one global subnet for signed | ||
| attestations propagation, in addition to publishing into per committee subnets. | ||
| This is due to 3SF-mini consensus design, that requires 2/3+ of all | ||
|
||
| attestations to be observed by any validator to compute safe target correctly. | ||
|
|
||
| Note that non-aggregating validators do not need to subscribe to committee | ||
| attestation subnets. They only need to subscribe to the global attestation | ||
| subnet. | ||
|
|
||
| Every validator is assigned to a single committee. Number of committees is | ||
| defined in config.yaml. Each committee maps to a subnet ID. Validator's | ||
| subnet ID is derived using their validator index modulo number of committees. | ||
| This is to simplify debugging and testing. In the future, validator's subnet ID | ||
| will be assigned randomly per epoch. | ||
|
|
||
| ## Aggregator assignment | ||
|
|
||
| Some validators are self-assigned as aggregators. Aggregators collect and combine | ||
| attestations from other validators in their committee. To become an aggregator, | ||
| a validator sets `is_aggregator` flag to true as ENR record field. | ||
|
|
||
| ## Proposing Blocks | ||
|
|
||
| Each slot has exactly one designated proposer. The proposer is determined by | ||
|
|
@@ -52,7 +79,7 @@ receive and validate it. | |
|
|
||
| ## Attesting | ||
|
|
||
| Every validator attestations in every slot. Attesting happens in the second interval, | ||
| Every validator attests in every slot. Attesting happens in the second interval, | ||
| after proposals are made. | ||
|
|
||
| ### What to Attest For | ||
|
|
@@ -78,8 +105,8 @@ compute the head. | |
|
|
||
| ### Broadcasting Attestations | ||
|
|
||
| Validators sign their attestations and broadcast them. The network uses a single topic | ||
| for all attestations. No subnets or committees in the current design. | ||
| Validators sign their attestations and broadcast them into the global | ||
| attestation topic and its corresponding subnet topic. | ||
|
|
||
| ## Timing | ||
|
|
||
|
|
@@ -98,11 +125,7 @@ blocks and attestations. | |
| Attestation aggregation combines multiple attestations into one. This saves bandwidth and | ||
| block space. | ||
|
|
||
| Devnet 0 has no aggregation. Each attestation is separate. Future devnets will add | ||
| aggregation. | ||
|
|
||
| When aggregation is added, aggregators will collect attestations and combine them. | ||
| Aggregated attestations will be broadcast separately. | ||
| Devnet-3 introduces signatures aggregation. Aggregators will collect attestations and combine them. Aggregated attestations will be broadcast separately. | ||
|
|
||
| ## Signature Handling | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,7 @@ | |
| from lean_spec.subspecs.ssz import hash_tree_root | ||
| from lean_spec.types import Bytes32, Container, Uint64 | ||
|
|
||
| from ...xmss.aggregation import AggregatedSignatureProof | ||
| from ...xmss.containers import Signature | ||
| from ..checkpoint import Checkpoint | ||
| from .aggregation_bits import AggregationBits | ||
|
|
@@ -107,3 +108,10 @@ def aggregate_by_data( | |
| ) | ||
| for data, validator_ids in data_to_validator_ids.items() | ||
| ] | ||
|
|
||
| class SignedAggregatedAttestation(Container): | ||
|
Contributor
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. @anshalshukla / @GrapeBaBa do we already have this type?
Contributor
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. also better to use message, signature terminlogy
Contributor
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. I think we also need aggregated bit vector here as well,
Collaborator
Author
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.
AggregatedSignatureProof contains
Contributor
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.
no |
||
| data: AttestationData | ||
| """Combined attestation data similar to the beacon chain format.""" | ||
|
|
||
| proof: AggregatedSignatureProof | ||
| """Aggregated signature proof covering all participating validators.""" | ||
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.
original prefix is
/leanconsensus, this is an expected change/lean/consensus?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.
no.
Thanks for noticing. Fixed