From 99ccfe0163b3ea961b90e9f28f4c039d08f52d93 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Tue, 7 May 2024 16:29:49 -0500 Subject: [PATCH 1/5] Add electra version of AggregateAndProof --- specs/electra/beacon-chain.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/specs/electra/beacon-chain.md b/specs/electra/beacon-chain.md index 62da891146..674c4e02e6 100644 --- a/specs/electra/beacon-chain.md +++ b/specs/electra/beacon-chain.md @@ -291,6 +291,23 @@ class Attestation(Container): signature: BLSSignature ``` +#### `AggregateAndProof` + +```python +class AggregateAndProof(Container): + aggregator_index: ValidatorIndex + aggregate: Attestation # [New in Electra:EIP7549] + selection_proof: BLSSignature +``` + +#### `SignedAggregateAndProof` + +```python +class SignedAggregateAndProof(Container): + message: AggregateAndProof # [New in Electra:EIP7549] + signature: BLSSignature +``` + #### `IndexedAttestation` ```python From 0da03ab5acc2522b1d695935843d68e0d379385e Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Tue, 7 May 2024 16:33:06 -0500 Subject: [PATCH 2/5] Update TOC --- specs/electra/beacon-chain.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/specs/electra/beacon-chain.md b/specs/electra/beacon-chain.md index 674c4e02e6..44d6042a60 100644 --- a/specs/electra/beacon-chain.md +++ b/specs/electra/beacon-chain.md @@ -35,6 +35,8 @@ - [`AttesterSlashing`](#attesterslashing) - [Extended Containers](#extended-containers) - [`Attestation`](#attestation) + - [`AggregateAndProof`](#aggregateandproof) + - [`SignedAggregateAndProof`](#signedaggregateandproof) - [`IndexedAttestation`](#indexedattestation) - [`BeaconBlockBody`](#beaconblockbody) - [`ExecutionPayload`](#executionpayload) From 8aed03767a15cfa27073d24cb44f2ae822acdc05 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Tue, 7 May 2024 16:37:23 -0500 Subject: [PATCH 3/5] Change "new" to "modified" --- specs/electra/beacon-chain.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/electra/beacon-chain.md b/specs/electra/beacon-chain.md index 44d6042a60..e119ab3180 100644 --- a/specs/electra/beacon-chain.md +++ b/specs/electra/beacon-chain.md @@ -298,7 +298,7 @@ class Attestation(Container): ```python class AggregateAndProof(Container): aggregator_index: ValidatorIndex - aggregate: Attestation # [New in Electra:EIP7549] + aggregate: Attestation # [Modified in Electra:EIP7549] selection_proof: BLSSignature ``` @@ -306,7 +306,7 @@ class AggregateAndProof(Container): ```python class SignedAggregateAndProof(Container): - message: AggregateAndProof # [New in Electra:EIP7549] + message: AggregateAndProof # [Modified in Electra:EIP7549] signature: BLSSignature ``` From f3d0a0e89b916e57ab349a6e84e02959c1337a44 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Tue, 7 May 2024 19:13:24 -0500 Subject: [PATCH 4/5] Move containers to validator.md --- specs/electra/beacon-chain.md | 39 +++++++++-------------------------- specs/electra/validator.md | 25 ++++++++++++++++++++++ 2 files changed, 35 insertions(+), 29 deletions(-) diff --git a/specs/electra/beacon-chain.md b/specs/electra/beacon-chain.md index e119ab3180..188a25d3d3 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,42 +279,25 @@ class AttesterSlashing(Container): attestation_2: IndexedAttestation # [Modified in Electra:EIP7549] ``` -### Extended Containers - -#### `Attestation` +#### `IndexedAttestation` ```python -class Attestation(Container): - aggregation_bits: Bitlist[MAX_VALIDATORS_PER_COMMITTEE * MAX_COMMITTEES_PER_SLOT] # [Modified in Electra:EIP7549] +class IndexedAttestation(Container): + # [Modified in Electra:EIP7549] + attesting_indices: List[ValidatorIndex, MAX_VALIDATORS_PER_COMMITTEE * MAX_COMMITTEES_PER_SLOT] data: AttestationData - committee_bits: Bitvector[MAX_COMMITTEES_PER_SLOT] # [New in Electra:EIP7549] 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 -``` +### Extended Containers -#### `IndexedAttestation` +#### `Attestation` ```python -class IndexedAttestation(Container): - # [Modified in Electra:EIP7549] - attesting_indices: List[ValidatorIndex, MAX_VALIDATORS_PER_COMMITTEE * MAX_COMMITTEES_PER_SLOT] +class Attestation(Container): + aggregation_bits: Bitlist[MAX_VALIDATORS_PER_COMMITTEE * MAX_COMMITTEES_PER_SLOT] # [Modified in Electra:EIP7549] data: AttestationData + committee_bits: Bitvector[MAX_COMMITTEES_PER_SLOT] # [New in Electra:EIP7549] signature: BLSSignature ``` diff --git a/specs/electra/validator.md b/specs/electra/validator.md index 6b838c1260..712156db22 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` From 93c043a647f3ac9ebb22f13a8fa191db836c0ea0 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Tue, 7 May 2024 19:14:48 -0500 Subject: [PATCH 5/5] Revert moving IndexedAttestation I'll do this in a separate PR. --- specs/electra/beacon-chain.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/specs/electra/beacon-chain.md b/specs/electra/beacon-chain.md index 188a25d3d3..62da891146 100644 --- a/specs/electra/beacon-chain.md +++ b/specs/electra/beacon-chain.md @@ -33,9 +33,9 @@ - [`PendingConsolidation`](#pendingconsolidation) - [Modified Containers](#modified-containers) - [`AttesterSlashing`](#attesterslashing) - - [`IndexedAttestation`](#indexedattestation) - [Extended Containers](#extended-containers) - [`Attestation`](#attestation) + - [`IndexedAttestation`](#indexedattestation) - [`BeaconBlockBody`](#beaconblockbody) - [`ExecutionPayload`](#executionpayload) - [`ExecutionPayloadHeader`](#executionpayloadheader) @@ -279,16 +279,6 @@ 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` @@ -301,6 +291,16 @@ class Attestation(Container): 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