Repository navigation
fix(alpenglow): fault picker whale overshoot & dead-slot hero tx loss - #2
Merged
Merged
Conversation
…ro tx loss Seed 9684: fault picker, not consensus. Pareto draw gave node 0 94.6% of stake. Picker took all 11 small nodes (5.4%), fell short, then "overshoot with one more node" grabbed the only one left: the whale. 100% offline, zero blocks, hero never submitted. Same code on main, so pre-existing. Fix: overshoot only when it lands closer to target than stopping short. New unit tests stake_pct_never_overshoots_with_a_whale, stake_pct_lands_near_target_for_pareto_stakes. Seed 19 (n=12): dead-slot inclusion. Leader kept producing slices for slots already Skip-certified. Hero landed in dead slot 2 after its Skip cert, so skip handler never fired, RPC saw block, stopped retrying. Fix: leader stops producing once Pool has Skip cert for slot; receivers ignore hero in skipped slot. Evidence - Sweep 164 seeds × 19.1% offline: 0 failures (was 5/104 before fixes). - cargo test --workspace green, 18 unit + 4 property tests. - Builtin scenario timings unchanged, wasm rebuilt, 4 Playwright specs pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two Alpenglow liveness bugs, both surfaced by the
alpenglow_20pct_offline_is_safe_and_liveproptest at ~19% offline:Target::StakePctovershoot heuristic grabbed the 94.6% whale when the 11 small nodes only summed to 5.4% → 100% offline, zero blocks, hero never submittedwith.abs_diff(goal) < acc.abs_diff(goal))produce_slicewhenpool.is_skipped(slot);on_block_completeno longer treats a block in a skipped slot as "landed"Changes
crates/sim-core/src/scenario.rs— overshoot guard refinement + 2 new unit tests (stake_pct_never_overshoots_with_a_whale,stake_pct_lands_near_target_for_pareto_stakes)crates/sim-core/src/protocol/alpenglow/mod.rs— dead-slot guard inproduce_slice+ skip check inon_block_completeCLAUDE.md— documents both fixes and the picker caveatweb/e2e/screenshots/compare-leader-down.png— regeneratedVerification
cargo test --workspace— 22/22 pass (18 unit + 4 property, incl.alpenglow_20pct_offline_is_safe_and_live)Caveat
The picker can now land below the target when stake is whale-dominated (19% → ~5% realized). Correct per the fix and documented in CLAUDE.md; the proptest liveness bound still holds since realized offline ≤ target.