Skip to content

Commit

Permalink
Compute requests hash in verify_and_notify_new_payload
Browse files Browse the repository at this point in the history
  • Loading branch information
jtraglia committed Oct 8, 2024
1 parent e02c2ee commit 04b2a55
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion specs/_features/eip7732/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ def process_execution_payload(state: BeaconState,
execution_payload=payload,
versioned_hashes=versioned_hashes,
parent_beacon_block_root=state.latest_block_header.parent_root,
execution_requests_hash=compute_execution_requests_hash(requests),
execution_requests=requests,
)
)

Expand Down
7 changes: 4 additions & 3 deletions specs/electra/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ class NewPayloadRequest(object):
execution_payload: ExecutionPayload
versioned_hashes: Sequence[VersionedHash]
parent_beacon_block_root: Root
execution_requests_hash: Hash32 # [New in Electra:EIP7685]
execution_requests: ExecutionRequests # [New in Electra:EIP7685]
```

#### Engine APIs
Expand Down Expand Up @@ -1021,7 +1021,8 @@ def verify_and_notify_new_payload(self: ExecutionEngine,
"""
execution_payload = new_payload_request.execution_payload
parent_beacon_block_root = new_payload_request.parent_beacon_block_root
execution_requests_hash = new_payload_request.execution_requests_hash # [New in Electra]
# [New in Electra]
execution_requests_hash = compute_execution_requests_hash(new_payload_request.execution_requests)

# [Modified in Electra:EIP7685]
if not self.is_valid_block_hash(
Expand Down Expand Up @@ -1187,7 +1188,7 @@ def process_execution_payload(state: BeaconState, body: BeaconBlockBody, executi
execution_payload=payload,
versioned_hashes=versioned_hashes,
parent_beacon_block_root=state.latest_block_header.parent_root,
execution_requests_hash=compute_execution_requests_hash(body.execution_requests), # [New in Electra]
execution_requests=body.execution_requests, # [New in Electra]
)
)
# Cache execution payload header
Expand Down

0 comments on commit 04b2a55

Please sign in to comment.