Skip to content

Commit 6e194de

Browse files
authored
Merge pull request #3967 from jtraglia/move-execution-requests-to-end
Move `execution_requests` after `parent_beacon_block_root`
2 parents 01b2625 + a624d4c commit 6e194de

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

pysetup/spec_builders/electra.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ class NoopExecutionEngine(ExecutionEngine):
2828
2929
def notify_new_payload(self: ExecutionEngine,
3030
execution_payload: ExecutionPayload,
31-
execution_requests: ExecutionRequests,
32-
parent_beacon_block_root: Root) -> bool:
31+
parent_beacon_block_root: Root,
32+
execution_requests: ExecutionRequests) -> bool:
3333
return True
3434
3535
def notify_forkchoice_updated(self: ExecutionEngine,

specs/electra/beacon-chain.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -990,8 +990,8 @@ class NewPayloadRequest(object):
990990
```python
991991
def notify_new_payload(self: ExecutionEngine,
992992
execution_payload: ExecutionPayload,
993-
execution_requests: ExecutionRequests,
994-
parent_beacon_block_root: Root) -> bool:
993+
parent_beacon_block_root: Root,
994+
execution_requests: ExecutionRequests) -> bool:
995995
"""
996996
Return ``True`` if and only if ``execution_payload`` and ``execution_requests``
997997
are valid with respect to ``self.execution_state``.
@@ -1011,8 +1011,8 @@ def verify_and_notify_new_payload(self: ExecutionEngine,
10111011
Return ``True`` if and only if ``new_payload_request`` is valid with respect to ``self.execution_state``.
10121012
"""
10131013
execution_payload = new_payload_request.execution_payload
1014-
execution_requests = new_payload_request.execution_requests # [New in Electra]
10151014
parent_beacon_block_root = new_payload_request.parent_beacon_block_root
1015+
execution_requests = new_payload_request.execution_requests # [New in Electra]
10161016

10171017
if not self.is_valid_block_hash(execution_payload, parent_beacon_block_root):
10181018
return False
@@ -1022,9 +1022,8 @@ def verify_and_notify_new_payload(self: ExecutionEngine,
10221022

10231023
# [Modified in Electra]
10241024
if not self.notify_new_payload(
1025-
execution_payload,
1026-
execution_requests,
1027-
parent_beacon_block_root):
1025+
parent_beacon_block_root,
1026+
execution_requests):
10281027
return False
10291028

10301029
return True
@@ -1160,9 +1159,9 @@ def process_execution_payload(state: BeaconState, body: BeaconBlockBody, executi
11601159
assert execution_engine.verify_and_notify_new_payload(
11611160
NewPayloadRequest(
11621161
execution_payload=payload,
1163-
execution_requests=body.execution_requests, # [New in Electra]
11641162
versioned_hashes=versioned_hashes,
11651163
parent_beacon_block_root=state.latest_block_header.parent_root,
1164+
execution_requests=body.execution_requests, # [New in Electra]
11661165
)
11671166
)
11681167
# Cache execution payload header

0 commit comments

Comments
 (0)