|
26 | 26 | - [New `is_past_slot`](#new-is_past_slot) |
27 | 27 | - [New `is_gas_limit_target_compatible`](#new-is_gas_limit_target_compatible) |
28 | 28 | - [New `is_bid_compatible_with_head`](#new-is_bid_compatible_with_head) |
29 | | - - [New `is_valid_dependent_root`](#new-is_valid_dependent_root) |
30 | 29 | - [New `compute_shuffling_dependent_epoch`](#new-compute_shuffling_dependent_epoch) |
31 | 30 | - [New `verify_attestation_payload_status`](#new-verify_attestation_payload_status) |
32 | 31 | - [New `verify_block_body_operation_limits`](#new-verify_block_body_operation_limits) |
@@ -381,25 +380,6 @@ def is_bid_compatible_with_head(store: Store, bid: ExecutionPayloadBid) -> bool: |
381 | 380 | return builds_on_parent_payload |
382 | 381 | ``` |
383 | 382 |
|
384 | | -### New `is_valid_dependent_root` |
385 | | - |
386 | | -```python |
387 | | -def is_valid_dependent_root(store: Store, root: Root, epoch: Epoch) -> bool: |
388 | | - """ |
389 | | - Check if the block with the given ``root`` is a possible dependent block |
390 | | - for the given ``epoch``, meaning that on some branch it is, or could |
391 | | - become, the latest block prior to the start of the epoch. |
392 | | - """ |
393 | | - epoch_start_slot = compute_start_slot_at_epoch(epoch) |
394 | | - for block in store.blocks.values(): |
395 | | - if block.parent_root == root: |
396 | | - if block.slot >= epoch_start_slot: |
397 | | - return True |
398 | | - if root == get_head(store).root: |
399 | | - return True |
400 | | - return False |
401 | | -``` |
402 | | - |
403 | 383 | ### New `compute_shuffling_dependent_epoch` |
404 | 384 |
|
405 | 385 | ```python |
@@ -1132,8 +1112,8 @@ def validate_proposer_preferences_gossip( |
1132 | 1112 | if store.blocks[preferences.dependent_root].slot > dependent_slot: |
1133 | 1113 | raise GossipReject("dependent block is after the shuffling dependent slot") |
1134 | 1114 |
|
1135 | | - # [IGNORE] The dependent block is a possible dependent block for the lookahead epoch |
1136 | | - if not is_valid_dependent_root(store, preferences.dependent_root, lookahead_epoch): |
| 1115 | + # [IGNORE] The dependent block is a possible dependent block for the proposer lookahead |
| 1116 | + if not is_valid_dependent_root(store, preferences.dependent_root, dependent_slot): |
1137 | 1117 | raise GossipIgnore("dependent block is not a possible dependent block") |
1138 | 1118 |
|
1139 | 1119 | # [REJECT] The validator is the proposer for the given slot in the proposer lookahead |
|
0 commit comments