Skip to content

Commit 10caa33

Browse files
ensi321ppopth
andauthored
Apply suggestions from @ppoth
Co-authored-by: Pop Chunhapanya <[email protected]>
1 parent b09a6f8 commit 10caa33

File tree

1 file changed

+2
-28
lines changed

1 file changed

+2
-28
lines changed

specs/electra/validator.md

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Changed the max attestations size to `MAX_ATTESTATIONS_ELECTRA`.
111111

112112
The network attestation aggregates contain only the assigned committee attestations.
113113
Committee attestations received by the block proposer from the committee aggregators with different `committee_index` sets and equal `AttestationData` SHOULD be consolidated into a single `Attestation` object.
114-
The proposer should run the following function to construct an on chain final aggregate form a list of committee attestations with equal `AttestationData`:
114+
The proposer should run the following function to construct an on-chain final aggregate from a list of committee attestations with equal `AttestationData`:
115115

116116
```python
117117
def compute_on_chain_aggregate(committee_attestations: Sequence[CommitteeAttestation]) -> Attestation:
@@ -221,30 +221,4 @@ with updated field assignments:
221221

222222
- Set `attestation_data.index = 0`.
223223
- Let `aggregation_bits` be a `Bitlist[MAX_VALIDATORS_PER_COMMITTEE * MAX_COMMITTEES_PER_SLOT]` of length `len(committee)`, where each bit set from each individual attestation is set to `0b1`.
224-
- Set `attestation.committee_index = committee_index`, where `committee_index` is the `committee_index` in each individual attestation.
225-
226-
#### Aggregate signature
227-
228-
Set `aggregate_attestation.signature = aggregate_signature` where `aggregate_signature` is obtained from:
229-
230-
```python
231-
def get_aggregate_signature(attestations: Sequence[CommitteeAttestation]) -> BLSSignature:
232-
signatures = [attestation.signature for attestation in attestations]
233-
return bls.Aggregate(signatures)
234-
```
235-
236-
### Broadcast aggregate
237-
238-
`get_aggregate_and_proof` is modified to accept `CommitteeAttestation` for `aggregate`.
239-
240-
```python
241-
def get_aggregate_and_proof(state: BeaconState,
242-
aggregator_index: ValidatorIndex,
243-
committee_attestation: CommitteeAttestation,
244-
privkey: int) -> AggregateAndProof:
245-
return AggregateAndProof(
246-
aggregator_index=aggregator_index,
247-
aggregate=committee_attestation,
248-
selection_proof=get_slot_signature(state, aggregate.data.slot, privkey),
249-
)
250-
```
224+
- Set `attestation.committee_index` to the index associated with the validator's committee.

0 commit comments

Comments
 (0)