See also "Preconf Lookahead and MaxEB" by Lin Oshitani.
BeaconState
(see get_beacon_proposer_index
).compute_proposer_index
. Before EIP-7251, a candidate proposer selected based on their effective balance by comparing their effective balance with a randomly sampled byte (which is an integer, ) using the following condition:compute_proposer_index
is changed in Electra (because of EIP-7251). The random byte is now 16 bits () and MAX_EFFECTIVE_BALANCE_ELECTRA
is 2048 ETH. Thus, the proposer loops through validator indices and checks the following condition:As mentioned in Lin's doc, the epoch N-2 RANDAO is used as input to the proposer selection in epoch N (see get_seed
). As such, during epoch N-1 (once the epoch N-2 RANDAO is fixed) predicting the proposers for epoch N should be feasible. However, at epoch boundaries, effective balances (which are still in 1 ETH increments) are now more likely to change through reward accrual (for compounding validators with >32 ETH balances), consolidations, and deposits (see process epoch
). Why does this matter? Imagine the following scenario:
Before electra, effective balance changes could still occur in many ways (e.g., due to an inactive validator balance decreasing or a full withdrawal taking place). After electra, there are simply more ways the effective balance can change, leading to a more difficult-to-predict leader schedule.