From de32e25bfc1c558534b423d7b22ceb6b5e0c1519 Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Sun, 9 Dec 2018 08:47:30 -0600 Subject: [PATCH] fix initial initial persistent_committees (#258) * fix initial persistent_committees * initial persistent commmitees from active validator indices --- specs/core/0_beacon-chain.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index eb4bff1ec..b621f83c0 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -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