Skip to content

Commit 71f2912

Browse files
committed
specify the maximum number of blobs for each payload
1 parent 4c29b0b commit 71f2912

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

specs/electra/beacon-chain.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@
6767
- [New `compute_consolidation_epoch_and_update_churn`](#new-compute_consolidation_epoch_and_update_churn)
6868
- [Updated `slash_validator`](#updated-slash_validator)
6969
- [Beacon chain state transition function](#beacon-chain-state-transition-function)
70+
- [Execution engine](#execution-engine)
71+
- [Request data](#request-data)
72+
- [Engine APIs](#engine-apis)
73+
- [Modified `notify_new_payload`](#modified-notify_new_payload)
74+
- [Modified `verify_and_notify_new_payload`](#modified-verify_and_notify_new_payload)
7075
- [Epoch processing](#epoch-processing)
7176
- [Updated `process_epoch`](#updated-process_epoch)
7277
- [Updated `process_registry_updates`](#updated--process_registry_updates)
@@ -758,6 +763,54 @@ def slash_validator(state: BeaconState,
758763

759764
## Beacon chain state transition function
760765

766+
### Execution engine
767+
768+
#### Request data
769+
770+
#### Engine APIs
771+
772+
##### Modified `notify_new_payload`
773+
774+
*Note*: The function `notify_new_payload` is modified to include the maximum number of blobs
775+
allowed per block.
776+
777+
```python
778+
def notify_new_payload(self: ExecutionEngine,
779+
execution_payload: ExecutionPayload,
780+
parent_beacon_block_root: Root,
781+
max_blobs_per_block: uint64) -> bool:
782+
"""
783+
Return ``True`` if and only if ``execution_payload`` is valid with respect to ``self.execution_state``.
784+
"""
785+
...
786+
```
787+
788+
##### Modified `verify_and_notify_new_payload`
789+
790+
```python
791+
def verify_and_notify_new_payload(self: ExecutionEngine,
792+
new_payload_request: NewPayloadRequest) -> bool:
793+
"""
794+
Return ``True`` if and only if ``new_payload_request`` is valid with respect to ``self.execution_state``.
795+
"""
796+
execution_payload = new_payload_request.execution_payload
797+
parent_beacon_block_root = new_payload_request.parent_beacon_block_root
798+
799+
if not self.is_valid_block_hash(execution_payload, parent_beacon_block_root):
800+
return False
801+
802+
if not self.is_valid_versioned_hashes(new_payload_request):
803+
return False
804+
805+
# [Modified in Electra]
806+
if not self.notify_new_payload(execution_payload,
807+
parent_beacon_block_root,
808+
MAX_BLOBS_PER_BLOCK):
809+
return False
810+
811+
return True
812+
```
813+
761814
### Epoch processing
762815

763816
#### Updated `process_epoch`

0 commit comments

Comments
 (0)