Skip to content

Commit

Permalink
Remove block_timeliness from the store
Browse files Browse the repository at this point in the history
  • Loading branch information
potuz committed Jul 23, 2024
1 parent 8c9514e commit b7461ac
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions specs/_features/eip7732/fork-choice.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class Store(object):
equivocating_indices: Set[ValidatorIndex]
blocks: Dict[Root, BeaconBlock] = field(default_factory=dict)
block_states: Dict[Root, BeaconState] = field(default_factory=dict)
block_timeliness: Dict[Root, boolean] = field(default_factory=dict)
# block_timeliness removed in EIP-7732
checkpoint_states: Dict[Checkpoint, BeaconState] = field(default_factory=dict)
latest_messages: Dict[ValidatorIndex, LatestMessage] = field(default_factory=dict)
unrealized_justifications: Dict[Root, Checkpoint] = field(default_factory=dict)
Expand Down Expand Up @@ -430,7 +430,6 @@ def on_block(store: Store, signed_block: SignedBeaconBlock) -> None:
time_into_slot = (store.time - store.genesis_time) % SECONDS_PER_SLOT
is_before_attesting_interval = time_into_slot < SECONDS_PER_SLOT // INTERVALS_PER_SLOT
is_timely = get_current_slot(store) == block.slot and is_before_attesting_interval
store.block_timeliness[hash_tree_root(block)] = is_timely

# Add proposer score boost if the block is timely and not conflicting with an existing block
is_first_block = store.proposer_boost_root == Root()
Expand Down

0 comments on commit b7461ac

Please sign in to comment.