From 9aaf548c37c007e7c8c1d9547aefa5c84162573b Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Fri, 2 Apr 2021 18:28:12 -0700 Subject: [PATCH] Fix language with sync committee selection proofs --- specs/altair/p2p-interface.md | 2 +- specs/altair/validator.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/specs/altair/p2p-interface.md b/specs/altair/p2p-interface.md index 6d400c0a2..ee6ab8292 100644 --- a/specs/altair/p2p-interface.md +++ b/specs/altair/p2p-interface.md @@ -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`. diff --git a/specs/altair/validator.md b/specs/altair/validator.md index c7b41dd8b..ae4c64d03 100644 --- a/specs/altair/validator.md +++ b/specs/altair/validator.md @@ -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,