Skip to content

Commit

Permalink
Move target_blobs_per_block to NewPayloadRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
jtraglia committed Dec 4, 2024
1 parent 408fb52 commit 9e085e4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions specs/_features/eip7594/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def process_execution_payload(state: BeaconState, body: BeaconBlockBody, executi
versioned_hashes=versioned_hashes,
parent_beacon_block_root=state.latest_block_header.parent_root,
execution_requests=body.execution_requests,
target_blobs_per_block=MAX_BLOBS_PER_BLOCK // 2,
)
)
# Cache execution payload header
Expand Down
1 change: 1 addition & 0 deletions specs/_features/eip7732/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,7 @@ def process_execution_payload(state: BeaconState,
versioned_hashes=versioned_hashes,
parent_beacon_block_root=state.latest_block_header.parent_root,
execution_requests=requests,
target_blobs_per_block=MAX_BLOBS_PER_BLOCK // 2,
)
)

Expand Down
4 changes: 3 additions & 1 deletion specs/electra/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,7 @@ class NewPayloadRequest(object):
versioned_hashes: Sequence[VersionedHash]
parent_beacon_block_root: Root
execution_requests: ExecutionRequests # [New in Electra]
target_blobs_per_block: uint64 # [New in Electra:EIP7742]
```

#### Engine APIs
Expand Down Expand Up @@ -1058,7 +1059,7 @@ 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_list = get_execution_requests_list(new_payload_request.execution_requests) # [New in Electra]
target_blobs_per_block = MAX_BLOBS_PER_BLOCK // 2 # [New in Electra:EIP7742]
target_blobs_per_block = new_payload_request.target_blobs_per_block # [New in Electra:EIP7742]

if b'' in execution_payload.transactions:
return False
Expand Down Expand Up @@ -1241,6 +1242,7 @@ def process_execution_payload(state: BeaconState, body: BeaconBlockBody, executi
versioned_hashes=versioned_hashes,
parent_beacon_block_root=state.latest_block_header.parent_root,
execution_requests=body.execution_requests, # [New in Electra]
target_blobs_per_block=MAX_BLOBS_PER_BLOCK // 2, # [New in Electra:EIP7742]
)
)
# Cache execution payload header
Expand Down

0 comments on commit 9e085e4

Please sign in to comment.