mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-20 15:38:55 +00:00
Remove requests in execution_payload from full-node lightclient spec
This commit is contained in:
parent
794b942c9b
commit
5c88de8bb9
@ -26,14 +26,9 @@ Execution payload data is updated to account for the Electra upgrade.
|
||||
```python
|
||||
def block_to_light_client_header(block: SignedBeaconBlock) -> LightClientHeader:
|
||||
epoch = compute_epoch_at_slot(block.message.slot)
|
||||
|
||||
if epoch >= CAPELLA_FORK_EPOCH:
|
||||
# [New in Electra:EIP6110:EIP7002:EIP7251:EIP????]
|
||||
if epoch >= ELECTRA_FORK_EPOCH:
|
||||
payload = block.message.body.execution_payload_envelope.execution_payload
|
||||
else:
|
||||
payload = block.message.body.execution_payload
|
||||
|
||||
if epoch >= CAPELLA_FORK_EPOCH:
|
||||
payload = block.message.body.execution_payload
|
||||
execution_header = ExecutionPayloadHeader(
|
||||
parent_hash=payload.parent_hash,
|
||||
fee_recipient=payload.fee_recipient,
|
||||
@ -55,13 +50,6 @@ def block_to_light_client_header(block: SignedBeaconBlock) -> LightClientHeader:
|
||||
execution_header.blob_gas_used = payload.blob_gas_used
|
||||
execution_header.excess_blob_gas = payload.excess_blob_gas
|
||||
|
||||
# [New in Electra:EIP6110:EIP7002:EIP7251:EIP????]
|
||||
if epoch >= ELECTRA_FORK_EPOCH:
|
||||
requests = block.message.body.execution_payload_envelope.requests
|
||||
execution_header.deposit_requests_root = hash_tree_root(requests.deposit_requests)
|
||||
execution_header.withdrawal_requests_root = hash_tree_root(requests.withdrawal_requests)
|
||||
execution_header.consolidation_requests_root = hash_tree_root(requests.consolidation_requests)
|
||||
|
||||
execution_branch = ExecutionBranch(
|
||||
compute_merkle_proof(block.message.body, EXECUTION_PAYLOAD_GINDEX))
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user