fix initial initial persistent_committees (#258)
* fix initial persistent_committees * initial persistent commmitees from active validator indices
This commit is contained in:
parent
685a1be651
commit
de32e25bfc
|
@ -1038,6 +1038,9 @@ def on_startup(initial_validator_entries: List[Any],
|
|||
|
||||
# Setup state
|
||||
initial_shuffling = get_new_shuffling(ZERO_HASH, initial_validator_registry, 0)
|
||||
active_validator_indices = get_active_validator_indices(initial_validator_registry)
|
||||
initial_persistent_committees = split(shuffle(active_validator_indices, ZERO_HASH), SHARD_COUNT)
|
||||
|
||||
state = BeaconState(
|
||||
# Misc
|
||||
slot=INITIAL_SLOT_NUMBER,
|
||||
|
@ -1058,7 +1061,7 @@ def on_startup(initial_validator_entries: List[Any],
|
|||
randao_mix=ZERO_HASH,
|
||||
next_seed=ZERO_HASH,
|
||||
shard_committees_at_slots=initial_shuffling + initial_shuffling,
|
||||
persistent_committees=split(shuffle(initial_validator_registry, ZERO_HASH), SHARD_COUNT),
|
||||
persistent_committees=initial_persistent_committees,
|
||||
persistent_committee_reassignments=[],
|
||||
|
||||
# Finality
|
||||
|
|
Loading…
Reference in New Issue