|
67 | 67 | - [New `compute_consolidation_epoch_and_update_churn`](#new-compute_consolidation_epoch_and_update_churn) |
68 | 68 | - [Updated `slash_validator`](#updated-slash_validator) |
69 | 69 | - [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) |
70 | 75 | - [Epoch processing](#epoch-processing) |
71 | 76 | - [Updated `process_epoch`](#updated-process_epoch) |
72 | 77 | - [Updated `process_registry_updates`](#updated--process_registry_updates) |
@@ -758,6 +763,54 @@ def slash_validator(state: BeaconState, |
758 | 763 |
|
759 | 764 | ## Beacon chain state transition function |
760 | 765 |
|
| 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 | + |
761 | 814 | ### Epoch processing |
762 | 815 |
|
763 | 816 | #### Updated `process_epoch` |
|
0 commit comments