23
23
blake ,
24
24
)
25
25
26
- from .attestation_records import AttestationRecord
26
+ from .processed_attestation import ProcessedAttestation
27
27
from .candidate_pow_receipt_root_records import CandidatePoWReceiptRootRecord
28
28
from .crosslink_records import CrosslinkRecord
29
29
from .shard_and_committees import ShardAndCommittee
@@ -46,10 +46,11 @@ class BeaconState(rlp.Serializable):
46
46
('last_state_recalculation_slot' , uint64 ),
47
47
# Last finalized slot
48
48
('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 ),
53
54
# Committee members and their assigned shard, per slot
54
55
('shard_and_committee_for_slots' , CountableList (CountableList (ShardAndCommittee ))),
55
56
# Persistent shard committees
@@ -74,7 +75,7 @@ class BeaconState(rlp.Serializable):
74
75
('post_fork_version' , uint64 ),
75
76
('fork_slot_number' , uint64 ),
76
77
# Attestations not yet processed
77
- ('pending_attestations' , CountableList (AttestationRecord )),
78
+ ('pending_attestations' , CountableList (ProcessedAttestation )),
78
79
# recent beacon block hashes needed to process attestations, older to newer
79
80
('recent_block_hashes' , CountableList (hash32 )),
80
81
# RANDAO state
@@ -85,8 +86,9 @@ def __init__(self,
85
86
validator_set_change_slot : int ,
86
87
last_state_recalculation_slot : int ,
87
88
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 ,
90
92
next_shuffling_seed : Hash32 ,
91
93
validator_set_delta_hash_chain : Hash32 ,
92
94
current_exit_seq : int ,
@@ -103,7 +105,7 @@ def __init__(self,
103
105
persistent_committee_reassignments : Sequence [ShardReassignmentRecord ]= None ,
104
106
deposits_penalized_in_period : Sequence [int ]= None ,
105
107
candidate_pow_receipt_roots : Sequence [CandidatePoWReceiptRootRecord ]= None ,
106
- pending_attestations : Sequence [AttestationRecord ]= None ,
108
+ pending_attestations : Sequence [ProcessedAttestation ]= None ,
107
109
recent_block_hashes : Sequence [Hash32 ]= None
108
110
) -> None :
109
111
if validators is None :
@@ -129,8 +131,9 @@ def __init__(self,
129
131
crosslinks = crosslinks ,
130
132
last_state_recalculation_slot = last_state_recalculation_slot ,
131
133
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 ,
134
137
shard_and_committee_for_slots = shard_and_committee_for_slots ,
135
138
persistent_committees = persistent_committees ,
136
139
persistent_committee_reassignments = persistent_committee_reassignments ,
0 commit comments