From f6fe8e27292c121c133a882998b1dacf900556ee Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Tue, 30 May 2023 20:36:58 +0800 Subject: [PATCH] Change `ExecutionPayload.excess_data_gas` type from `uint256` to `uint64` --- specs/_features/eip6110/beacon-chain.md | 4 ++-- specs/_features/eip6110/fork.md | 2 +- specs/_features/eip6110/light-client/sync-protocol.md | 2 +- specs/deneb/beacon-chain.md | 4 ++-- specs/deneb/fork.md | 2 +- specs/deneb/light-client/fork.md | 2 +- specs/deneb/light-client/sync-protocol.md | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/specs/_features/eip6110/beacon-chain.md b/specs/_features/eip6110/beacon-chain.md index e1384fdae..3e260006f 100644 --- a/specs/_features/eip6110/beacon-chain.md +++ b/specs/_features/eip6110/beacon-chain.md @@ -91,7 +91,7 @@ class ExecutionPayload(Container): block_hash: Hash32 transactions: List[Transaction, MAX_TRANSACTIONS_PER_PAYLOAD] withdrawals: List[Withdrawal, MAX_WITHDRAWALS_PER_PAYLOAD] - excess_data_gas: uint256 + excess_data_gas: uint64 deposit_receipts: List[DepositReceipt, MAX_DEPOSIT_RECEIPTS_PER_PAYLOAD] # [New in EIP6110] ``` @@ -116,7 +116,7 @@ class ExecutionPayloadHeader(Container): block_hash: Hash32 transactions_root: Root withdrawals_root: Root - excess_data_gas: uint256 + excess_data_gas: uint64 deposit_receipts_root: Root # [New in EIP6110] ``` diff --git a/specs/_features/eip6110/fork.md b/specs/_features/eip6110/fork.md index 2145a9d1a..468f432e6 100644 --- a/specs/_features/eip6110/fork.md +++ b/specs/_features/eip6110/fork.md @@ -88,7 +88,7 @@ def upgrade_to_eip6110(pre: deneb.BeaconState) -> BeaconState: block_hash=pre.latest_execution_payload_header.block_hash, transactions_root=pre.latest_execution_payload_header.transactions_root, withdrawals_root=pre.latest_execution_payload_header.withdrawals_root, - excess_data_gas=uint256(0), + excess_data_gas=uint64(0), deposit_receipts_root=Root(), # [New in EIP-6110] ) post = BeaconState( diff --git a/specs/_features/eip6110/light-client/sync-protocol.md b/specs/_features/eip6110/light-client/sync-protocol.md index bcb9d50e4..b454a2ebe 100644 --- a/specs/_features/eip6110/light-client/sync-protocol.md +++ b/specs/_features/eip6110/light-client/sync-protocol.md @@ -70,7 +70,7 @@ def is_valid_light_client_header(header: LightClientHeader) -> bool: return False if epoch < DENEB_FORK_EPOCH: - if header.execution.excess_data_gas != uint256(0): + if header.execution.excess_data_gas != uint64(0): return False if epoch < CAPELLA_FORK_EPOCH: diff --git a/specs/deneb/beacon-chain.md b/specs/deneb/beacon-chain.md index 175a80edf..ba84d33c0 100644 --- a/specs/deneb/beacon-chain.md +++ b/specs/deneb/beacon-chain.md @@ -126,7 +126,7 @@ class ExecutionPayload(Container): block_hash: Hash32 # Hash of execution block transactions: List[Transaction, MAX_TRANSACTIONS_PER_PAYLOAD] withdrawals: List[Withdrawal, MAX_WITHDRAWALS_PER_PAYLOAD] - excess_data_gas: uint256 # [New in Deneb] + excess_data_gas: uint64 # [New in Deneb] ``` #### `ExecutionPayloadHeader` @@ -150,7 +150,7 @@ class ExecutionPayloadHeader(Container): block_hash: Hash32 # Hash of execution block transactions_root: Root withdrawals_root: Root - excess_data_gas: uint256 # [New in Deneb] + excess_data_gas: uint64 # [New in Deneb] ``` ## Helper functions diff --git a/specs/deneb/fork.md b/specs/deneb/fork.md index 23b3f23c7..a4014b10a 100644 --- a/specs/deneb/fork.md +++ b/specs/deneb/fork.md @@ -83,7 +83,7 @@ def upgrade_to_deneb(pre: capella.BeaconState) -> BeaconState: block_hash=pre.latest_execution_payload_header.block_hash, transactions_root=pre.latest_execution_payload_header.transactions_root, withdrawals_root=pre.latest_execution_payload_header.withdrawals_root, - excess_data_gas=uint256(0), # [New in Deneb] + excess_data_gas=uint64(0), # [New in Deneb] ) post = BeaconState( # Versioning diff --git a/specs/deneb/light-client/fork.md b/specs/deneb/light-client/fork.md index 46a093028..dba50beb1 100644 --- a/specs/deneb/light-client/fork.md +++ b/specs/deneb/light-client/fork.md @@ -41,7 +41,7 @@ def upgrade_lc_header_to_deneb(pre: capella.LightClientHeader) -> LightClientHea block_hash=pre.execution.block_hash, transactions_root=pre.execution.transactions_root, withdrawals_root=pre.execution.withdrawals_root, - excess_data_gas=uint256(0), # [New in Deneb] + excess_data_gas=uint64(0), # [New in Deneb] ), execution_branch=pre.execution_branch, ) diff --git a/specs/deneb/light-client/sync-protocol.md b/specs/deneb/light-client/sync-protocol.md index c691a113d..697d12c04 100644 --- a/specs/deneb/light-client/sync-protocol.md +++ b/specs/deneb/light-client/sync-protocol.md @@ -68,7 +68,7 @@ def is_valid_light_client_header(header: LightClientHeader) -> bool: # [New in Deneb] if epoch < DENEB_FORK_EPOCH: - if header.execution.excess_data_gas != uint256(0): + if header.execution.excess_data_gas != uint64(0): return False if epoch < CAPELLA_FORK_EPOCH: