|
68 | 68 | - [New `process_payload_attestation`](#new-process_payload_attestation) |
69 | 69 | - [Proposer Slashing](#proposer-slashing) |
70 | 70 | - [Modified `process_proposer_slashing`](#modified-process_proposer_slashing) |
71 | | - - [Modified `is_merge_transition_complete`](#modified-is_merge_transition_complete) |
72 | | - - [Modified `validate_merge_block`](#modified-validate_merge_block) |
73 | 71 | - [Execution payload processing](#execution-payload-processing) |
74 | 72 | - [New `verify_execution_payload_envelope_signature`](#new-verify_execution_payload_envelope_signature) |
75 | 73 | - [New `process_execution_payload`](#new-process_execution_payload) |
@@ -1203,53 +1201,6 @@ def process_proposer_slashing(state: BeaconState, proposer_slashing: ProposerSla |
1203 | 1201 | slash_validator(state, header_1.proposer_index) |
1204 | 1202 | ``` |
1205 | 1203 |
|
1206 | | -#### Modified `is_merge_transition_complete` |
1207 | | - |
1208 | | -*Note*: `is_merge_transition_complete` is modified only for testing purposes to |
1209 | | -add the blob kzg commitments root for an empty list |
1210 | | - |
1211 | | -```python |
1212 | | -def is_merge_transition_complete(state: BeaconState) -> bool: |
1213 | | - bid = ExecutionPayloadBid() |
1214 | | - kzgs = List[KZGCommitment, MAX_BLOB_COMMITMENTS_PER_BLOCK]() |
1215 | | - bid.blob_kzg_commitments_root = kzgs.hash_tree_root() |
1216 | | - |
1217 | | - return state.latest_execution_payload_bid != bid |
1218 | | -``` |
1219 | | - |
1220 | | -#### Modified `validate_merge_block` |
1221 | | - |
1222 | | -*Note*: `validate_merge_block` is modified to use the new |
1223 | | -`signed_execution_payload_bid` field in the `BeaconBlockBody`. |
1224 | | - |
1225 | | -```python |
1226 | | -def validate_merge_block(block: BeaconBlock) -> None: |
1227 | | - """ |
1228 | | - Check the parent PoW block of execution payload is a valid terminal PoW block. |
1229 | | -
|
1230 | | - Note: Unavailable PoW block(s) may later become available, |
1231 | | - and a client software MAY delay a call to ``validate_merge_block`` |
1232 | | - until the PoW block(s) become available. |
1233 | | - """ |
1234 | | - if TERMINAL_BLOCK_HASH != Hash32(): |
1235 | | - # If `TERMINAL_BLOCK_HASH` is used as an override, the activation epoch must be reached. |
1236 | | - assert compute_epoch_at_slot(block.slot) >= TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH |
1237 | | - assert ( |
1238 | | - block.body.signed_execution_payload_bid.message.parent_block_hash == TERMINAL_BLOCK_HASH |
1239 | | - ) |
1240 | | - return |
1241 | | - |
1242 | | - # [Modified in Gloas:EIP7732] |
1243 | | - pow_block = get_pow_block(block.body.signed_execution_payload_bid.message.parent_block_hash) |
1244 | | - # Check if `pow_block` is available |
1245 | | - assert pow_block is not None |
1246 | | - pow_parent = get_pow_block(pow_block.parent_hash) |
1247 | | - # Check if `pow_parent` is available |
1248 | | - assert pow_parent is not None |
1249 | | - # Check if `pow_block` is a valid terminal PoW block |
1250 | | - assert is_valid_terminal_pow_block(pow_block, pow_parent) |
1251 | | -``` |
1252 | | - |
1253 | 1204 | ### Execution payload processing |
1254 | 1205 |
|
1255 | 1206 | #### New `verify_execution_payload_envelope_signature` |
|
0 commit comments