From f3d0a0e89b916e57ab349a6e84e02959c1337a44 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Tue, 7 May 2024 19:13:24 -0500 Subject: [PATCH] Move containers to validator.md --- specs/electra/beacon-chain.md | 41 ++++++++++------------------------- specs/electra/validator.md | 25 +++++++++++++++++++++ 2 files changed, 36 insertions(+), 30 deletions(-) diff --git a/specs/electra/beacon-chain.md b/specs/electra/beacon-chain.md index e119ab318..188a25d3d 100644 --- a/specs/electra/beacon-chain.md +++ b/specs/electra/beacon-chain.md @@ -33,11 +33,9 @@ - [`PendingConsolidation`](#pendingconsolidation) - [Modified Containers](#modified-containers) - [`AttesterSlashing`](#attesterslashing) + - [`IndexedAttestation`](#indexedattestation) - [Extended Containers](#extended-containers) - [`Attestation`](#attestation) - - [`AggregateAndProof`](#aggregateandproof) - - [`SignedAggregateAndProof`](#signedaggregateandproof) - - [`IndexedAttestation`](#indexedattestation) - [`BeaconBlockBody`](#beaconblockbody) - [`ExecutionPayload`](#executionpayload) - [`ExecutionPayloadHeader`](#executionpayloadheader) @@ -281,6 +279,16 @@ class AttesterSlashing(Container): attestation_2: IndexedAttestation # [Modified in Electra:EIP7549] ``` +#### `IndexedAttestation` + +```python +class IndexedAttestation(Container): + # [Modified in Electra:EIP7549] + attesting_indices: List[ValidatorIndex, MAX_VALIDATORS_PER_COMMITTEE * MAX_COMMITTEES_PER_SLOT] + data: AttestationData + signature: BLSSignature +``` + ### Extended Containers #### `Attestation` @@ -293,33 +301,6 @@ class Attestation(Container): signature: BLSSignature ``` -#### `AggregateAndProof` - -```python -class AggregateAndProof(Container): - aggregator_index: ValidatorIndex - aggregate: Attestation # [Modified in Electra:EIP7549] - selection_proof: BLSSignature -``` - -#### `SignedAggregateAndProof` - -```python -class SignedAggregateAndProof(Container): - message: AggregateAndProof # [Modified in Electra:EIP7549] - signature: BLSSignature -``` - -#### `IndexedAttestation` - -```python -class IndexedAttestation(Container): - # [Modified in Electra:EIP7549] - attesting_indices: List[ValidatorIndex, MAX_VALIDATORS_PER_COMMITTEE * MAX_COMMITTEES_PER_SLOT] - data: AttestationData - signature: BLSSignature -``` - #### `BeaconBlockBody` ```python diff --git a/specs/electra/validator.md b/specs/electra/validator.md index 6b838c126..712156db2 100644 --- a/specs/electra/validator.md +++ b/specs/electra/validator.md @@ -8,6 +8,10 @@ - [Introduction](#introduction) - [Prerequisites](#prerequisites) +- [Containers](#containers) + - [Modified Containers](#modified-containers) + - [`AggregateAndProof`](#aggregateandproof) + - [`SignedAggregateAndProof`](#signedaggregateandproof) - [Block proposal](#block-proposal) - [Constructing the `BeaconBlockBody`](#constructing-the-beaconblockbody) - [Attester slashings](#attester-slashings) @@ -34,6 +38,27 @@ All behaviors and definitions defined in this document, and documents it extends All terminology, constants, functions, and protocol mechanics defined in the updated Beacon Chain doc of [Electra](./beacon-chain.md) are requisite for this document and used throughout. Please see related Beacon Chain doc before continuing and use them as a reference throughout. +## Containers + +### Modified Containers + +#### `AggregateAndProof` + +```python +class AggregateAndProof(Container): + aggregator_index: ValidatorIndex + aggregate: Attestation # [Modified in Electra:EIP7549] + selection_proof: BLSSignature +``` + +#### `SignedAggregateAndProof` + +```python +class SignedAggregateAndProof(Container): + message: AggregateAndProof # [Modified in Electra:EIP7549] + signature: BLSSignature +``` + ## Block proposal ### Constructing the `BeaconBlockBody`