Electra -- Honest Validator¶
- Introduction
- Prerequisites
- Helpers
- Modified
GetPayloadResponse - Containers
- Modified containers
- Protocols
ExecutionEngine- Block proposal
- Constructing the
BeaconBlockBody - Constructing the
BlobSidecars - 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 specifications of Electra are requisite for this document and used throughout. Please see related beacon-chain specifications before continuing and use them as a reference throughout.
Helpers¶
Modified GetPayloadResponse¶
Containers¶
Modified containers¶
AggregateAndProof¶
SignedAggregateAndProof¶
Protocols¶
ExecutionEngine¶
Modified get_payload¶
Given the payload_id, get_payload returns the most recent version of the
execution payload that has been built since the corresponding call to
notify_forkchoice_updated method.
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 from 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:
Note: Clients will be able to remove the Eth1Data polling mechanism in an
uncoordinated fashion once the transition period is finished. The transition
period is considered finished when a network reaches the point where
state.eth1_deposit_index == state.deposit_requests_start_index.
Execution requests¶
[New in Electra]
- The execution payload is obtained from the execution engine as defined above
using
payload_id. The response also includes aexecution_requestsentry containing a list of bytes. Each element on the list corresponds to one SSZ list of requests as defined in EIP-7685. The first byte of each request is used to determine the request type. Requests must be ordered by request type in ascending order. As a result, there can only be at most one instance of each request type. - Set
block.body.execution_requests = get_execution_requests(execution_requests), where:
Constructing the BlobSidecars¶
Sidecar¶
[Modified in Electra:EIP7691]
Attesting¶
Construct attestation¶
The validator creates attestation as a SingleAttestation container with
updated field assignments:
- Set
attestation_data.index = 0. - Set
attestation.committee_indexto the index associated with the validator's committee. - Set
attestation.attester_indexto the index of the validator.
Attestation aggregation¶
Construct aggregate¶
- Set
attestation_data.index = 0. - Let
aggregation_bitsbe 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_bitshas the bit set corresponding tocommittee_indexin each individual attestation.