Introducing ExecutionPayloadEnvelope
This commit is contained in:
parent
f4e3908801
commit
355a9a3d33
|
@ -30,12 +30,14 @@
|
||||||
- [`WithdrawalRequest`](#withdrawalrequest)
|
- [`WithdrawalRequest`](#withdrawalrequest)
|
||||||
- [`ConsolidationRequest`](#consolidationrequest)
|
- [`ConsolidationRequest`](#consolidationrequest)
|
||||||
- [`PendingConsolidation`](#pendingconsolidation)
|
- [`PendingConsolidation`](#pendingconsolidation)
|
||||||
|
- [`ValidatorRequests`](#validatorrequests)
|
||||||
|
- [`ExecutionPayloadEnvelope`](#executionpayloadenvelope)
|
||||||
- [Modified Containers](#modified-containers)
|
- [Modified Containers](#modified-containers)
|
||||||
- [`AttesterSlashing`](#attesterslashing)
|
- [`AttesterSlashing`](#attesterslashing)
|
||||||
|
- [`BeaconBlockBody`](#beaconblockbody)
|
||||||
- [Extended Containers](#extended-containers)
|
- [Extended Containers](#extended-containers)
|
||||||
- [`Attestation`](#attestation)
|
- [`Attestation`](#attestation)
|
||||||
- [`IndexedAttestation`](#indexedattestation)
|
- [`IndexedAttestation`](#indexedattestation)
|
||||||
- [`BeaconBlockBody`](#beaconblockbody)
|
|
||||||
- [`ExecutionPayload`](#executionpayload)
|
- [`ExecutionPayload`](#executionpayload)
|
||||||
- [`ExecutionPayloadHeader`](#executionpayloadheader)
|
- [`ExecutionPayloadHeader`](#executionpayloadheader)
|
||||||
- [`BeaconState`](#beaconstate)
|
- [`BeaconState`](#beaconstate)
|
||||||
|
@ -258,6 +260,27 @@ class PendingConsolidation(Container):
|
||||||
target_index: ValidatorIndex
|
target_index: ValidatorIndex
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### `ValidatorRequests`
|
||||||
|
|
||||||
|
*Note*: The container is new in EIP????.
|
||||||
|
|
||||||
|
```python
|
||||||
|
class ValidatorRequests(Container):
|
||||||
|
deposit_requests: List[DepositRequest, MAX_DEPOSIT_REQUESTS_PER_PAYLOAD] # [New in Electra:EIP6110]
|
||||||
|
withdrawal_requests: List[WithdrawalRequest, MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD] # [New in Electra:EIP7002:EIP7251]
|
||||||
|
consolidation_requests: List[ConsolidationRequest, MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD] # [New in Electra:EIP7251]
|
||||||
|
```
|
||||||
|
|
||||||
|
#### `ExecutionPayloadEnvelope`
|
||||||
|
|
||||||
|
*Note*: The container is new in EIP????.
|
||||||
|
|
||||||
|
```python
|
||||||
|
class ExecutionPayloadEnvelope(Container):
|
||||||
|
execution_payload: ExecutionPayload # [Modified in Electra:EIP6110:EIP7002]
|
||||||
|
requests: ValidatorRequests
|
||||||
|
```
|
||||||
|
|
||||||
### Modified Containers
|
### Modified Containers
|
||||||
|
|
||||||
#### `AttesterSlashing`
|
#### `AttesterSlashing`
|
||||||
|
@ -268,6 +291,26 @@ class AttesterSlashing(Container):
|
||||||
attestation_2: IndexedAttestation # [Modified in Electra:EIP7549]
|
attestation_2: IndexedAttestation # [Modified in Electra:EIP7549]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### `BeaconBlockBody`
|
||||||
|
|
||||||
|
```python
|
||||||
|
class BeaconBlockBody(Container):
|
||||||
|
randao_reveal: BLSSignature
|
||||||
|
eth1_data: Eth1Data # Eth1 data vote
|
||||||
|
graffiti: Bytes32 # Arbitrary data
|
||||||
|
# Operations
|
||||||
|
proposer_slashings: List[ProposerSlashing, MAX_PROPOSER_SLASHINGS]
|
||||||
|
attester_slashings: List[AttesterSlashing, MAX_ATTESTER_SLASHINGS_ELECTRA] # [Modified in Electra:EIP7549]
|
||||||
|
attestations: List[Attestation, MAX_ATTESTATIONS_ELECTRA] # [Modified in Electra:EIP7549]
|
||||||
|
deposits: List[Deposit, MAX_DEPOSITS]
|
||||||
|
voluntary_exits: List[SignedVoluntaryExit, MAX_VOLUNTARY_EXITS]
|
||||||
|
sync_aggregate: SyncAggregate
|
||||||
|
# Execution
|
||||||
|
execution_payload_envelope: ExecutionPayloadEnvelope # [Modified in Electra:EIP????]
|
||||||
|
bls_to_execution_changes: List[SignedBLSToExecutionChange, MAX_BLS_TO_EXECUTION_CHANGES]
|
||||||
|
blob_kzg_commitments: List[KZGCommitment, MAX_BLOB_COMMITMENTS_PER_BLOCK]
|
||||||
|
```
|
||||||
|
|
||||||
### Extended Containers
|
### Extended Containers
|
||||||
|
|
||||||
#### `Attestation`
|
#### `Attestation`
|
||||||
|
@ -290,26 +333,6 @@ class IndexedAttestation(Container):
|
||||||
signature: BLSSignature
|
signature: BLSSignature
|
||||||
```
|
```
|
||||||
|
|
||||||
#### `BeaconBlockBody`
|
|
||||||
|
|
||||||
```python
|
|
||||||
class BeaconBlockBody(Container):
|
|
||||||
randao_reveal: BLSSignature
|
|
||||||
eth1_data: Eth1Data # Eth1 data vote
|
|
||||||
graffiti: Bytes32 # Arbitrary data
|
|
||||||
# Operations
|
|
||||||
proposer_slashings: List[ProposerSlashing, MAX_PROPOSER_SLASHINGS]
|
|
||||||
attester_slashings: List[AttesterSlashing, MAX_ATTESTER_SLASHINGS_ELECTRA] # [Modified in Electra:EIP7549]
|
|
||||||
attestations: List[Attestation, MAX_ATTESTATIONS_ELECTRA] # [Modified in Electra:EIP7549]
|
|
||||||
deposits: List[Deposit, MAX_DEPOSITS]
|
|
||||||
voluntary_exits: List[SignedVoluntaryExit, MAX_VOLUNTARY_EXITS]
|
|
||||||
sync_aggregate: SyncAggregate
|
|
||||||
# Execution
|
|
||||||
execution_payload: ExecutionPayload # [Modified in Electra:EIP6110:EIP7002]
|
|
||||||
bls_to_execution_changes: List[SignedBLSToExecutionChange, MAX_BLS_TO_EXECUTION_CHANGES]
|
|
||||||
blob_kzg_commitments: List[KZGCommitment, MAX_BLOB_COMMITMENTS_PER_BLOCK]
|
|
||||||
```
|
|
||||||
|
|
||||||
#### `ExecutionPayload`
|
#### `ExecutionPayload`
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
@ -946,7 +969,7 @@ def process_effective_balance_updates(state: BeaconState) -> None:
|
||||||
```python
|
```python
|
||||||
def process_block(state: BeaconState, block: BeaconBlock) -> None:
|
def process_block(state: BeaconState, block: BeaconBlock) -> None:
|
||||||
process_block_header(state, block)
|
process_block_header(state, block)
|
||||||
process_withdrawals(state, block.body.execution_payload) # [Modified in Electra:EIP7251]
|
process_withdrawals(state, block.body.execution_payload_envelope.execution_payload) # [Modified in Electra:EIP7251:EIP????]
|
||||||
process_execution_payload(state, block.body, EXECUTION_ENGINE) # [Modified in Electra:EIP6110]
|
process_execution_payload(state, block.body, EXECUTION_ENGINE) # [Modified in Electra:EIP6110]
|
||||||
process_randao(state, block.body)
|
process_randao(state, block.body)
|
||||||
process_eth1_data(state, block.body)
|
process_eth1_data(state, block.body)
|
||||||
|
@ -1056,7 +1079,7 @@ def process_withdrawals(state: BeaconState, payload: ExecutionPayload) -> None:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def process_execution_payload(state: BeaconState, body: BeaconBlockBody, execution_engine: ExecutionEngine) -> None:
|
def process_execution_payload(state: BeaconState, body: BeaconBlockBody, execution_engine: ExecutionEngine) -> None:
|
||||||
payload = body.execution_payload
|
payload = body.execution_payload_envelope.execution_payload
|
||||||
|
|
||||||
# Verify consistency of the parent hash with respect to the previous execution payload header
|
# Verify consistency of the parent hash with respect to the previous execution payload header
|
||||||
assert payload.parent_hash == state.latest_execution_payload_header.block_hash
|
assert payload.parent_hash == state.latest_execution_payload_header.block_hash
|
||||||
|
@ -1126,11 +1149,11 @@ def process_operations(state: BeaconState, body: BeaconBlockBody) -> None:
|
||||||
for_ops(body.deposits, process_deposit) # [Modified in Electra:EIP7251]
|
for_ops(body.deposits, process_deposit) # [Modified in Electra:EIP7251]
|
||||||
for_ops(body.voluntary_exits, process_voluntary_exit) # [Modified in Electra:EIP7251]
|
for_ops(body.voluntary_exits, process_voluntary_exit) # [Modified in Electra:EIP7251]
|
||||||
for_ops(body.bls_to_execution_changes, process_bls_to_execution_change)
|
for_ops(body.bls_to_execution_changes, process_bls_to_execution_change)
|
||||||
for_ops(body.execution_payload.deposit_requests, process_deposit_request) # [New in Electra:EIP6110]
|
for_ops(body.execution_payload_envelope.requests.deposit_requests, process_deposit_request) # [New in Electra:EIP6110:EIP????]
|
||||||
# [New in Electra:EIP7002:EIP7251]
|
# [New in Electra:EIP7002:EIP7251:EIP????]
|
||||||
for_ops(body.execution_payload.withdrawal_requests, process_withdrawal_request)
|
for_ops(body.execution_payload_envelope.requests.withdrawal_requests, process_withdrawal_request)
|
||||||
# [New in Electra:EIP7251]
|
# [New in Electra:EIP7251:EIP????]
|
||||||
for_ops(body.execution_payload.consolidation_requests, process_consolidation_request)
|
for_ops(body.execution_payload_envelope.requests.consolidation_requests, process_consolidation_request)
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Attestations
|
##### Attestations
|
||||||
|
|
Loading…
Reference in New Issue