fix: emit nothing for a proof-less vote and drop blocks the stage already holds - #46
Merged
adust09 merged 1 commit intoSep 11, 2026
Conversation
Two defects from the three-node devnet5 run behind #42. build_block turned a block-carried vote — filed into the counted pool with an empty proof set by seed_block_votes, as leanSpec does — into a body attestation with no voters and an empty component list, and the proposer's fold then gave leanVM nothing to aggregate, losing the slot's proposal. leanSpec's builder emits one attestation per selected proof, so a proof-less vote is processed and contributes nothing; select_votes now keeps a processed set apart from the selected groups and does the same. The verification stage verified, and the chain task re-committed, every copy of a block that reached it (gossip plus sync fetches: up to four imports of one slot in the run). A block the snapshot holds is dropped before the registry lookup, an item already parked is not parked twice, the import returns before the commit for a known root, and a duplicates counter records both. Closes #43. Closes #45. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
adust09
deleted the
fix/43-45-proofless-votes-and-dedup-20260911-1620
branch
September 11, 2026 08:49
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 defects found in the three-node devnet5 run behind #42, both now fixed with the failing case pinned by a test.
#43 — a vote with no proof no longer becomes an empty attestation
seed_block_votesfiles every vote a block carries into the counted pool with an empty proof set, on purpose (a block's merged proof is never split back per vote; leanSpec does the same). leanSpec'sbuild_blockemits one attestation per selected proof, so such a vote is marked processed and contributes nothing. Verity'sselect_votesinstead pushed every eligible vote into the body, giving one attestation with no voters and an empty component list; the proposer's fold then handed leanVM nothing to aggregate and the slot's proposal was lost:select_votesnow keeps aprocessedset apart from the selected groups: a vote whose coverage selection is empty is done with, counts against the distinct-vote budget, and emits nothing — leanSpec's shape. Two tests cover it: the proof-less vote alone, and a proof-less vote beside one that has a proof.#45 — the verification stage drops what it already holds
The stage verified, and the chain task re-committed, every copy of a block that reached it: gossip plus a sync fetch, or two peers answering the same request. In the run,
slot=25andslot=37were imported four times each (~90 ms of proof verification and a 230 KB proof write per copy). Now:chain.rs::importreturns before the commit for a root the store already has — the window between the stage's snapshot and the import's own;StageCounters::duplicatescounts both, forverity-metricsto pick up.Two stage tests exercise the first two paths over a genesis snapshot. The peer-churn half of #45 (ethlambda's QUIC drops while proving on the shared host) is a test-environment property and is not addressed here.
Validation
cargo fmt --all --check,cargo clippy --locked --workspace --all-targets -- -D warnings,cargo test --locked --workspace,cargo deny --locked check— all green.Closes #43. Closes #45.
🤖 Generated with Claude Code