Skip to content

fix(drive-abci): verify vote extensions against the withdrawals of their own round - #5010

Merged
QuantumExplorer merged 2 commits into
v4.2-devfrom
fix/verify-vote-extensions-per-round
Sep 27, 2026
Merged

QuantumExplorer merged 2 commits into
v4.2-devfrom
fix/verify-vote-extensions-per-round

Conversation

@QuantumExplorer

@QuantumExplorer QuantumExplorer commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

Each block dequeues up to 4 queued credit withdrawals and turns them into unsigned Core asset unlock transactions. build_unsigned_transaction writes the proposal's chain-locked core height into each one as request_height, extend_vote asks validators to sign them in their precommit vote extensions, and finalize_block broadcasts them.

verify_vote_extension checked only that a vote's height matched the block execution context, and accepted any round because "withdrawal transactions to sign are the same for any round of the same height". It then compared the vote with the withdrawal transactions of the last proposal this node processed.

That assumption does not hold when a height goes past round 0 and a new chain lock arrives between rounds. The next proposer uses the newer core height, so its withdrawal transactions have a different request_height and a different txid. A valid precommit from a validator that holds the other round's proposal was then rejected, with an ERROR log (votes extensions ... mismatch). In the other direction, a vote for a round this node had not processed yet was accepted whenever its extensions matched the last proposal, although nothing showed they were the ones signed for that round.

The effect is liveness only, and only while withdrawals are queued (with none queued both sides are empty and match). A rejected precommit does not count, so a round can fail to gather enough votes and Tenderdash moves on to another round (the dashmate base genesis uses a 10 s + 1 s per round vote timeout). There is no app hash effect and no fund risk.

What was done?

Withdrawals are kept per round. UnsignedWithdrawalTxsByRound holds the unsigned withdrawal transactions of every proposal this node accepted at the current height, keyed by round, with the block hash. process_proposal records the accepted proposal after every Accept, and finalize_block clears the record once the height is decided. It lives on the ABCI application next to the block execution context (a new BlockExecutionApplication::unsigned_withdrawal_txs_by_round). It is node memory, not consensus state.

Each vote is verified against its own round. verify_vote_extension now:

  • compares a vote for a block this node accepted with the withdrawal transactions it built for that height, round and block, and still rejects a mismatch with an ERROR log. A cross-round mismatch can no longer reach this path;
  • rejects a vote for a block this node has not accepted (another height, a round whose proposal has not arrived yet, another block in an accepted round), with a debug log. The reasoning is in a comment and below. Before any proposal of the height this matches the previous behaviour, which rejected votes when there was no block execution context.

The misleading "same for any round" comment is gone.

What Tenderdash does (v1.8.0, the version rs-tenderdash-abci v1.8.0 is built from and dashmate runs)

  • VerifyVoteExtension is only called for non-nil precommits of other validators at the current height, in any round. The height filter runs before the call (addVoteValidateVoteMw, addVoteVerifyVoteExtensionMw, wired at L66-L74). So precommits of a round this node has not processed, earlier or later, do reach the app.
  • Before the call, Tenderdash verifies the vote's block and extension signatures against the validator's key (same middleware). The block signature covers the canonical vote only, not the extensions (CanonicalVote), and each extension is checked on its own against the extensions the vote carries (quorum_sign_data.go L60-L124). Platform's extensions carry a sign request id, and a raw threshold extension with one is bound to neither height nor round (ThresholdRawVoteExtension.SignItem). So a precommit whose extensions were dropped, or replaced with the same validator's extensions from another round, still verifies.
  • Once a validator's vote for a block is stored, a later copy with the same block signature is a duplicate, whatever its extensions (vote_set.go L279-L286).
  • A Reject turns into invalid vote extension (execution.go L669-L695): the vote is dropped and not added to the vote set, and the peer is not penalised (voteMessageHandler).
  • A rejected vote can reach the node again: a node reports the votes it has for a round (VoteSetBits), and a peer then sends the ones it lacks (ApplyVoteSetBitsMessage). A node that falls behind catches up through the commit.
  • The ABCI++ spec says an application should accept unless it really knows the liveness cost of rejecting (abci++_methods.md, VerifyVoteExtension). The cost here is known and bounded: a vote that arrives before the node accepted its block is dropped and can be sent again.
  • Threshold signatures for vote extensions are recovered only from the group of precommits whose signed extension vector is identical and holds the quorum's recovery threshold of voting power (canonicalVoteExtensionGroup). A vote with different extensions is kept, but its shares are never mixed in, and recovery waits until such a group exists (vote_set.go L436-L452).
  • FinalizeBlock always follows a ProcessProposal of the decided block and round: ApplyCommit calls mustEnsureProcess, which re-runs ProcessProposal when the last one was for another round (state_apply_commit.go L61, ensureProcess). So finalize_block_proposal never sees a round mismatch from this, and it keeps matching the commit's threshold vote extensions against its own withdrawal transactions for the decided block.

Why a vote for a block this node has not accepted is rejected

Without the block, the node cannot tell which transactions the vote should carry, and nothing in the vote shows its extensions are the ones the validator signed for that block: they may have been dropped in part or entirely, reordered, or taken from the same validator's vote in another round, and the vote still verifies. If enough such votes were counted, a group with extensions other than the block's could reach the recovery threshold, and the commit it forms would then fail in finalize_block, which matches the recovered extensions against its own withdrawal transactions. Accepting only extensions that exactly match what this node built for that height, round and block rules this out, including for the vote the previous handler accepted because it matched the last proposal. The cost is that a vote arriving before its block is dropped, which Tenderdash can make up by sending it again.

What differs between rounds

process_proposal replaces the block execution context for each new round, and each proposal runs in a fresh transaction on the same committed state. The rounds of one height dequeue the same queued withdrawals and use the same validator set quorum hash; what changes with a newer chain lock is request_height, and with it the txid validators sign.

Before / after

A height where round 0 was proposed at chain-locked core height 1000 and round 1 at 1001, with one withdrawal queued. This node processed round 0, then round 1. Another validator's round 0 precommit then arrives, carrying the round 0 extension (txid of the transaction with request_height 1000).

Before:

verify_vote_extension(height H, round 0, extension = txid@1000)
  compared with the last processed proposal (round 1, txid@1001)
  ERROR votes extensions for height: H, round: 0 mismatch
  -> Reject (the precommit is dropped)

After:

verify_vote_extension(height H, round 0, extension = txid@1000)  -> Accept
verify_vote_extension(height H, round 1, extension = txid@1001)  -> Accept
verify_vote_extension(height H, round 0, extension = txid@1001)  -> Reject (ERROR mismatch, as before)
verify_vote_extension(height H, round 0, no extensions)          -> Reject (ERROR mismatch, as before)
verify_vote_extension(height H, round 2, anything)               -> Reject (round not accepted here, debug log)

And with only round 0 processed, a round 1 precommit carrying the round 0 extension:

before: matches the last processed proposal (round 0)  -> Accept
after:  round 1 not accepted here                      -> Reject

No version gate

The handler is not versioned and touches no state: it only decides which precommits this node counts. Mixed old and new nodes differ only in which votes they accept, and the app hash cannot change.

How Has This Been Tested?

  • verify_vote_extension unit tests, rewritten around the per-round record: a round 0 vote at the older core height is accepted after round 1 was processed at a newer one, and round 1's vote too; a round 0 vote carrying round 1's withdrawals, made-up bytes, no extensions, only some of them or them reordered is rejected; votes for another height, for a round or a block this node has not accepted (with honest, stripped or another round's extensions) and before any proposal of the height are rejected.
  • UnsignedWithdrawalTxsByRound unit tests: rounds kept apart, a round's block replaced, a new height starts empty, clear forgets everything.
  • finalize_block test: finalizing a height clears the record.
  • Strategy test vote_extension_round_tests, through the real handlers: after a short chain with one queued withdrawal, process_proposal runs round 0 at the last chain-locked core height and round 1 at the next one, extend_vote gives the two different extensions each round signs, and verify_vote_extension accepts each round's own, and rejects round 1's extensions in a round 0 vote. Before round 1 is processed, it rejects a round 1 vote carrying round 0's extensions and a round 0 vote without extensions.
  • The strategy test fails against the base handler (only verify_vote_extension.rs reverted): the round 1 vote carrying round 0's extensions comes back as Accept, and with that assertion out of the way the round 0 precommit comes back as Reject after round 1 was processed.
  • Run locally: cargo test -p drive-abci --lib -- abci:: unsigned_withdrawal_txs_by_round (129 passed), cargo test -p drive-abci --lib -- withdrawal (199 passed), cargo test -p drive-abci --test strategy_tests -- vote_extension_round_tests process_proposal_collision_tests (6 passed), cargo clippy -p drive-abci --all-features --all-targets -- -D warnings, cargo fmt --all -- --check. The full workspace suite is left to CI.

Breaking Changes

None. BlockExecutionApplication gains a required method; its only implementors are the ABCI applications in drive-abci.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed
  • If I added or changed GroveDB structure, I described it in the area's structure.rs, regenerated grovedb-structure.json, and checked the structure viewer link posted on this pull request

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

🤖 Generated with Claude Code

PR Hygiene · dfd9c09

  • Bots — coderabbitai ✓ · thepastaclaw ✓
  • Self-review — post /self-reviewed
  • Within your 5 open PRs
  • Build green
  • Approvals — you own every area touched; none needed

When every box is checked the PR Hygiene check passes and this can merge.

Summary by CodeRabbit

  • New Features
    • Vote extensions are now matched to the exact accepted block, height, and round. Extensions that are missing, out of order, or associated with an unaccepted proposal are rejected.
    • Accepted proposals’ unsigned withdrawal transactions are tracked separately by round and cleared when the block height is finalized.
  • Tests
    • Added coverage for round-specific vote verification, mismatched extensions, and unaccepted blocks or rounds.

…eir own round

The unsigned withdrawal transactions a proposal asks validators to sign
carry its chain-locked core height as their request height. When a new
chain lock arrives between two rounds of one height, the later proposal
asks for signatures on different transactions. verify_vote_extension
accepted votes of any round but compared them with the last proposal this
node processed, so a valid precommit of the other round was rejected and
dropped, which can cost an extra round while withdrawals are queued.

process_proposal now keeps the withdrawal transactions of every proposal
it accepts at the current height, by round and block hash, and
finalize_block clears them. A vote is compared with the proposal of its
own round and block and still rejected on a mismatch. A vote for a block
this node has not accepted is accepted, as the ABCI++ spec asks: Tenderdash
checked its signatures, this node only signs in extend_vote, Tenderdash
recovers threshold signatures only from identical extensions holding the
quorum threshold, and finalize_block still matches the recovered
extensions against this node's own withdrawals. The handler is not
versioned and touches no state, so there is no version gate.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added this to the v4.2.0 milestone Sep 26, 2026
@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: dashpay/platform/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: d5517263-5f01-4ee3-8338-c7c653528515

📥 Commits

Reviewing files that changed from the base of the PR and between 1f50695 and dfd9c09.

📒 Files selected for processing (12)
  • packages/rs-drive-abci/src/abci/app/consensus.rs
  • packages/rs-drive-abci/src/abci/app/full.rs
  • packages/rs-drive-abci/src/abci/app/mod.rs
  • packages/rs-drive-abci/src/abci/handler/finalize_block.rs
  • packages/rs-drive-abci/src/abci/handler/process_proposal.rs
  • packages/rs-drive-abci/src/abci/handler/verify_vote_extension.rs
  • packages/rs-drive-abci/src/platform_types/withdrawal/mod.rs
  • packages/rs-drive-abci/src/platform_types/withdrawal/unsigned_withdrawal_txs_by_round.rs
  • packages/rs-drive-abci/src/test/helpers/mod.rs
  • packages/rs-drive-abci/src/test/helpers/withdrawals.rs
  • packages/rs-drive-abci/tests/strategy_tests/test_cases/mod.rs
  • packages/rs-drive-abci/tests/strategy_tests/test_cases/vote_extension_round_tests.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The application now records unsigned withdrawal transactions for accepted proposals by height, round, and block hash. Vote-extension verification checks the record for the request’s exact height, round, and block hash. Block finalization clears the records.

Changes

Withdrawal vote verification

Layer / File(s) Summary
Round-indexed withdrawal state
packages/rs-drive-abci/src/platform_types/withdrawal/*, packages/rs-drive-abci/src/abci/app/*
Adds UnsignedWithdrawalTxsByRound with insert, exact-match lookup, and clear operations. Adds the state and its accessor to the application trait and implementations.
Accepted proposal recording and vote verification
packages/rs-drive-abci/src/abci/handler/process_proposal.rs, packages/rs-drive-abci/src/abci/handler/verify_vote_extension.rs
Stores withdrawals for accepted proposals. Verification rejects requests without a matching record and compares supplied extensions with the recorded withdrawals. Tests cover matching and mismatching rounds, blocks, heights, and extensions.
Finalization cleanup and regression coverage
packages/rs-drive-abci/src/abci/handler/finalize_block.rs, packages/rs-drive-abci/src/test/helpers/*, packages/rs-drive-abci/tests/strategy_tests/test_cases/*
Clears withdrawal records during block finalization. Adds helper transactions and strategy tests for proposal and vote-extension handling across rounds.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant process_proposal
  participant UnsignedWithdrawalTxsByRound
  participant verify_vote_extension
  participant finalize_block
  process_proposal->>UnsignedWithdrawalTxsByRound: Store accepted proposal withdrawals by height, round, and block hash
  verify_vote_extension->>UnsignedWithdrawalTxsByRound: Look up withdrawals using request height, round, and block hash
  UnsignedWithdrawalTxsByRound-->>verify_vote_extension: Return matching withdrawals or no match
  verify_vote_extension-->>verify_vote_extension: Compare vote extensions with recorded withdrawals
  finalize_block->>UnsignedWithdrawalTxsByRound: Clear all stored rounds
Loading

Suggested reviewers: thepastaclaw, pastapastapasta

Merge Risk: ⚪ Minimal · up to dfd9c

No actionable merge-blocking defect is established. The behavior of votes received before proposal acceptance remains unverified against the pinned Tenderdash version.

Security Architecture Review

Security architecture risk: 🟡 Moderate · up to dfd9c

Matching votes to their own proposal addresses the reported round-to-round mismatch. The new requirement that this node must already have accepted that exact proposal can also reject an otherwise valid vote, potentially delaying consensus.

Retained concerns

  • Medium · reliability · inferred: Requiring a locally accepted record for the exact round and block hash can drop a valid precommit received before that proposal, even when its withdrawals match those already known at the height. This widens a consensus-liveness failure mode beyond the reported round-specific mismatch.
Security review details

Security Blast Radius

  • inferred — The affected decision is whether a validator counts a precommit for a block; repeated rejection can affect consensus progress. The evidenced change stays within the consensus application, not a new external service or credential boundary.

Trust Boundaries and Controls

  • observed — The vote request supplies the height, round, hash, and extensions. The verifier uses node-owned accepted-proposal state to select expected withdrawals and rejects missing records or unequal extensions.

Resilience and Maintainability Implications

  • inferred — Failing closed for an unseen proposal protects the extension comparison but depends on proposal arrival and local state retention for liveness. The available evidence does not resolve verification retries after an interrupted finalization.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 63.83% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 47 functions across 12 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise, specific, and accurately summarizes the main change: verifying vote extensions against withdrawals for the correct round.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Sep 26, 2026
@thepastaclaw

thepastaclaw commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Final review complete — no blockers (commit dfd9c09) · triage: critical

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final validation — Phase 1 + Phase 2

At c75ff0b, the per-round cache fixes cross-round withdrawal comparisons, but accepting votes on a cache miss introduces a blocking denial-of-service path. Inspection of the pinned Tenderdash implementation confirms that stripping extensions preserves vote authentication and can produce a commit that Platform cannot finalize. The test-helper suggestion was dropped because the fixtures serve different purposes and do not require matching values.

🔴 1 blocking

Review provenance

Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: muse-spark-1.3-contributor (agent: phase1-reviewer, role: architecture-layering); reviewer 3: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); reviewer 4: muse-spark-1.3-contributor (agent: phase1-reviewer, role: security-auditor); reviewer 5: gpt-6-astra (agent: phase2-reviewer, role: general); reviewer 6: gpt-6-astra (agent: phase2-reviewer, role: architecture-layering); reviewer 7: gpt-6-astra (agent: phase2-reviewer, role: rust-quality); reviewer 8: gpt-6-astra (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6-astra (agent: astra-verifier, role: final-verifier)

  • Triage: critical by gpt-6-astra (effort low) — The diff intricately changes consensus vote acceptance in packages/rs-drive-abci/src/abci/handler/verify_vote_extension.rs, including accepting unrecognized proposals' withdrawal extensions, with round-specific state maintained across process_proposal and finalize_block.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer, muse-spark-1.3-contributor — architecture-layering (completed, effort xhigh); agent phase1-reviewer, muse-spark-1.3-contributor — rust-quality (completed, effort xhigh); agent phase1-reviewer, muse-spark-1.3-contributor — security-auditor (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity below 15% reserve: weekly 13% left, 5h 100% left), glm-5.3-flash (not used above high effort; tier asks max)
  • Fresh verifier: gpt-6-astra — final-verifier; agent astra-verifier
  • Phase 2 reviewers: gpt-6-astra — general (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — architecture-layering (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — rust-quality (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — security-auditor (completed, effort xhigh); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.

In `packages/rs-drive-abci/src/abci/handler/verify_vote_extension.rs`:
- [BLOCKING] packages/rs-drive-abci/src/abci/handler/verify_vote_extension.rs:81-83: Accepting unchecked votes lets peers strip extensions and poison the commit
  When a block contains withdrawals, a gossip peer can copy honest precommits, remove their entire extension list, and deliver them before the target processes that proposal. No validator key is required: in the pinned Tenderdash commit b277e2c7b73037a34fd350e3417110f018f1e647, `Vote.ToCanonicalVote` excludes extensions, and `QuorumSignData.VerifyVoteExtensions` succeeds for an empty list. This new cache-miss branch accepts those modified votes; the previous handler rejected votes without an execution context and rejected empty extensions against nonempty withdrawals.

  Threshold grouping does not authenticate the omission. `VoteSet.canonicalVoteExtensionGroup` counts the stripped votes toward the empty-vector group, allowing recovery of a valid block signature with no withdrawal extensions. Subsequently received originals cannot repair the vote set: `VoteSet.addVote` treats the same validator/block signature as a duplicate regardless of its extensions.

  Once the proposal arrives, `ProcessProposal` computes its withdrawals but does not revalidate those admitted votes. Tenderdash's `ApplyCommitAction.Execute` saves the commit before finalization. Platform then returns `VoteExtensionMismatchReceived` because the recovered extensions are empty, and Tenderdash panics on the finalization error, leaving the invalid-for-Platform commit saved for replay. An unprivileged peer that wins delivery ahead of the proposal can therefore halt the target without forging a signature or controlling quorum voting power. Do not let unchecked votes enter the recoverable vote set: defer admission until the complete extension vector can be validated, or require cryptographic authentication of that complete vector before enabling this fallback. Finalization checks protect withdrawal integrity but occur too late to prevent this denial of service.

@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Your move: thepastaclaw requested changes on this head; dismiss the review or push a fix; thepastaclaw left review threads unresolved; resolve them.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. and removed waiting-bots Waiting for the review bots to report on this head labels Sep 26, 2026
…accepted

A precommit's block signature does not cover its vote extensions, and
Platform's withdrawal extensions carry a sign request id that binds their
signatures to neither height nor round. A relaying peer can therefore
strip some or all of a precommit's extensions, or swap in the same
validator's extensions from another round, and the vote still verifies in
Tenderdash. Accepting such a vote for a block this node has not accepted
could let extensions other than the block's reach the recovery threshold,
and the commit they form would then fail in finalize_block.

A vote is now accepted only when its extensions exactly match the
withdrawal transactions this node built for the same height, round and
block. Everything else is rejected, including a vote for a round whose
proposal has not reached this node yet, as it was before when no block
execution context existed. Comparing a vote for an unprocessed round with
another round's withdrawals, as the previous handler did, accepted
transplanted extensions; that is closed too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added waiting-bots Waiting for the review bots to report on this head and removed waiting-self-review Waiting for the author to post /self-reviewed bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. labels Sep 26, 2026

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review — Final validation — Phase 1 + Phase 2

Verified the complete PR diff at dfd9c09: the prior unchecked-vote admission vulnerability is fixed, and no actionable in-scope findings remain. Independent validation passed 13 verifier/cache/finalization unit tests, 6 round-isolation/proposal-collision strategy tests, and git diff --check; the worktree remains unchanged. A separately verified, pre-existing direct-commit denial-of-service path is retained for internal follow-up and does not block this PR.

🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)

Review provenance

Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: muse-spark-1.3-contributor (agent: phase1-reviewer, role: architecture-layering); reviewer 3: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); reviewer 4: muse-spark-1.3-contributor (agent: phase1-reviewer, role: security-auditor); reviewer 5: gpt-6-astra (agent: phase2-reviewer, role: general); reviewer 6: gpt-6-astra (agent: phase2-reviewer, role: architecture-layering); reviewer 7: gpt-6-astra (agent: phase2-reviewer, role: rust-quality); reviewer 8: gpt-6-astra (agent: phase2-reviewer, role: security-auditor); reviewer 9: gpt-6-astra (agent: phase2-reviewer, role: general); reviewer 10: gpt-6-astra (agent: phase2-reviewer, role: architecture-layering); reviewer 11: gpt-6-astra (agent: phase2-reviewer, role: rust-quality); reviewer 12: gpt-6-astra (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6-astra (agent: astra-verifier, role: final-verifier)

  • Triage: critical by gpt-6-astra (effort low) — The diff intricately changes consensus vote acceptance in packages/rs-drive-abci/src/abci/handler/verify_vote_extension.rs by binding withdrawal extensions to height-, round-, and block-specific proposal records whose lifecycle spans process_proposal and finalize_block.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer, muse-spark-1.3-contributor — architecture-layering (completed, effort xhigh); agent phase1-reviewer, muse-spark-1.3-contributor — rust-quality (completed, effort xhigh); agent phase1-reviewer, muse-spark-1.3-contributor — security-auditor (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity below 15% reserve: weekly 13% left, 5h 100% left), glm-5.3-flash (not used above high effort; tier asks max)
  • Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
  • Fresh verifier: gpt-6-astra — final-verifier; agent astra-verifier
  • Phase 2 reviewers: gpt-6-astra — general (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — architecture-layering (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — rust-quality (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — security-auditor (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — general (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — architecture-layering (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — rust-quality (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — security-auditor (completed, effort xhigh); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.

No unresolved findings remain from the prior review on this head.
Out-of-scope follow-up suggestions (1)

These are valid observations, but they are outside this PR's scope and should be handled in separate issues or author/maintainer-requested PRs rather than blocking this review.

  • Validate received commits' complete extension vectors before persistence — The pinned Tenderdash source routes CommitMessage through TryAddCommitAction without calling verify_vote_extension. A peer can strip all threshold vote extensions from an otherwise valid commit: the block signature does not authenticate that list, and extension verification succeeds when both derived extension and signature lists are empty. ApplyCommitAction saves the commit before Platform rejects the missing withdrawals in finalize_block_proposal, after which Tenderdash panics, leaving the modified commit persisted for replay. This direct-commit path and persistence ordering predate the PR and are unchanged by it.
    • Follow-up: Track a separate security fix that validates received commits' complete extension vectors against the executed block before persistence, with a regression delivering a stripped commit before the honest original.

@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Sep 26, 2026
@QuantumExplorer
QuantumExplorer merged commit 5e4b799 into v4.2-dev Sep 27, 2026
26 of 27 checks passed
@QuantumExplorer
QuantumExplorer deleted the fix/verify-vote-extensions-per-round branch September 27, 2026 02:33
QuantumExplorer added a commit that referenced this pull request Sep 27, 2026
…epted

The exception accepted an empty vote for a block this node had not
accepted when a block accepted at the same height had no withdrawals
and no protocol upgrade was pending. It relied on every round of a
height dequeuing the same withdrawals, which holds for the current
block pipeline but is enforced by nothing, and a change to when expired
withdrawals are re-queued would break it silently. A vote for a block
this node has not accepted is rejected again, as #5010 does; the cost
is that a node that has not processed a later round's block yet waits
for the commit at heights without withdrawals.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-self-review Waiting for the author to post /self-reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants