mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-03 06:13:31 +00:00
Change ExecutionPayload.excess_data_gas
type from uint256
to uint64
This commit is contained in:
parent
017a8495f7
commit
f6fe8e2729
@ -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]
|
||||
```
|
||||
|
||||
|
@ -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(
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
)
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user