Electra -- Honest Validator¶
Table of contents¶
- Introduction
- Prerequisites
- Containers
- Modified Containers
- Block proposal
- Constructing the
BeaconBlockBody
- Attesting
- Construct attestation
- Attestation aggregation
- Construct aggregate
Introduction¶
This document represents the changes to be made in the code of an "honest validator" to implement Electra.
Prerequisites¶
This document is an extension of the Deneb -- Honest Validator guide. All behaviors and definitions defined in this document, and documents it extends, carry over unless explicitly noted or overridden.
All terminology, constants, functions, and protocol mechanics defined in the updated Beacon Chain doc of Electra 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
¶
SignedAggregateAndProof
¶
Block proposal¶
Constructing the BeaconBlockBody
¶
Attester slashings¶
Changed the max attester slashings size to MAX_ATTESTER_SLASHINGS_ELECTRA
.
Attestations¶
Changed the max attestations size to MAX_ATTESTATIONS_ELECTRA
.
The network attestation aggregates contain only the assigned committee attestations.
Attestation aggregates received by the block proposer from the committee aggregators with disjoint committee_bits
sets and equal AttestationData
SHOULD be consolidated into a single Attestation
object.
The proposer should run the following function to construct an on chain final aggregate form a list of network aggregates with equal AttestationData
:
Deposits¶
[New in Electra:EIP6110] The expected number of deposits MUST be changed from min(MAX_DEPOSITS, eth1_data.deposit_count - state.eth1_deposit_index)
to the result of the following function:
Execution payload¶
prepare_execution_payload
is updated from the Deneb specs.
Note: In this section, state
is the state of the slot for the block proposal without the block yet applied.
That is, state
is the previous_state
processed through any empty slots up to the assigned slot using process_slots(previous_state, slot)
.
Note: The only change to prepare_execution_payload
is the new definition of get_expected_withdrawals
.
Attesting¶
Construct attestation¶
- Set
attestation_data.index = 0
. - Let
attestation.aggregation_bits
be aBitlist[MAX_VALIDATORS_PER_COMMITTEE * MAX_COMMITTEES_PER_SLOT]
of lengthlen(committee)
, where the bit of the index of the validator in thecommittee
is set to0b1
. - Let
attestation.committee_bits
be aBitvector[MAX_COMMITTEES_PER_SLOT]
, where the bit at the index associated with the validator's committee is set to0b1
.
Note: Calling get_attesting_indices(state, attestation)
should return a list of length equal to 1, containing validator_index
.
Attestation aggregation¶
Construct aggregate¶
- Set
attestation_data.index = 0
. - Let
aggregation_bits
be aBitlist[MAX_VALIDATORS_PER_COMMITTEE * MAX_COMMITTEES_PER_SLOT]
of lengthlen(committee)
, where each bit set from each individual attestation is set to0b1
. - Set
attestation.committee_bits = committee_bits
, wherecommittee_bits
has the same value as in each individual attestation.