2323 blake ,
2424)
2525
26- from .attestation_records import AttestationRecord
26+ from .processed_attestation import ProcessedAttestation
2727from .candidate_pow_receipt_root_records import CandidatePoWReceiptRootRecord
2828from .crosslink_records import CrosslinkRecord
2929from .shard_and_committees import ShardAndCommittee
@@ -46,10 +46,11 @@ class BeaconState(rlp.Serializable):
4646 ('last_state_recalculation_slot' , uint64 ),
4747 # Last finalized slot
4848 ('last_finalized_slot' , uint64 ),
49- # Last justified slot
50- ('last_justified_slot' , uint64 ),
51- # Number of consecutive justified slots
52- ('justified_streak' , uint64 ),
49+ # Justification source
50+ ('justification_source' , uint64 ),
51+ ('prev_cycle_justification_source' , uint64 ),
52+ # Recent justified slot bitmask
53+ ('justified_slot_bitfield' , uint64 ),
5354 # Committee members and their assigned shard, per slot
5455 ('shard_and_committee_for_slots' , CountableList (CountableList (ShardAndCommittee ))),
5556 # Persistent shard committees
@@ -74,7 +75,7 @@ class BeaconState(rlp.Serializable):
7475 ('post_fork_version' , uint64 ),
7576 ('fork_slot_number' , uint64 ),
7677 # Attestations not yet processed
77- ('pending_attestations' , CountableList (AttestationRecord )),
78+ ('pending_attestations' , CountableList (ProcessedAttestation )),
7879 # recent beacon block hashes needed to process attestations, older to newer
7980 ('recent_block_hashes' , CountableList (hash32 )),
8081 # RANDAO state
@@ -85,8 +86,9 @@ def __init__(self,
8586 validator_set_change_slot : int ,
8687 last_state_recalculation_slot : int ,
8788 last_finalized_slot : int ,
88- last_justified_slot : int ,
89- justified_streak : int ,
89+ justification_source : int ,
90+ prev_cycle_justification_source : int ,
91+ justified_slot_bitfield : int ,
9092 next_shuffling_seed : Hash32 ,
9193 validator_set_delta_hash_chain : Hash32 ,
9294 current_exit_seq : int ,
@@ -103,7 +105,7 @@ def __init__(self,
103105 persistent_committee_reassignments : Sequence [ShardReassignmentRecord ]= None ,
104106 deposits_penalized_in_period : Sequence [int ]= None ,
105107 candidate_pow_receipt_roots : Sequence [CandidatePoWReceiptRootRecord ]= None ,
106- pending_attestations : Sequence [AttestationRecord ]= None ,
108+ pending_attestations : Sequence [ProcessedAttestation ]= None ,
107109 recent_block_hashes : Sequence [Hash32 ]= None
108110 ) -> None :
109111 if validators is None :
@@ -129,8 +131,9 @@ def __init__(self,
129131 crosslinks = crosslinks ,
130132 last_state_recalculation_slot = last_state_recalculation_slot ,
131133 last_finalized_slot = last_finalized_slot ,
132- last_justified_slot = last_justified_slot ,
133- justified_streak = justified_streak ,
134+ justification_source = justification_source ,
135+ prev_cycle_justification_source = prev_cycle_justification_source ,
136+ justified_slot_bitfield = justified_slot_bitfield ,
134137 shard_and_committee_for_slots = shard_and_committee_for_slots ,
135138 persistent_committees = persistent_committees ,
136139 persistent_committee_reassignments = persistent_committee_reassignments ,
0 commit comments