Fix language with sync committee selection proofs
This commit is contained in:
parent
acfbd9375e
commit
9aaf548c37
|
@ -92,7 +92,7 @@ The following validations MUST pass before forwarding the `signed_contribution_a
|
|||
- _[REJECT]_ `contribution_and_proof.selection_proof` selects the validator as an aggregator for the slot -- i.e. `is_sync_committee_aggregator(state, contribution.slot, contribution_and_proof.selection_proof)` returns `True`.
|
||||
- _[REJECT]_ The aggregator's validator index is within the current sync committee --
|
||||
i.e. `state.validators[contribution_and_proof.aggregator_index].pubkey in state.current_sync_committee.pubkeys`.
|
||||
- _[REJECT]_ The `contribution_and_proof.selection_proof` is a valid signature of the `contribution.slot` by the validator with index `contribution_and_proof.aggregator_index`.
|
||||
- _[REJECT]_ The `contribution_and_proof.selection_proof` is a valid signature of the `SyncCommitteeSigningData` derived from the `contribution` by the validator with index `contribution_and_proof.aggregator_index`.
|
||||
- _[REJECT]_ The aggregator signature, `signed_contribution_and_proof.signature`, is valid.
|
||||
- _[REJECT]_ The aggregate signature is valid for the message `beacon_block_root` and aggregate pubkey derived from the participation info in `aggregation_bits` for the subcommittee specified by the `subcommittee_index`.
|
||||
|
||||
|
|
|
@ -310,12 +310,12 @@ Each slot some sync committee members in each subcommittee are selected to aggre
|
|||
|
||||
##### Aggregation selection
|
||||
|
||||
A validator is selected to aggregate based on the computation in `is_sync_committee_aggregator` where `state` is a `BeaconState` as supplied to `get_sync_committee_slot_signature` and `signature` is the BLS signature returned by `get_sync_committee_slot_signature`.
|
||||
A validator is selected to aggregate based on the computation in `is_sync_committee_aggregator` where `state` is a `BeaconState` as supplied to `get_sync_committee_selection_proof` and `signature` is the BLS signature returned by `get_sync_committee_selection_proof`.
|
||||
The signature function takes a `BeaconState` with the relevant sync committees for the queried `slot` (i.e. `state.slot` is within the span covered by the current or next sync committee period), the `subcommittee_index` equal to the `subnet_id`, and the `privkey` is the BLS private key associated with the validator.
|
||||
|
||||
```python
|
||||
def get_sync_committee_slot_signature(state: BeaconState, slot: Slot,
|
||||
subcommittee_index: uint64, privkey: int) -> BLSSignature:
|
||||
def get_sync_committee_selection_proof(state: BeaconState, slot: Slot,
|
||||
subcommittee_index: uint64, privkey: int) -> BLSSignature:
|
||||
domain = get_domain(state, DOMAIN_SYNC_COMMITTEE_SELECTION_PROOF, compute_epoch_at_slot(slot))
|
||||
signing_data = SyncCommitteeSigningData(
|
||||
slot=slot,
|
||||
|
@ -378,7 +378,7 @@ def get_contribution_and_proof(state: BeaconState,
|
|||
aggregator_index: ValidatorIndex,
|
||||
contribution: SyncCommitteeContribution,
|
||||
privkey: int) -> ContributionAndProof:
|
||||
selection_proof = get_sync_committee_slot_signature(
|
||||
selection_proof = get_sync_committee_selection_proof(
|
||||
state,
|
||||
contribution.slot,
|
||||
contribution.subcommittee_index,
|
||||
|
|
Loading…
Reference in New Issue