Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change excess_data_gas and data_gas_used type from uint256 to uint64 #3392

Merged
merged 2 commits into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions specs/_features/eip6110/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ class ExecutionPayload(Container):
block_hash: Hash32
transactions: List[Transaction, MAX_TRANSACTIONS_PER_PAYLOAD]
withdrawals: List[Withdrawal, MAX_WITHDRAWALS_PER_PAYLOAD]
data_gas_used: uint256
excess_data_gas: uint256
data_gas_used: uint64
excess_data_gas: uint64
deposit_receipts: List[DepositReceipt, MAX_DEPOSIT_RECEIPTS_PER_PAYLOAD] # [New in EIP6110]
```

Expand All @@ -117,8 +117,8 @@ class ExecutionPayloadHeader(Container):
block_hash: Hash32
transactions_root: Root
withdrawals_root: Root
data_gas_used: uint256
excess_data_gas: uint256
data_gas_used: uint64
excess_data_gas: uint64
deposit_receipts_root: Root # [New in EIP6110]
```

Expand Down
4 changes: 2 additions & 2 deletions specs/_features/eip6110/fork.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ 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,
data_gas_used=uint256(0),
excess_data_gas=uint256(0),
data_gas_used=uint64(0),
excess_data_gas=uint64(0),
deposit_receipts_root=Root(), # [New in EIP-6110]
)
post = BeaconState(
Expand Down
8 changes: 4 additions & 4 deletions specs/deneb/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ class ExecutionPayload(Container):
block_hash: Hash32 # Hash of execution block
transactions: List[Transaction, MAX_TRANSACTIONS_PER_PAYLOAD]
withdrawals: List[Withdrawal, MAX_WITHDRAWALS_PER_PAYLOAD]
data_gas_used: uint256 # [New in Deneb]
excess_data_gas: uint256 # [New in Deneb]
data_gas_used: uint64 # [New in Deneb]
excess_data_gas: uint64 # [New in Deneb]
```

#### `ExecutionPayloadHeader`
Expand All @@ -151,8 +151,8 @@ class ExecutionPayloadHeader(Container):
block_hash: Hash32 # Hash of execution block
transactions_root: Root
withdrawals_root: Root
data_gas_used: uint256 # [New in Deneb]
excess_data_gas: uint256 # [New in Deneb]
data_gas_used: uint64 # [New in Deneb]
excess_data_gas: uint64 # [New in Deneb]
```

## Helper functions
Expand Down
4 changes: 2 additions & 2 deletions specs/deneb/fork.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ 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,
data_gas_used=uint256(0), # [New in Deneb]
excess_data_gas=uint256(0), # [New in Deneb]
data_gas_used=uint64(0), # [New in Deneb]
excess_data_gas=uint64(0), # [New in Deneb]
)
post = BeaconState(
# Versioning
Expand Down
4 changes: 2 additions & 2 deletions specs/deneb/light-client/fork.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ 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,
data_gas_used=uint256(0), # [New in Deneb]
excess_data_gas=uint256(0), # [New in Deneb]
data_gas_used=uint64(0), # [New in Deneb]
excess_data_gas=uint64(0), # [New in Deneb]
),
execution_branch=pre.execution_branch,
)
Expand Down
2 changes: 1 addition & 1 deletion specs/deneb/light-client/sync-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) or header.execution.data_gas_used != uint256(0):
if header.execution.data_gas_used != uint64(0) or header.execution.excess_data_gas != uint64(0):
return False

if epoch < CAPELLA_FORK_EPOCH:
Expand Down