@@ -53,15 +53,15 @@ domain. Some Phase 0 features will be deprecated, but not removed immediately.
5353``` python
5454@dataclass
5555class Seen :
56- proposer_slots: Set[Tuple[ValidatorIndex, Slot ]]
57- aggregator_epochs: Set[Tuple[ValidatorIndex, Epoch ]]
56+ proposer_slots: Set[Tuple[Slot, ValidatorIndex ]]
57+ aggregator_epochs: Set[Tuple[Epoch, ValidatorIndex ]]
5858 aggregate_data_roots: Dict[Root, Set[Tuple[Boolean, ... ]]]
5959 voluntary_exit_indices: Set[ValidatorIndex]
6060 proposer_slashing_indices: Set[ValidatorIndex]
6161 attester_slashing_indices: Set[ValidatorIndex]
62- attestation_validator_epochs: Set[Tuple[ValidatorIndex, Epoch ]]
62+ attestation_validator_epochs: Set[Tuple[Epoch, ValidatorIndex ]]
6363 # [New in Altair]
64- sync_contribution_aggregator_slots: Set[Tuple[ValidatorIndex, Slot , Uint64]]
64+ sync_contribution_aggregator_slots: Set[Tuple[Slot, ValidatorIndex , Uint64]]
6565 # [New in Altair]
6666 sync_contribution_data: Dict[Tuple[Slot, Root, Uint64], Set[Tuple[Boolean, ... ]]]
6767 # [New in Altair]
@@ -84,15 +84,15 @@ def compute_fork_version(epoch: Epoch) -> Version:
8484
8585``` python
8686def is_current_slot (
87- state : BeaconState ,
87+ store : Store ,
8888 slot : Slot,
8989 current_time_ms : Uint64,
9090) -> bool :
9191 """
9292 Check if the given slot is the current slot
9393 (with MAXIMUM_GOSSIP_CLOCK_DISPARITY allowance).
9494 """
95- return is_within_slot_range(state , slot, 0 , current_time_ms)
95+ return is_within_slot_range(store , slot, 0 , current_time_ms)
9696```
9797
9898#### New ` get_sync_subcommittee_pubkeys `
@@ -217,6 +217,7 @@ be included in future blocks. The `state` parameter is the head state.
217217``` python
218218def validate_sync_committee_contribution_and_proof_gossip (
219219 seen : Seen,
220+ store : Store,
220221 state : BeaconState,
221222 signed_contribution_and_proof : SignedContributionAndProof,
222223 current_time_ms : Uint64,
@@ -229,7 +230,7 @@ def validate_sync_committee_contribution_and_proof_gossip(
229230 contribution = contribution_and_proof.contribution
230231
231232 # [IGNORE] The contribution's slot is for the current slot
232- if not is_current_slot(state , contribution.slot, current_time_ms):
233+ if not is_current_slot(store , contribution.slot, current_time_ms):
233234 raise GossipIgnore(" contribution is not for the current slot" )
234235
235236 # [REJECT] The subcommittee index is in the allowed range
@@ -269,11 +270,11 @@ def validate_sync_committee_contribution_and_proof_gossip(
269270 raise GossipIgnore(" already seen contribution for this data" )
270271
271272 # [IGNORE] The sync committee contribution is the first valid contribution received
272- # for the aggregator with index contribution_and_proof.aggregator_index
273- # for the slot contribution.slot and subcommittee index contribution.subcommittee_index
273+ # for the slot contribution.slot, aggregator with index contribution_and_proof.aggregator_index,
274+ # and subcommittee index contribution.subcommittee_index
274275 aggregator_key = (
275- contribution_and_proof.aggregator_index,
276276 contribution.slot,
277+ contribution_and_proof.aggregator_index,
277278 contribution.subcommittee_index,
278279 )
279280 if aggregator_key in seen.sync_contribution_aggregator_slots:
@@ -334,6 +335,7 @@ gossiped to the global `sync_committee_contribution_and_proof` topic. The
334335``` python
335336def validate_sync_committee_message_gossip (
336337 seen : Seen,
338+ store : Store,
337339 state : BeaconState,
338340 sync_committee_message : SyncCommitteeMessage,
339341 current_time_ms : Uint64,
@@ -344,7 +346,7 @@ def validate_sync_committee_message_gossip(
344346 Raises GossipIgnore or GossipReject on validation failure.
345347 """
346348 # [IGNORE] The message's slot is for the current slot
347- if not is_current_slot(state , sync_committee_message.slot, current_time_ms):
349+ if not is_current_slot(store , sync_committee_message.slot, current_time_ms):
348350 raise GossipIgnore(" message is not for the current slot" )
349351
350352 # [REJECT] The validator index is valid
0 commit comments