alpenglow: improve replay, leader packing, and vote latency - #279
Closed
7layermagik wants to merge 22 commits into
Closed
7layermagik wants to merge 22 commits into
7layermagik wants to merge 22 commits into
Conversation
This was referenced Sep 24, 2026
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.
Busy Alpenglow slots leave avoidable work between shred arrival, transaction execution and vote enqueue. This consolidates the streaming-verification and leader-packing branches with the subsequent certificate, vote-persistence, replay-progress and checkpoint fixes into one PR against current
alpenglow-dev(33dde405).The implementation is organized into focused commits. Start with the review guide, which maps each subsystem to its tests, operating contract and benchmark evidence. Generated benchmark output is retained but collapsed in the diff.
Changes
--wait-to-vote-slot, and one ordered background history writer. Preserve detailed decisions, fail closed on writer faults, seal clean shutdowns, and conservatively gate voting and leadership after uncertain recovery. Default history persistence remains synchronous.FEC acceleration remains in #259; the small shared DATA_COMPLETE boundary correctness fix is included for streaming. Genesis bootstrap remains in #276, and #278's skipped-parent replay work is separate. This incorporates the existing
7layer/streaming-sigverifyand7layer/leader-block-packingbranches without opening duplicate PRs.Benchmarks and scope
Ryzen 7 9700X / Go 1.26.4. These are stage measurements, not a combined whole-validator speedup:
alpenglow-dev,33dde405alpenglow-dev,33dde405The bank fixture uses unique 198-byte, single-signature transactions and three alternating paired rounds. It excludes signature verification, real AccountsDB, broadcast and consensus. It also checks the applicable cost limit and round-trips emitted entries through shreds.
Separately, a synthetic tip workload of 33,760 valid 1,232-byte transactions arriving over 200 ms measured final-shred-to-ready 99.89 → 6.504 ms with overlap disabled/enabled on the same extracted implementation. This is explicitly not development-head versus PR; both sides use the new Narya/batching/completion code. Historical component comparisons retain their original intermediate baselines.
The live checkpoint trial recorded 29–34 µs replay-side captures across ten checkpoints; worker encoding still cost 179–367 ms. Live trials also include the separate FEC/producer work, and the running binary is not identical to this independent PR. Changing workload and restart conditions prevent attributing all observed FAST-score improvement to this patch. Full methods, raw outputs and exclusions are linked from the review guide.
Validation
regression-testsCI job running complete race suites for Alpenglow, consensus, replay, Turbine, signature verification, block production/scheduling and node startup. The exact command passed locally and in Linux CI atbcada839; scheduler vet and a complete local build also passed.pkg/sealevelhas 19 BPF-loader test failures ending in anUpgradeableLoaderClosepanic. Unchanged33dde405reproduces the same failures on both machines. Baseline and candidate logs are included in the validation report.Recovery and remaining limits
Reserved voting is experimental and opt-in. Enrolling advances the history format and adds a signed reservation; preserve both safety files across restarts and AccountsDB recovery. Software crash tests and clean testnet restarts are not host power-loss or mainnet qualification. The recovery contract describes initialization, clean-marker consumption, leader gates, uncertainty handling and halted-cluster behavior.
The queue follow-up fixes heap retention: after consuming 100,000 higher-priority entries, its regression retains one entry in each heap for the one remaining active transaction. Local M4 microbenchmarks measured median removal cost of 143 → 188 ns with equal rewards and 254 → 274 ns with mixed rewards; this is the cost of immediate counterpart removal, not a net-validator speedup. Queue validation and raw evidence. The current slot-local scan/retry policy is unchanged. Effects on live block fullness and FAST scores remain unmeasured, and remaining reward/FAST omissions are follow-ups. The live validator, continuous own-leader load and both monitors were left running during PR preparation; runtime keys, faucet/controller automation and live ledgers are not included.