Problem Statement / Feature Objective
The validator activation queue processes pending validators in FIFO order by activation_epoch. When the queue is updated mid-epoch after a reorg, the epoch assignment computation uses a strict inequality (activation_epoch > current_epoch) instead of greater-than-or-equal, causing the validator at the boundary to be skipped entirely and never activated.
Technical Invariants & Bounds
- MAX_PENDING_VALIDATORS = 8192 (queue depth).
- Activation delay: 4 epochs (MIN_VALIDATOR_WITHDRAWABILITY_DELAY).
- Queue processed once per epoch boundary.
- Off-by-one causes exactly one validator per epoch boundary to be permanently stuck.
- Affected validators can still submit attestations but never receive rewards.
Codebase Navigation Guide
- src/validator/activation-queue.rs - process_activation_queue() and compute_activation_epoch().
- src/validator/validator-set.rs - activate_validator() that mutates state.
- src/state/epoch-transition.rs - epoch_transition() that triggers queue processing.
- tests/validator/activation_queue_test.rs - unit and integration tests.
Implementation Blueprint
- In src/validator/activation-queue.rs, locate the condition if activation_epoch > current_epoch and change it to >= .
- Audit all other inequality comparisons in the same module for similar off-by-one patterns.
- Add a regression test that sets up a pending validator with activation_epoch exactly equal to current_epoch and asserts it is activated.
- Verify that the fix does not double-activate validators by adding a test where multiple validators share the boundary epoch.
- Run the full validator test suite to confirm no regressions in exit or withdrawal logic.
Problem Statement / Feature Objective
The validator activation queue processes pending validators in FIFO order by activation_epoch. When the queue is updated mid-epoch after a reorg, the epoch assignment computation uses a strict inequality (activation_epoch > current_epoch) instead of greater-than-or-equal, causing the validator at the boundary to be skipped entirely and never activated.
Technical Invariants & Bounds
Codebase Navigation Guide
Implementation Blueprint