mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-01 21:36:07 +00:00
Merge pull request #3218 from protolambda/excess-data-gas-field-position
eip4844: move excess data gas field to end of execution payload for merkle proof path compat
This commit is contained in:
commit
89f2eae318
2
setup.py
2
setup.py
@ -1169,7 +1169,7 @@ setup(
|
|||||||
"pycryptodome==3.15.0",
|
"pycryptodome==3.15.0",
|
||||||
"py_ecc==6.0.0",
|
"py_ecc==6.0.0",
|
||||||
"milagro_bls_binding==1.9.0",
|
"milagro_bls_binding==1.9.0",
|
||||||
"remerkleable==0.1.25",
|
"remerkleable==0.1.27",
|
||||||
"trie==2.0.2",
|
"trie==2.0.2",
|
||||||
RUAMEL_YAML_VERSION,
|
RUAMEL_YAML_VERSION,
|
||||||
"lru-dict==1.1.8",
|
"lru-dict==1.1.8",
|
||||||
|
@ -242,7 +242,7 @@ class BeaconState(Container):
|
|||||||
current_sync_committee: SyncCommittee
|
current_sync_committee: SyncCommittee
|
||||||
next_sync_committee: SyncCommittee
|
next_sync_committee: SyncCommittee
|
||||||
# Execution
|
# Execution
|
||||||
latest_execution_payload_header: ExecutionPayloadHeader
|
latest_execution_payload_header: ExecutionPayloadHeader # [Modified in Capella]
|
||||||
# Withdrawals
|
# Withdrawals
|
||||||
next_withdrawal_index: WithdrawalIndex # [New in Capella]
|
next_withdrawal_index: WithdrawalIndex # [New in Capella]
|
||||||
next_withdrawal_validator_index: ValidatorIndex # [New in Capella]
|
next_withdrawal_validator_index: ValidatorIndex # [New in Capella]
|
||||||
|
@ -108,11 +108,11 @@ class ExecutionPayload(Container):
|
|||||||
timestamp: uint64
|
timestamp: uint64
|
||||||
extra_data: ByteList[MAX_EXTRA_DATA_BYTES]
|
extra_data: ByteList[MAX_EXTRA_DATA_BYTES]
|
||||||
base_fee_per_gas: uint256
|
base_fee_per_gas: uint256
|
||||||
excess_data_gas: uint256 # [New in Deneb]
|
|
||||||
# Extra payload fields
|
# Extra payload fields
|
||||||
block_hash: Hash32 # Hash of execution block
|
block_hash: Hash32 # Hash of execution block
|
||||||
transactions: List[Transaction, MAX_TRANSACTIONS_PER_PAYLOAD]
|
transactions: List[Transaction, MAX_TRANSACTIONS_PER_PAYLOAD]
|
||||||
withdrawals: List[Withdrawal, MAX_WITHDRAWALS_PER_PAYLOAD]
|
withdrawals: List[Withdrawal, MAX_WITHDRAWALS_PER_PAYLOAD]
|
||||||
|
excess_data_gas: uint256 # [New in Deneb]
|
||||||
```
|
```
|
||||||
|
|
||||||
#### `ExecutionPayloadHeader`
|
#### `ExecutionPayloadHeader`
|
||||||
@ -132,11 +132,11 @@ class ExecutionPayloadHeader(Container):
|
|||||||
timestamp: uint64
|
timestamp: uint64
|
||||||
extra_data: ByteList[MAX_EXTRA_DATA_BYTES]
|
extra_data: ByteList[MAX_EXTRA_DATA_BYTES]
|
||||||
base_fee_per_gas: uint256
|
base_fee_per_gas: uint256
|
||||||
excess_data_gas: uint256 # [New in Deneb]
|
|
||||||
# Extra payload fields
|
# Extra payload fields
|
||||||
block_hash: Hash32 # Hash of execution block
|
block_hash: Hash32 # Hash of execution block
|
||||||
transactions_root: Root
|
transactions_root: Root
|
||||||
withdrawals_root: Root
|
withdrawals_root: Root
|
||||||
|
excess_data_gas: uint256 # [New in Deneb]
|
||||||
```
|
```
|
||||||
|
|
||||||
## Helper functions
|
## Helper functions
|
||||||
@ -230,10 +230,10 @@ def process_execution_payload(state: BeaconState, payload: ExecutionPayload, exe
|
|||||||
timestamp=payload.timestamp,
|
timestamp=payload.timestamp,
|
||||||
extra_data=payload.extra_data,
|
extra_data=payload.extra_data,
|
||||||
base_fee_per_gas=payload.base_fee_per_gas,
|
base_fee_per_gas=payload.base_fee_per_gas,
|
||||||
excess_data_gas=payload.excess_data_gas, # [New in Deneb]
|
|
||||||
block_hash=payload.block_hash,
|
block_hash=payload.block_hash,
|
||||||
transactions_root=hash_tree_root(payload.transactions),
|
transactions_root=hash_tree_root(payload.transactions),
|
||||||
withdrawals_root=hash_tree_root(payload.withdrawals),
|
withdrawals_root=hash_tree_root(payload.withdrawals),
|
||||||
|
excess_data_gas=payload.excess_data_gas, # [New in Deneb]
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -29,14 +29,12 @@ def run_fork_test(post_spec, pre_state):
|
|||||||
'inactivity_scores',
|
'inactivity_scores',
|
||||||
# Sync
|
# Sync
|
||||||
'current_sync_committee', 'next_sync_committee',
|
'current_sync_committee', 'next_sync_committee',
|
||||||
# Execution
|
|
||||||
'latest_execution_payload_header',
|
|
||||||
]
|
]
|
||||||
for field in stable_fields:
|
for field in stable_fields:
|
||||||
assert getattr(pre_state, field) == getattr(post_state, field)
|
assert getattr(pre_state, field) == getattr(post_state, field)
|
||||||
|
|
||||||
# Modified fields
|
# Modified fields
|
||||||
modified_fields = ['fork']
|
modified_fields = ['fork', 'latest_execution_payload_header']
|
||||||
for field in modified_fields:
|
for field in modified_fields:
|
||||||
assert getattr(pre_state, field) != getattr(post_state, field)
|
assert getattr(pre_state, field) != getattr(post_state, field)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user