Skip to content

Commit 60721b9

Browse files
committed
switch order
1 parent 7bc5d51 commit 60721b9

File tree

8 files changed

+15
-15
lines changed

8 files changed

+15
-15
lines changed

specs/_features/eip6110/beacon-chain.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ class ExecutionPayload(Container):
9191
block_hash: Hash32
9292
transactions: List[Transaction, MAX_TRANSACTIONS_PER_PAYLOAD]
9393
withdrawals: List[Withdrawal, MAX_WITHDRAWALS_PER_PAYLOAD]
94-
excess_data_gas: uint256
9594
data_gas_used: uint256
95+
excess_data_gas: uint256
9696
deposit_receipts: List[DepositReceipt, MAX_DEPOSIT_RECEIPTS_PER_PAYLOAD] # [New in EIP6110]
9797
```
9898

@@ -117,8 +117,8 @@ class ExecutionPayloadHeader(Container):
117117
block_hash: Hash32
118118
transactions_root: Root
119119
withdrawals_root: Root
120-
excess_data_gas: uint256
121120
data_gas_used: uint256
121+
excess_data_gas: uint256
122122
deposit_receipts_root: Root # [New in EIP6110]
123123
```
124124

@@ -270,8 +270,8 @@ def process_execution_payload(state: BeaconState, body: BeaconBlockBody, executi
270270
block_hash=payload.block_hash,
271271
transactions_root=hash_tree_root(payload.transactions),
272272
withdrawals_root=hash_tree_root(payload.withdrawals),
273-
excess_data_gas=payload.excess_data_gas,
274273
data_gas_used=payload.data_gas_used,
274+
excess_data_gas=payload.excess_data_gas,
275275
deposit_receipts_root=hash_tree_root(payload.deposit_receipts), # [New in EIP6110]
276276
)
277277
```

specs/_features/eip6110/fork.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ def upgrade_to_eip6110(pre: deneb.BeaconState) -> BeaconState:
8888
block_hash=pre.latest_execution_payload_header.block_hash,
8989
transactions_root=pre.latest_execution_payload_header.transactions_root,
9090
withdrawals_root=pre.latest_execution_payload_header.withdrawals_root,
91-
excess_data_gas=uint256(0),
9291
data_gas_used=uint256(0),
92+
excess_data_gas=uint256(0),
9393
deposit_receipts_root=Root(), # [New in EIP-6110]
9494
)
9595
post = BeaconState(

specs/deneb/beacon-chain.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ class ExecutionPayload(Container):
126126
block_hash: Hash32 # Hash of execution block
127127
transactions: List[Transaction, MAX_TRANSACTIONS_PER_PAYLOAD]
128128
withdrawals: List[Withdrawal, MAX_WITHDRAWALS_PER_PAYLOAD]
129-
excess_data_gas: uint256 # [New in Deneb]
130129
data_gas_used: uint256 # [New in Deneb]
130+
excess_data_gas: uint256 # [New in Deneb]
131131
```
132132

133133
#### `ExecutionPayloadHeader`
@@ -151,8 +151,8 @@ class ExecutionPayloadHeader(Container):
151151
block_hash: Hash32 # Hash of execution block
152152
transactions_root: Root
153153
withdrawals_root: Root
154-
excess_data_gas: uint256 # [New in Deneb]
155154
data_gas_used: uint256 # [New in Deneb]
155+
excess_data_gas: uint256 # [New in Deneb]
156156
```
157157

158158
## Helper functions
@@ -259,8 +259,8 @@ def process_execution_payload(state: BeaconState, body: BeaconBlockBody, executi
259259
block_hash=payload.block_hash,
260260
transactions_root=hash_tree_root(payload.transactions),
261261
withdrawals_root=hash_tree_root(payload.withdrawals),
262-
excess_data_gas=payload.excess_data_gas, # [New in Deneb]
263262
data_gas_used=payload.data_gas_used, # [New in Deneb]
263+
excess_data_gas=payload.excess_data_gas, # [New in Deneb]
264264
)
265265
```
266266

specs/deneb/fork.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ def upgrade_to_deneb(pre: capella.BeaconState) -> BeaconState:
8383
block_hash=pre.latest_execution_payload_header.block_hash,
8484
transactions_root=pre.latest_execution_payload_header.transactions_root,
8585
withdrawals_root=pre.latest_execution_payload_header.withdrawals_root,
86-
excess_data_gas=uint256(0), # [New in Deneb]
8786
data_gas_used=uint256(0), # [New in Deneb]
87+
excess_data_gas=uint256(0), # [New in Deneb]
8888
)
8989
post = BeaconState(
9090
# Versioning

specs/deneb/light-client/fork.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ def upgrade_lc_header_to_deneb(pre: capella.LightClientHeader) -> LightClientHea
4141
block_hash=pre.execution.block_hash,
4242
transactions_root=pre.execution.transactions_root,
4343
withdrawals_root=pre.execution.withdrawals_root,
44-
excess_data_gas=uint256(0), # [New in Deneb]
4544
data_gas_used=uint256(0), # [New in Deneb]
45+
excess_data_gas=uint256(0), # [New in Deneb]
4646
),
4747
execution_branch=pre.execution_branch,
4848
)

specs/deneb/light-client/full-node.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ def block_to_light_client_header(block: SignedBeaconBlock) -> LightClientHeader:
4949

5050
# [New in Deneb]
5151
if epoch >= DENEB_FORK_EPOCH:
52-
execution_header.excess_data_gas = payload.excess_data_gas
5352
execution_header.data_gas_used = payload.data_gas_used
53+
execution_header.excess_data_gas = payload.excess_data_gas
5454

5555
execution_branch = compute_merkle_proof_for_block_body(block.message.body, EXECUTION_PAYLOAD_INDEX)
5656
else:

tests/core/pyspec/eth2spec/test/deneb/sanity/test_blocks.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
)
1717

1818

19-
def run_block_with_blobs(spec, state, blob_count, excess_data_gas=1, data_gas_used=1, valid=True):
19+
def run_block_with_blobs(spec, state, blob_count, data_gas_used=1, excess_data_gas=1, valid=True):
2020
yield 'pre', state
2121

2222
block = build_empty_block_for_next_slot(spec, state)
2323
opaque_tx, _, blob_kzg_commitments, _ = get_sample_opaque_tx(spec, blob_count=blob_count)
2424
block.body.blob_kzg_commitments = blob_kzg_commitments
2525
block.body.execution_payload.transactions = [opaque_tx]
26-
block.body.execution_payload.excess_data_gas = excess_data_gas
2726
block.body.execution_payload.data_gas_used = data_gas_used
27+
block.body.execution_payload.excess_data_gas = excess_data_gas
2828
block.body.execution_payload.block_hash = compute_el_block_hash(spec, block.body.execution_payload)
2929

3030
if valid:

tests/core/pyspec/eth2spec/test/helpers/execution_payload.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ def get_execution_payload_header(spec, execution_payload):
3131
if is_post_capella(spec):
3232
payload_header.withdrawals_root = spec.hash_tree_root(execution_payload.withdrawals)
3333
if is_post_deneb(spec):
34-
payload_header.excess_data_gas = execution_payload.excess_data_gas
3534
payload_header.data_gas_used = execution_payload.data_gas_used
35+
payload_header.excess_data_gas = execution_payload.excess_data_gas
3636
if is_post_eip6110(spec):
3737
payload_header.deposit_receipts_root = spec.hash_tree_root(execution_payload.deposit_receipts)
3838
return payload_header
@@ -99,8 +99,8 @@ def compute_el_header_block_hash(spec,
9999
execution_payload_header_rlp.append((Binary(32, 32), withdrawals_trie_root))
100100
if is_post_deneb(spec):
101101
# excess_data_gas
102-
execution_payload_header_rlp.append((big_endian_int, payload_header.excess_data_gas))
103102
execution_payload_header_rlp.append((big_endian_int, payload_header.data_gas_used))
103+
execution_payload_header_rlp.append((big_endian_int, payload_header.excess_data_gas))
104104
if is_post_eip6110(spec):
105105
# deposit_receipts_root
106106
assert deposit_receipts_trie_root is not None
@@ -203,8 +203,8 @@ def build_empty_execution_payload(spec, state, randao_mix=None):
203203
if is_post_capella(spec):
204204
payload.withdrawals = spec.get_expected_withdrawals(state)
205205
if is_post_deneb(spec):
206-
payload.excess_data_gas = 0
207206
payload.data_gas_used = 0
207+
payload.excess_data_gas = 0
208208
if is_post_eip6110(spec):
209209
# just to be clear
210210
payload.deposit_receipts = []

0 commit comments

Comments
 (0)