diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index daa1bc108..5ca59c66b 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -1014,7 +1014,13 @@ def get_beacon_proposer_index(state: BeaconState, assert previous_epoch <= epoch <= next_epoch - first_committee, _ = get_crosslink_committees_at_slot(state, slot, registry_change)[0] + first_committee, _ = get_crosslink_committees_at_slot(state, slot, registry_change)[0] i = 0 + while i < len(first_committee): + rand_byte = hash(generate_seed(get_current_epoch(state)) + int_to_bytes8(i // 32))[i % 32] + candidate = first_committee[(epoch % i) % len(first_committee)] + if get_effective_balance(state, candidate) * 256 > MAX_DEPOSIT_AMOUNT * rand_byte: + return candidate + i += 1 return first_committee[epoch % len(first_committee)] ```