Repository navigation
refactor(state): replace commit-verification memo with typed VerifiedCommit token - #1456
Conversation
…tion VerifyCommitSignatures verifies a commit exactly as ValidatorSet.VerifyCommit does and, on success, returns a CommitVerification recording the chain, height, block ID, quorum, threshold key and the signed digests and signatures it checked. ValidatorSet.VerifyCommitUnlessVerified skips the threshold verification only when a verification covers exactly those inputs. Anything else, including the zero value, falls through to the unchanged verifyCommit, so its typed errors (ErrInvalidCommitSignature versus the untyped vote-extension count mismatch and budget exhaustion) are preserved. verifyCommit is split into commitSignData and verifyCommitReportingSigns with every error path unchanged. Co-Authored-By: Claude Opus 5 <[email protected]>
…rification token BlockExecutor.VerifyCommit returns a types.CommitVerification instead of recording it in a private two-slot memo. ValidateBlock, ValidateBlockWithRoundState, FinalizeBlock and ApplyBlock take the verification of block.LastCommit explicitly. Block sync's applier threads the verification of each commit one block forward; consensus and the replayer pass the zero value and verify in full as before. The state_last_commit_verification_skipped metric keeps its meaning. Co-Authored-By: Claude Opus 5 <[email protected]>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
The WAL generator node is the only validator, so it proposes every round,
and replayPrevoter makes heights 3 to 5 commit only at round 10. The test
genesis gives round 10 a 30.5ms propose timeout. On a loaded runner (-race,
-coverprofile, several packages at once) that timer fires before the node's
own proposal is complete, so it prevotes nil and moves to round 11:
- at height 5, stopConsensusAtHeight(5, 11) halts consensus and the test
times out after 60s ("waited too long for tendermint to produce 5
blocks"), which is the failure seen on #1391, #1393 and #1410;
- at height 3 or 4, the commit lands past maxRound and the round assertion
fails.
Give the generator a 10s propose timeout. With a single proposer, a round
moves on as soon as the proposal is complete, so a longer timeout only
removes the race. UnsafeProposeTimeoutOverride is node-local and not a
consensus parameter, so the blocks are unchanged.
TestWALRoundsSkipperSlowProposer pins this. Its app holds PrepareProposal at
round 10 for three times the genesis propose timeout. Without the override
it fails every run; with it, it passes every run.
Once the test survives load, a second pre-existing flake surfaces. The
replaying State and its WAL keep running after Stop/Wait: receiveRoutine
exits only when it sees its context cancelled, and the services' ctx
watchers log asynchronously. Their logs through NewTestingLogger then land
after the test completes and panic the binary ("Log in goroutine after
TestWALRoundsSkipper has completed"). The test now logs through a writer
that is muted, under a lock, by its first-registered cleanup.
Co-Authored-By: Claude Opus 5 <[email protected]>
types.CommitVerification only carried proof metadata, checked against a
commit passed alongside it. It becomes types.VerifiedCommit: the commit
itself plus an optional proof.
type VerifiedCommit struct {
commit *Commit // the caller's pointer, the subject only
proof *commitProof // nil: no proof
}
commitProof keeps the nine fields CommitVerification recorded, with their
doc comments.
- VerifyCommitSignatures keeps its signature, checks and errors. It returns
the commit with a proof on success, and the zero VerifiedCommit on failure.
- NewUnverifiedCommit(commit) builds the no-proof variant. The zero value is
NewUnverifiedCommit(nil).
- Commit() returns the embedded pointer. Its doc spells out that it is not
evidence and must never be validated in place of the commit actually
received.
- checkMatches moves to *commitProof and treats a nil receiver as "nothing
was verified". It compares commit content only, never pointer identity.
- errCommitVerificationMismatch becomes errCommitProofMismatch.
Only the parameter types change at the call sites. block.LastCommit is
still read from the block, and the current-height commit parameter of
ApplyBlock/FinalizeBlock is untouched. Consensus (finalize, validate),
ProcessProposal and the replayer pass NewUnverifiedCommit(block.LastCommit);
the block-sync applier keeps the zero value where it holds no commit. Mocks
are regenerated with mockery v3.7.4.
Tests:
- the types tests are renamed to VerifiedCommit;
- the proof-mutation test pins with require.Same that the embedded commit
aliases the caller's pointer;
- a new case shows that a VerifiedCommit without proof, even one holding
the very commit being verified, never skips verification;
- the new TestBlockApplierSkipsTheLastCommitItVerified drives three blocks
through a real executor and asserts LastCommitVerificationSkipped reaches
0, 2 and 4. It fails if the applier hands the next block the commit
without its proof;
- metricspy gains a Counter for it.
Co-Authored-By: Claude Opus 5 <[email protected]>
GitHub Actions never picked up 0eccc06 (no check-suite created for it after 45+ minutes, unlike every prior push on this branch) — pushing an empty commit to force a fresh push event. Co-Authored-By: Claude Sonnet 5 <[email protected]>
|
🕓 Queued for automated review — 15th in line, estimated start in ~3.0 h (commit dacaefb)
|
…ifiedCommit NewUnverifiedCommit let any caller wrap an arbitrary commit into a value of a type named VerifiedCommit while attaching no proof at all -- a naming trap, and unused by anything that reads Commit(): nothing outside tests ever called it. The four call sites that used it to signal "no proof held" never read the commit back off the value either; they only pass it into VerifyCommitUnlessVerified, which already falls through to a full verification on any proof-less value, zero value included. Remove the constructor. The zero value is now the only proof-less VerifiedCommit that code outside types can produce, and it is the only one that matters in practice: consensus, the replayer and block sync's ProcessProposal path all switch to it. The still-exported Commit() and the commit field stay -- VerifyCommitSignatures is still the only way to end up with a VerifiedCommit that names a real commit, and it always pairs one with its proof. TestUnverifiedCommitMatchesNothing keeps its "holds the exact commit but no proof" case as an in-package struct literal: a white-box test proving the mismatch check would still refuse to skip verification even in that stronger, no-longer-reachable-from-outside scenario. Co-Authored-By: Claude Sonnet 5 <[email protected]>
…LastCommit (#1427) * perf(blocksync): verify a commit once, not again as the next block's LastCommit Block sync threshold-verifies the commit for block N in blockApplier.verify, and one height later the same commit comes back as block N+1's LastCommit and is verified a second time inside validateBlock. Every commit was verified twice, a block apart, at roughly 1.9 ms each. The applier now records what it verified through a new Executor.NoteVerifiedCommit and validateBlock takes a lastCommitVerified hint. The skip fires only on an exact match of every input ValidatorSet.verifyCommit reads: chain ID, height, block ID, quorum type, quorum hash, threshold public key, and a byte-identical marshalled commit. Marshalling rather than using Commit.Hash() matters, because that hash only covers ThresholdBlockSignature and would miss Round and the vote extensions. Anything short of a full match falls through to a real verification. The note is stored after ApplyBlock returns, not before: both places that would re-verify this commit run while the *next* block is applied, so writing it earlier would overwrite the entry they are still reading for the current block and the skip would never fire. The validator set is captured before ApplyBlock, which reassigns e.state. The consensus path never calls NoteVerifiedCommit, so the memo stays nil there and nothing changes. It is an atomic.Pointer written and read whole, never read-modify-write, and blockApplier.Apply is serialised under its own mutex. Replaying mainnet, the applier's verify stage goes from 3.61 ms to 1.84 ms a block. * perf(state): skip the second LastCommit verification when the memo proves it ran (#1428) ValidateBlockWithRoundState verifies block.LastCommit even though the ValidateBlock call at the top of the same function normally does it. That second verification is load-bearing rather than redundant: ValidateBlock short-circuits on blockExec.cache, which is keyed on the block hash alone and carries no promise about the state the earlier validation ran against. Removing it outright breaks TestStateProposalTime. So gate it on the memo added in the previous change instead of on the cache. The skip happens only when this exact commit was already verified against identical inputs — same chain ID, height, block ID, quorum type, quorum hash, threshold public key and byte-identical marshalled commit. That is a property of the data, not of the cache, so it holds no matter which path populated the cache. Replaying mainnet, this stage goes from 1.81 ms a block to 0.007 ms. Together with the previous change block sync performs one threshold verification per block instead of three. * test(state): cover the verified-commit memo directly TestLastCommitAlreadyVerified checks the memo matches only on a full match of every input VerifyCommit reads, and falls through when the chain ID, height, block ID, quorum type, quorum hash, threshold key or any commit field differs. TestApplyBlockSkipsVerifiedLastCommit drives a real BlockExecutor with genuine BLS commits through ApplyBlock: a noted commit is not threshold-verified again, a forged commit that was never noted is rejected, and a memo for a different commit does not cover a forged one. Co-Authored-By: Claude Fable 5.1 <[email protected]> * test(state): fold the ApplyBlock drive into the memo fixture Replace the blockAndID closure with a fixture method so each subtest reads as note-then-assert, use slices.Clone for the vote extensions, and move the cache comment above the call it explains. Co-Authored-By: Claude Fable 5.1 <[email protected]> * refactor(state): verify commits through the executor so the memo cannot be fed unverified ones NoteVerifiedCommit took the caller's word that a commit had been verified. Replace it with Executor.VerifyCommit, which runs the threshold verification itself and remembers the result only on success. The block sync applier now verifies through it; nothing else can write the memo. The memo keeps the two most recent commits instead of one: VerifyCommit for commit N runs before block N is validated, and block N's LastCommit is commit N-1, so both must be present. This also removes the ordering constraint that forced the applier to record the note only after ApplyBlock returned. Every slice-backed field in the memo is now an owned copy, so mutation of the validator set, block ID or commit after verification cannot change what it matches. validateBlock takes the hint as a closure, so the memo is consulted only after ValidateBasic and the cheaper header checks. A new state_last_commit_verification_skipped counter makes the skip observable, and a marshal failure on the memo path is logged instead of swallowed. * refactor(state): replace commit-verification memo with typed VerifiedCommit token (#1456) * feat(types): add CommitVerification, a typed proof of commit verification VerifyCommitSignatures verifies a commit exactly as ValidatorSet.VerifyCommit does and, on success, returns a CommitVerification recording the chain, height, block ID, quorum, threshold key and the signed digests and signatures it checked. ValidatorSet.VerifyCommitUnlessVerified skips the threshold verification only when a verification covers exactly those inputs. Anything else, including the zero value, falls through to the unchanged verifyCommit, so its typed errors (ErrInvalidCommitSignature versus the untyped vote-extension count mismatch and budget exhaustion) are preserved. verifyCommit is split into commitSignData and verifyCommitReportingSigns with every error path unchanged. Co-Authored-By: Claude Opus 5 <[email protected]> * refactor(state): replace commit-verification memo with typed CommitVerification token BlockExecutor.VerifyCommit returns a types.CommitVerification instead of recording it in a private two-slot memo. ValidateBlock, ValidateBlockWithRoundState, FinalizeBlock and ApplyBlock take the verification of block.LastCommit explicitly. Block sync's applier threads the verification of each commit one block forward; consensus and the replayer pass the zero value and verify in full as before. The state_last_commit_verification_skipped metric keeps its meaning. Co-Authored-By: Claude Opus 5 <[email protected]> * test(consensus): deflake TestWALRoundsSkipper The WAL generator node is the only validator, so it proposes every round, and replayPrevoter makes heights 3 to 5 commit only at round 10. The test genesis gives round 10 a 30.5ms propose timeout. On a loaded runner (-race, -coverprofile, several packages at once) that timer fires before the node's own proposal is complete, so it prevotes nil and moves to round 11: - at height 5, stopConsensusAtHeight(5, 11) halts consensus and the test times out after 60s ("waited too long for tendermint to produce 5 blocks"), which is the failure seen on #1391, #1393 and #1410; - at height 3 or 4, the commit lands past maxRound and the round assertion fails. Give the generator a 10s propose timeout. With a single proposer, a round moves on as soon as the proposal is complete, so a longer timeout only removes the race. UnsafeProposeTimeoutOverride is node-local and not a consensus parameter, so the blocks are unchanged. TestWALRoundsSkipperSlowProposer pins this. Its app holds PrepareProposal at round 10 for three times the genesis propose timeout. Without the override it fails every run; with it, it passes every run. Once the test survives load, a second pre-existing flake surfaces. The replaying State and its WAL keep running after Stop/Wait: receiveRoutine exits only when it sees its context cancelled, and the services' ctx watchers log asynchronously. Their logs through NewTestingLogger then land after the test completes and panic the binary ("Log in goroutine after TestWALRoundsSkipper has completed"). The test now logs through a writer that is muted, under a lock, by its first-registered cleanup. Co-Authored-By: Claude Opus 5 <[email protected]> * refactor(types): turn CommitVerification into VerifiedCommit types.CommitVerification only carried proof metadata, checked against a commit passed alongside it. It becomes types.VerifiedCommit: the commit itself plus an optional proof. type VerifiedCommit struct { commit *Commit // the caller's pointer, the subject only proof *commitProof // nil: no proof } commitProof keeps the nine fields CommitVerification recorded, with their doc comments. - VerifyCommitSignatures keeps its signature, checks and errors. It returns the commit with a proof on success, and the zero VerifiedCommit on failure. - NewUnverifiedCommit(commit) builds the no-proof variant. The zero value is NewUnverifiedCommit(nil). - Commit() returns the embedded pointer. Its doc spells out that it is not evidence and must never be validated in place of the commit actually received. - checkMatches moves to *commitProof and treats a nil receiver as "nothing was verified". It compares commit content only, never pointer identity. - errCommitVerificationMismatch becomes errCommitProofMismatch. Only the parameter types change at the call sites. block.LastCommit is still read from the block, and the current-height commit parameter of ApplyBlock/FinalizeBlock is untouched. Consensus (finalize, validate), ProcessProposal and the replayer pass NewUnverifiedCommit(block.LastCommit); the block-sync applier keeps the zero value where it holds no commit. Mocks are regenerated with mockery v3.7.4. Tests: - the types tests are renamed to VerifiedCommit; - the proof-mutation test pins with require.Same that the embedded commit aliases the caller's pointer; - a new case shows that a VerifiedCommit without proof, even one holding the very commit being verified, never skips verification; - the new TestBlockApplierSkipsTheLastCommitItVerified drives three blocks through a real executor and asserts LastCommitVerificationSkipped reaches 0, 2 and 4. It fails if the applier hands the next block the commit without its proof; - metricspy gains a Counter for it. Co-Authored-By: Claude Opus 5 <[email protected]> * chore: retrigger CI GitHub Actions never picked up 0eccc06 (no check-suite created for it after 45+ minutes, unlike every prior push on this branch) — pushing an empty commit to force a fresh push event. Co-Authored-By: Claude Sonnet 5 <[email protected]> * refactor(types): drop NewUnverifiedCommit, the only way to fake a VerifiedCommit NewUnverifiedCommit let any caller wrap an arbitrary commit into a value of a type named VerifiedCommit while attaching no proof at all -- a naming trap, and unused by anything that reads Commit(): nothing outside tests ever called it. The four call sites that used it to signal "no proof held" never read the commit back off the value either; they only pass it into VerifyCommitUnlessVerified, which already falls through to a full verification on any proof-less value, zero value included. Remove the constructor. The zero value is now the only proof-less VerifiedCommit that code outside types can produce, and it is the only one that matters in practice: consensus, the replayer and block sync's ProcessProposal path all switch to it. The still-exported Commit() and the commit field stay -- VerifyCommitSignatures is still the only way to end up with a VerifiedCommit that names a real commit, and it always pairs one with its proof. TestUnverifiedCommitMatchesNothing keeps its "holds the exact commit but no proof" case as an in-package struct literal: a white-box test proving the mismatch check would still refuse to skip verification even in that stronger, no-longer-reachable-from-outside scenario. Co-Authored-By: Claude Sonnet 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]> * perf(state): offer the verified LastCommit to ProcessProposal Since block sync validates the app response through ProcessProposal(verify=true), ValidateBlockWithRoundState runs there with a hard-coded zero proof, so every synced block threshold-verified its LastCommit once more even though the applier already held the proof. ProcessProposal takes lastCommit and forwards it to the verify branch. The block applier hands it the proof it carries forward; consensus and the replayer hold none and pass the zero value. ApplyBlock passes its own lastCommit through for uniformity; it is unread with verify unset. TestBlockApplierSkipsTheLastCommitItVerified now expects three skips per height after the first, and fails against the previous commit. Co-Authored-By: Claude Opus 5 <[email protected]> * test(state): trim the ApplyBlock LastCommit verification tests - Count skipped verifications with metricspy.Counter instead of a local duplicate of it. - Drop the subtest applying a forged commit with the verification VerifyCommit returned on rejecting it: that verification is the zero value, already pinned by "rejected commit yields no verification" and TestVerifiedCommitKeepsTheVerifyCommitErrors, and a forged LastCommit without proof is pinned by "unverified forged commit is rejected". - TestApplyBlockSkipsVerifiedLastCommit covers ApplyBlock only; block sync no longer calls it, so point to the block sync pin instead. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: lklimek <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]>
Issue being fixed or feature implemented
PR #1427 speeds up block sync by not re-verifying a commit's BLS threshold
signature three times over — once when it arrives, then twice more one
height later as the next block's
LastCommit. It does this with athrowaway "memo": a private, mutex-guarded cache inside
BlockExecutorthatremembers the last couple of verified commits by height.
This PR replaces that memo with a typed proof of verification,
types.VerifiedCommit, so the guarantee is enforced by the type systeminstead of living in ambient, shared, mutable state. The codebase already
uses this exact pattern for votes (
types.VoteVerification) — this makesCommitconsistent with it.What was done?
types.VerifiedCommit(types/verified_commit.go): a commit pairedwith, optionally, proof that its threshold signatures were verified —
VerifiedCommit{commit *Commit; proof *commitProof}. A nilproofis the"without proof" variant (Go's shape for the Rust-enum-style
Unverified(Commit) | Verified{Commit, Proof}this models); the zero valueand
NewUnverifiedCommit(commit)both produce it.Commit()returns theheld commit but is explicitly documented as not evidence — a caller must
never validate this in place of the commit it actually received. Only
VerifyCommitSignatures(vals, chainID, blockID, height, commit, budget)attaches a proof, and only on success, recording owned copies of everything
a re-verification would check (chain ID, height, block ID, quorum
type/hash, threshold key, signed digests and signatures).
(*ValidatorSet).VerifyCommitUnlessVerified(...). It skips the realverification only on an exact match (checked by an unexported
(*commitProof).checkMatches, nil-receiver-safe, which re-derives thedigests and compares them by content — no BLS pairing, and deliberately no
pointer-identity check against the commit the proof was minted with).
Anything else, including a proof-less
VerifiedCommit, falls through tothe unchanged
verifyCommit. Unlike the vote token, a mismatch is notrejected — it's a hint that may be absent, not a claim that must hold.
This is what lets consensus and the replayer pass an unverified commit and
keep verifying every commit in full, exactly as they do today.
verifyCommitis split intocommitSignData+verifyCommitReportingSigns,with every existing typed-error path (budget exhaustion, the untyped
vote-extension-count mismatch, the typed invalid-signature error) kept
byte-identical —
internal/statesyncdepends on this distinction todecide whether to disconnect a peer.
Executor.VerifyCommitreturns theVerifiedCommitinstead of writinginto a private cache.
ValidateBlock,ValidateBlockWithRoundState,FinalizeBlockandApplyBlockeach take the verification ofblock.LastCommitas an explicit parameter instead of consulting hiddenstate.
internal/blocksync/applier.go'sblockApplierthreads each commit'sVerifiedCommitone block forward explicitly (guarded by its existingmutex, advanced only after a successful apply, reset on
UpdateState) —this replaces the cross-height half of perf(blocksync): verify a commit once, not again as the next block's LastCommit #1427's memo with an explicit value
instead of an ambient one.
verifiedCommits/verifiedCommit/newVerifiedCommit/lastCommitVerifiedmemo and its mutex are deleted entirely.internal/state/execution.gonets smaller (~140 lines removed, ~40added) despite the new capability.
state_last_commit_verification_skippedkeeps its existing meaning: twoskips per block during block sync, flat during consensus.
Minor behavior changes (found while replacing the memo, not by design)
state.ValidatorsinBlockExecutor.VerifyCommitnow returnstypes.ErrValidatorSetNilOrEmptyinstead of perf(blocksync): verify a commit once, not again as the next block's LastCommit #1427's ad hoc message.VerifyCommitSignatureson a nil commit returns an error rather thanpanicking (as
ValidatorSet.VerifyCommitdid on this input before perf(blocksync): verify a commit once, not again as the next block's LastCommit #1427).today — unchanged.
How Has This Been Tested?
types/verified_commit_test.go: the proof matches only an exactcommit/chain/height/blockID/quorum-type/quorum-hash/key, rejects/falls
through on distinct kinds of mismatch, survives mutation of its inputs
after construction (
TestVerifiedCommitProofSurvivesMutationOfItsInputs,now also pinning
require.Same(t, minted.commit, verified.Commit())—the embedded pointer is the caller's own, not a copy), a proof-less
VerifiedCommitnever skips even when it holds the exact commit beingverified (
TestUnverifiedCommitMatchesNothing), and the fall-through pathreturns exactly the same error
VerifyCommitwould(
TestVerifiedCommitKeepsTheVerifyCommitErrorsacross forged signature,wrong block ID, wrong quorum hash, wrong height, and
vote-extension-count mismatch).
internal/blocksync/applier_test.go:TestBlockApplierSkipsTheLastCommitItVerifieddrives three real blocksthrough
sm.BlockExecutorand assertsLastCommitVerificationSkippedreaches 0/2/4 after heights 1/2/3 — mutation-tested by temporarily
swapping the applier's forwarded value for an unverified one, which turns
the assertion red (2 expected vs 0 actual) before being reverted.
internal/state/mocks/executor.go) regenerated via mockery(
go:generate), not hand-edited; every mock expectation on the fourcall sites now using
NewUnverifiedCommitwas audited — none is pinned tothe old zero-value literal.
go build ./...: clean.gofmt: clean.make lint(
golangci-lint --new-from-rev=origin/perf/verify-commit-once):0 issues.
go test -count=1 ./types/... ./internal/state/...: allgreen.
go test -tags=deadlock ./types/... ./internal/state/... ./internal/blocksync/... ./dash/quorum/...: all green.go test -mod=readonly -timeout=5m -race ./internal/consensus/...(full, unfiltered): ok, 127.8s.
go test -race ./internal/blocksync/...hits two known, pre-existingtiming flakes unrelated to this change
(
TestReactor_NoBlockResponse,TestSynchronizer/TestClientTimeoutUnwedgesAFullWindow).Confirmed pre-existing by a same-load A/B against the pre-rework baseline:
both flake at the same rate (11/12 and 10/12 pass) on both sides, and
the rework side passed 12/12 in the same run. All of the above
independently re-verified by the coordinator, not just taken from the
implementer's report.
throughput benchmark.
Breaking Changes
None externally.
state.Executor(internal interface) changes signature —internal only, all implementations/mocks updated in this PR.
Detailed discussion
Stacked on #1427 (
perf/verify-commit-once) — this PR's base is thatbranch, not
v1.8-dev; #1427's own commits are untouched.The type was originally implemented as
types.CommitVerification(aproof-only token, checked against a separately-held commit) and then
reworked, in a follow-up commit on this same branch, into
types.VerifiedCommitas described above — the commit is now embedded inthe value itself rather than threaded alongside it. This branch also
carries an unrelated test-only fix for the pre-existing
TestWALRoundsSkipperflake (also shipped standalone against
v1.8-devas #1457).A third commit removed
NewUnverifiedCommit, the exported constructor therework initially added for the "commit held, no proof" case: it let any
caller build a value named
VerifiedCommitthat named a real commit whileattaching no proof, and nothing outside tests ever called
.Commit()onone. The four call sites that used it (consensus's finalize/validate,
ProcessProposal, the replayer) never read the commit back off the valueeither — they only pass it into
VerifyCommitUnlessVerified, which alreadyfalls through to a full verification on any proof-less value. All four now
pass the zero
VerifiedCommit{}, the only proof-less value code outsidetypescan produce.Deliberately out of scope for this PR (left as follow-up candidates):
blockExec.cache(block-hash-keyed, unlocked, ignores state/lastCommit)is a separate, pre-existing shortcut with its own correctness questions —
noted, not touched.
VerifiedCommiton the consensus side(
StateData.verifyCommit,TryAddCommitAction) so consensus can alsoskip redundant re-verification — the explicit-parameter shape here makes
that a drop-in change later, but it's excluded from this PR's scope.
site of
Vote/Commit(not just the redundant-BLS-verify hot spotsaddressed here), that the value in hand still applies to the current
block/state/height context.
Checklist:
For repository code-owners and collaborators only
🤖 Generated with Claude Code