diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index 865c4c175..ecbcdebb1 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -1526,13 +1526,17 @@ For each `attestation` in `block.body.attestations`: * Verify that `attestation.data.justified_slot` is equal to `state.justified_slot if attestation.data.slot >= state.slot - (state.slot % EPOCH_LENGTH) else state.previous_justified_slot`. * Verify that `attestation.data.justified_block_root` is equal to `get_block_root(state, attestation.data.justified_slot)`. * Verify that either `attestation.data.latest_crosslink_root` or `attestation.data.shard_block_root` equals `state.latest_crosslinks[shard].shard_block_root`. -* `attestation.aggregate_signature` verification: +* Verify bitfields: ```python assert verify_bitfield(attestation.aggregation_bitfield) assert verify_bitfield(attestation.custody_bitfield) assert attestation.custody_bitfield & attestation.aggregation_bitfield == attestation.custody_bitfield +``` +* Verify aggregate signature: + +```python participants = get_attestation_participants(state, attestation.data, attestation.aggregation_bitfield) custody_bit_0_participants = get_attestation_participants(state, attestation.data, attestation.custody_bitfield) custody_bit_1_participants = [i in participants for i not in custody_bit_0_participants]