Skip to content

feat(consensus): additional validation for vote ext signatures - #5873

Merged
swift1337 merged 5 commits into
mainfrom
feat/val-ext-sigs
May 19, 2026
Merged

swift1337 merged 5 commits into
mainfrom
feat/val-ext-sigs

Conversation

@swift1337

Copy link
Copy Markdown
Member

No description provided.

@swift1337
swift1337 requested a review from a team as a code owner May 19, 2026 12:16
@swift1337 swift1337 self-assigned this May 19, 2026
@swift1337
swift1337 requested a review from mattac21 May 19, 2026 12:16
@swift1337

Copy link
Copy Markdown
Member Author

@greptile review

@greptile-apps

greptile-apps Bot commented May 19, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR introduces VerifyCommitExtended, a new method on ValidatorSet that consolidates extended commit verification into a single function: it enforces extension presence via EnsureExtensions, verifies regular commit signatures via VerifyCommit, and then cryptographically verifies each vote extension signature via VerifyExtension. Both blocksync/reactor.go and consensus/state_ingest.go are updated to call this new method, replacing their previous pattern of calling EnsureExtensions and VerifyCommit separately (while the new method also adds the previously missing extension signature verification).

  • types/validator_set.go: Adds VerifyCommitExtended with a three-step validation pipeline (ensure extensions → verify commit → verify extension signatures for every BlockIDFlagCommit entry); absent/nil voters are correctly skipped because VerifyExtension short-circuits on a zero BlockID.
  • blocksync/reactor.go / consensus/state_ingest.go: Call sites are simplified to a single VerifyCommitExtended call, though both callers still retain a separate VerifyCommit call on the plain commit object before invoking the new method.
  • types/validator_set_test.go: Two new subtests exercise the happy path and a corrupted extension signature; several edge-case paths (absent/nil voters, wrong chain ID, nil extended commit) remain untested.

Confidence Score: 5/5

The change is safe to merge -- it adds a net-new validation step (cryptographic extension signature verification) that was previously absent, and the call-site refactoring is mechanically straightforward.

The core logic of VerifyCommitExtended is correct: EnsureExtensions enforces presence, VerifyCommit checks quorum, and the per-entry VerifyExtension loop properly skips absent/nil voters (whose BlockID is zero) while verifying all BlockIDFlagCommit entries. No data can be silently accepted that would have been rejected by the old code, and the new code closes the gap where extension signatures were never cryptographically checked.

types/validator_set.go warrants a follow-up to remove the unreachable nil-validator guard and to decide whether the internal VerifyCommit call should be removed. types/validator_set_test.go would benefit from additional subtests for nil extCommit, absent/nil voters, and a mismatched chain ID.

Important Files Changed

Filename Overview
types/validator_set.go Adds VerifyCommitExtended; contains a nil-validator guard that is unreachable after VerifyCommit succeeds (dead code flagged in prior threads), and internally calls VerifyCommit which is already called by both callers before invoking this method (double crypto work).
blocksync/reactor.go Replaces explicit EnsureExtensions + VerifyCommit with VerifyCommitExtended; the external VerifyCommit at line 631 on second.LastCommit is still separate from the internal VerifyCommit inside VerifyCommitExtended on extCommit.ToCommit().
consensus/state_ingest.go Call site simplified to VerifyCommitExtended; same double-VerifyCommit pattern as blocksync (ic.commit at line 143 vs ic.extCommit.ToCommit() inside the new method).
consensus/state_ingest_test.go Error string updated from 'ensure extensions' to 'vote extension signature is missing' to match the new error path through VerifyCommitExtended -> EnsureExtensions; the substring check is correct.
types/validator_set_test.go Adds happy-path and corrupted-signature subtests; missing coverage for nil extCommit, absent/nil voter entries, and wrong chain ID -- these paths exercise distinct guard logic in the new function.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A([VerifyCommitExtended called]) --> B{extCommit == nil?}
    B -- yes --> C([return error: nil extended commit])
    B -- no --> D[Step 1: EnsureExtensions true]
    D --> E{Any entry missing extension signature?}
    E -- yes --> F([return EnsureExtension error])
    E -- no --> G[Step 2: VerifyCommit on extCommit.ToCommit]
    G --> H{+2/3 regular signatures valid?}
    H -- no --> I([return VerifyCommit error])
    H -- yes --> J[Step 3: loop over all ExtendedSignatures]
    J --> K{BlockIDFlag == Commit?}
    K -- no --> L[VerifyExtension skips, BlockID is zero]
    L --> M{more entries?}
    K -- yes --> N[VerifyExtension: verify extension signature]
    N --> O{signature valid?}
    O -- no --> P([return invalid vote extension signature error])
    O -- yes --> M
    M -- yes --> J
    M -- no --> Q([return nil, success])
Loading

Reviews (3): Last reviewed commit: "fix test assertion" | Re-trigger Greptile

Comment thread types/validator_set.go Resolved
Comment thread types/validator_set.go Resolved
Comment thread types/validator_set_test.go Resolved
@greptile-apps

greptile-apps Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR introduces ValidatorSet.VerifyCommitExtended, a new method that consolidates three checks — EnsureExtensions, the regular VerifyCommit, and a new per-validator cryptographic verification of vote extension signatures — into a single call. Both blocksync/reactor.go and consensus/state_ingest.go are updated to use this method, replacing the previous pattern that verified extension presence but not extension signatures.

  • types/validator_set.go: New VerifyCommitExtended iterates over all ExtendedSignatures and calls vote.VerifyExtension on each, skipping absent/nil voters (whose BlockID is zero) so that only BlockIDFlagCommit entries are cryptographically checked.
  • blocksync/reactor.go / consensus/state_ingest.go: Drop the inline EnsureExtensions + VerifyCommit calls in favour of the consolidated method; error handling is unchanged.
  • types/validator_set_test.go: Two subtests added (happy path and corrupted extension signature), though several edge cases (absent voters, wrong chain ID, nil input) remain uncovered.

Confidence Score: 4/5

The change is safe to merge; the new method correctly adds cryptographic extension-signature verification and the refactored callers preserve existing error handling.

The new VerifyCommitExtended combines three checks in the right order and correctly delegates absent/nil-voter entries to VerifyExtension's early-return path. The only concerns are a dead-code nil guard in the iteration loop (unreachable after VerifyCommit validates lengths) and limited test coverage that omits absent voters, wrong chain IDs, and the nil-input case. No correctness regression was found.

types/validator_set.go and types/validator_set_test.go warrant a second look — the dead nil-check and the missing edge-case subtests are both in these two files.

Important Files Changed

Filename Overview
types/validator_set.go Adds VerifyCommitExtended: combines EnsureExtensions + VerifyCommit + per-validator extension-signature crypto checks. Logic is correct; the nil-validator guard in the loop is dead code after VerifyCommit succeeds.
types/validator_set_test.go Adds two subtests (happy path and corrupted extension signature); missing coverage for absent/nil voters, wrong chainID, and nil extCommit inputs.
blocksync/reactor.go Replaces inline EnsureExtensions + VerifyCommit pair with VerifyCommitExtended, which additionally verifies extension signatures cryptographically. Refactor is straightforward and error handling is unchanged.
consensus/state_ingest.go Same refactor as blocksync/reactor.go: switches from EnsureExtensions + VerifyCommit to VerifyCommitExtended. Behavior is equivalent plus the new extension-signature check.

Sequence Diagram

sequenceDiagram
    participant Caller as blocksync / consensus
    participant VCE as ValidatorSet.VerifyCommitExtended
    participant EE as extCommit.EnsureExtensions
    participant VC as ValidatorSet.VerifyCommit
    participant VE as vote.VerifyExtension

    Caller->>VCE: chainID, blockID, height, extCommit
    VCE->>VCE: nil-check extCommit

    VCE->>EE: EnsureExtensions(true)
    EE-->>VCE: error if commit-vote missing ext sig or non-commit vote has ext sig

    VCE->>VC: VerifyCommit(chainID, blockID, height, extCommit.ToCommit())
    VC-->>VCE: error if quorum not met or regular sig invalid

    loop for each ExtendedSignature[idx]
        VCE->>VCE: GetByIndex(idx) to val
        VCE->>VCE: GetExtendedVote(idx) to vote
        VCE->>VE: vote.VerifyExtension(chainID, val.PubKey)
        note over VE: skipped when vote.BlockID.IsZero()
        VE-->>VCE: error if extension sig cryptographically invalid
    end

    VCE-->>Caller: nil or error
Loading

Reviews (2): Last reviewed commit: "add test cases" | Re-trigger Greptile

Comment thread types/validator_set.go Resolved
Comment thread types/validator_set_test.go Resolved
@aljo242

aljo242 commented May 19, 2026

Copy link
Copy Markdown
Collaborator

@greptile re-review

@aljo242 aljo242 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.

Independent review complete. I ran targeted checks locally:

  • go test ./types -run TestVerifyCommitExtended -count=1
  • go test ./consensus -run TestIngestCandidate -count=1

No blocking issues found in the VerifyCommitExtended integration.

Non-blocking follow-ups I’d still recommend:

  1. Add edge-case coverage in types/validator_set_test.go for nil extended commit and absent/nil vote cases.
  2. Remove the now-unreachable nil-validator branch in VerifyCommitExtended (after VerifyCommit succeeds, index bounds are already guaranteed).

@swift1337 swift1337 added backport-to-v0.38.x Tell Mergify to backport the PR to v0.38.x backport-to-v0.39.x Tell Mergify to backport the PR to v0.39.x labels May 19, 2026
@swift1337
swift1337 added this pull request to the merge queue May 19, 2026
Merged via the queue into main with commit 109a851 May 19, 2026
34 checks passed
@swift1337
swift1337 deleted the feat/val-ext-sigs branch May 19, 2026 19:28
mergify Bot added a commit that referenced this pull request May 20, 2026
JayT106 added a commit to crypto-org-chain/cometbft that referenced this pull request May 27, 2026
* fix(blocksync): prevent maxPeerHeight poisoning (cometbft#5803)

(cherry picked from commit a7e53f0)

* chore(execution, state): height validation (cometbft#5804)

Improves height validation in state and execution.

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 4c067e2)

* fix(lp2p): reactor panic recovery (backport cometbft#5816) (cometbft#5817)

Closes STACK-2679

---

#### PR checklist

- [x] Tests written/updated
- [x] Changelog entry added in `CHANGELOG.md`
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
<hr>This is an automatic backport of pull request cometbft#5816 done by
[Mergify](https://mergify.com).

Co-authored-by: Dmitry S <[email protected]>

* build(deps): Bump github.com/Masterminds/semver/v3 from 3.4.0 to 3.5.0 (backport cometbft#5823) (cometbft#5824)

Bumps
[github.com/Masterminds/semver/v3](https://github.com/Masterminds/semver)
from 3.4.0 to 3.5.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Masterminds/semver/releases">github.com/Masterminds/semver/v3's
releases</a>.</em></p>
<blockquote>
<h2>v3.5.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Adding more prerelease tests by <a
href="https://github.com/mattfarina"><code>@​mattfarina</code></a> in <a
href="https://redirect.github.com/Masterminds/semver/pull/273">Masterminds/semver#273</a></li>
<li>Update constraint error messages by <a
href="https://github.com/mattfarina"><code>@​mattfarina</code></a> in <a
href="https://redirect.github.com/Masterminds/semver/pull/278">Masterminds/semver#278</a></li>
<li>Fix edge cases by <a
href="https://github.com/mattfarina"><code>@​mattfarina</code></a> in <a
href="https://redirect.github.com/Masterminds/semver/pull/279">Masterminds/semver#279</a></li>
<li>Adding some checks in by <a
href="https://github.com/mattfarina"><code>@​mattfarina</code></a> in <a
href="https://redirect.github.com/Masterminds/semver/pull/280">Masterminds/semver#280</a></li>
<li>Updating deps by <a
href="https://github.com/mattfarina"><code>@​mattfarina</code></a> in <a
href="https://redirect.github.com/Masterminds/semver/pull/281">Masterminds/semver#281</a></li>
<li>Bump github/codeql-action from 4.35.1 to 4.35.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/Masterminds/semver/pull/282">Masterminds/semver#282</a></li>
<li>Bump actions/cache from 4.2.3 to 5.0.5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/Masterminds/semver/pull/283">Masterminds/semver#283</a></li>
<li>Bump golangci/golangci-lint-action from 7.0.1 to 9.2.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/Masterminds/semver/pull/284">Masterminds/semver#284</a></li>
<li>Updating gitignore for devcontainers by <a
href="https://github.com/mattfarina"><code>@​mattfarina</code></a> in <a
href="https://redirect.github.com/Masterminds/semver/pull/286">Masterminds/semver#286</a></li>
<li>Fixing some quality issues by <a
href="https://github.com/mattfarina"><code>@​mattfarina</code></a> in <a
href="https://redirect.github.com/Masterminds/semver/pull/287">Masterminds/semver#287</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
made their first contribution in <a
href="https://redirect.github.com/Masterminds/semver/pull/282">Masterminds/semver#282</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/Masterminds/semver/compare/v3.4.0...v3.5.0">https://github.com/Masterminds/semver/compare/v3.4.0...v3.5.0</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/Masterminds/semver/blob/master/CHANGELOG.md">github.com/Masterminds/semver/v3's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/Masterminds/semver/commit/8b89c86cb53c57cfd5d07c13de12bc4d78954e99"><code>8b89c86</code></a>
Merge pull request <a
href="https://redirect.github.com/Masterminds/semver/issues/287">#287</a>
from mattfarina/fix-da-issues</li>
<li><a
href="https://github.com/Masterminds/semver/commit/29d51d0ea4bffe39173673685d0dd312447d74a7"><code>29d51d0</code></a>
Fixing some quality issues</li>
<li><a
href="https://github.com/Masterminds/semver/commit/87f651dbe2f616342d6408b997ad7116ba72ddf3"><code>87f651d</code></a>
Merge pull request <a
href="https://redirect.github.com/Masterminds/semver/issues/286">#286</a>
from mattfarina/update-devcontainer</li>
<li><a
href="https://github.com/Masterminds/semver/commit/158a6852a7e66d99594653227d3e8c3dc6d160ca"><code>158a685</code></a>
Updating gitignore for devcontainers</li>
<li><a
href="https://github.com/Masterminds/semver/commit/7e83c080cfb4455752c654805b189274a10890ab"><code>7e83c08</code></a>
Merge pull request <a
href="https://redirect.github.com/Masterminds/semver/issues/284">#284</a>
from Masterminds/dependabot/github_actions/golangci/g...</li>
<li><a
href="https://github.com/Masterminds/semver/commit/697e27f32e7419eb896e7d3ec680c65fc673166b"><code>697e27f</code></a>
Merge pull request <a
href="https://redirect.github.com/Masterminds/semver/issues/283">#283</a>
from Masterminds/dependabot/github_actions/actions/ca...</li>
<li><a
href="https://github.com/Masterminds/semver/commit/1591f8e3806198f60fa4dcaf2751bfc805c7740d"><code>1591f8e</code></a>
Merge pull request <a
href="https://redirect.github.com/Masterminds/semver/issues/282">#282</a>
from Masterminds/dependabot/github_actions/github/cod...</li>
<li><a
href="https://github.com/Masterminds/semver/commit/3f5ff1737a28437e536d3ec54e41919577748ae6"><code>3f5ff17</code></a>
Bump golangci/golangci-lint-action from 7.0.1 to 9.2.0</li>
<li><a
href="https://github.com/Masterminds/semver/commit/04baa3376047b6d5e79ffcc60f69332dd3e26c85"><code>04baa33</code></a>
Bump actions/cache from 4.2.3 to 5.0.5</li>
<li><a
href="https://github.com/Masterminds/semver/commit/45939fec77cd7d07d586b823284d11423028e9c2"><code>45939fe</code></a>
Bump github/codeql-action from 4.35.1 to 4.35.2</li>
<li>Additional commits viewable in <a
href="https://github.com/Masterminds/semver/compare/v3.4.0...v3.5.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/Masterminds/semver/v3&package-manager=go_modules&previous-version=3.4.0&new-version=3.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details><hr>This is an automatic backport of pull request cometbft#5823 done
by [Mergify](https://mergify.com).

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): Bump github.com/Masterminds/semver/v3 from 3.4.0 to 3.5.0 (backport cometbft#5823) (cometbft#5824)

Bumps
[github.com/Masterminds/semver/v3](https://github.com/Masterminds/semver)
from 3.4.0 to 3.5.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Masterminds/semver/releases">github.com/Masterminds/semver/v3's
releases</a>.</em></p>
<blockquote>
<h2>v3.5.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Adding more prerelease tests by <a
href="https://github.com/mattfarina"><code>@​mattfarina</code></a> in <a
href="https://redirect.github.com/Masterminds/semver/pull/273">Masterminds/semver#273</a></li>
<li>Update constraint error messages by <a
href="https://github.com/mattfarina"><code>@​mattfarina</code></a> in <a
href="https://redirect.github.com/Masterminds/semver/pull/278">Masterminds/semver#278</a></li>
<li>Fix edge cases by <a
href="https://github.com/mattfarina"><code>@​mattfarina</code></a> in <a
href="https://redirect.github.com/Masterminds/semver/pull/279">Masterminds/semver#279</a></li>
<li>Adding some checks in by <a
href="https://github.com/mattfarina"><code>@​mattfarina</code></a> in <a
href="https://redirect.github.com/Masterminds/semver/pull/280">Masterminds/semver#280</a></li>
<li>Updating deps by <a
href="https://github.com/mattfarina"><code>@​mattfarina</code></a> in <a
href="https://redirect.github.com/Masterminds/semver/pull/281">Masterminds/semver#281</a></li>
<li>Bump github/codeql-action from 4.35.1 to 4.35.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/Masterminds/semver/pull/282">Masterminds/semver#282</a></li>
<li>Bump actions/cache from 4.2.3 to 5.0.5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/Masterminds/semver/pull/283">Masterminds/semver#283</a></li>
<li>Bump golangci/golangci-lint-action from 7.0.1 to 9.2.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/Masterminds/semver/pull/284">Masterminds/semver#284</a></li>
<li>Updating gitignore for devcontainers by <a
href="https://github.com/mattfarina"><code>@​mattfarina</code></a> in <a
href="https://redirect.github.com/Masterminds/semver/pull/286">Masterminds/semver#286</a></li>
<li>Fixing some quality issues by <a
href="https://github.com/mattfarina"><code>@​mattfarina</code></a> in <a
href="https://redirect.github.com/Masterminds/semver/pull/287">Masterminds/semver#287</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
made their first contribution in <a
href="https://redirect.github.com/Masterminds/semver/pull/282">Masterminds/semver#282</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/Masterminds/semver/compare/v3.4.0...v3.5.0">https://github.com/Masterminds/semver/compare/v3.4.0...v3.5.0</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/Masterminds/semver/blob/master/CHANGELOG.md">github.com/Masterminds/semver/v3's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/Masterminds/semver/commit/8b89c86cb53c57cfd5d07c13de12bc4d78954e99"><code>8b89c86</code></a>
Merge pull request <a
href="https://redirect.github.com/Masterminds/semver/issues/287">#287</a>
from mattfarina/fix-da-issues</li>
<li><a
href="https://github.com/Masterminds/semver/commit/29d51d0ea4bffe39173673685d0dd312447d74a7"><code>29d51d0</code></a>
Fixing some quality issues</li>
<li><a
href="https://github.com/Masterminds/semver/commit/87f651dbe2f616342d6408b997ad7116ba72ddf3"><code>87f651d</code></a>
Merge pull request <a
href="https://redirect.github.com/Masterminds/semver/issues/286">#286</a>
from mattfarina/update-devcontainer</li>
<li><a
href="https://github.com/Masterminds/semver/commit/158a6852a7e66d99594653227d3e8c3dc6d160ca"><code>158a685</code></a>
Updating gitignore for devcontainers</li>
<li><a
href="https://github.com/Masterminds/semver/commit/7e83c080cfb4455752c654805b189274a10890ab"><code>7e83c08</code></a>
Merge pull request <a
href="https://redirect.github.com/Masterminds/semver/issues/284">#284</a>
from Masterminds/dependabot/github_actions/golangci/g...</li>
<li><a
href="https://github.com/Masterminds/semver/commit/697e27f32e7419eb896e7d3ec680c65fc673166b"><code>697e27f</code></a>
Merge pull request <a
href="https://redirect.github.com/Masterminds/semver/issues/283">#283</a>
from Masterminds/dependabot/github_actions/actions/ca...</li>
<li><a
href="https://github.com/Masterminds/semver/commit/1591f8e3806198f60fa4dcaf2751bfc805c7740d"><code>1591f8e</code></a>
Merge pull request <a
href="https://redirect.github.com/Masterminds/semver/issues/282">#282</a>
from Masterminds/dependabot/github_actions/github/cod...</li>
<li><a
href="https://github.com/Masterminds/semver/commit/3f5ff1737a28437e536d3ec54e41919577748ae6"><code>3f5ff17</code></a>
Bump golangci/golangci-lint-action from 7.0.1 to 9.2.0</li>
<li><a
href="https://github.com/Masterminds/semver/commit/04baa3376047b6d5e79ffcc60f69332dd3e26c85"><code>04baa33</code></a>
Bump actions/cache from 4.2.3 to 5.0.5</li>
<li><a
href="https://github.com/Masterminds/semver/commit/45939fec77cd7d07d586b823284d11423028e9c2"><code>45939fe</code></a>
Bump github/codeql-action from 4.35.1 to 4.35.2</li>
<li>Additional commits viewable in <a
href="https://github.com/Masterminds/semver/compare/v3.4.0...v3.5.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/Masterminds/semver/v3&package-manager=go_modules&previous-version=3.4.0&new-version=3.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details><hr>This is an automatic backport of pull request cometbft#5823 done
by [Mergify](https://mergify.com).

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(light): stop witness comparison after divergence checks (backport cometbft#5820) (cometbft#5825)

Return immediately when a witness reports conflicting headers or
proposer-priority divergence so the detector cannot treat a mismatch as
a valid match. Add a detector test that keeps header hashes equal while
diverging proposer priorities to verify ErrProposerPrioritiesDiverge is
returned.

---

#### PR checklist

- [x] Tests written/updated
- [x] Changelog entry added in `CHANGELOG.md`
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
<hr>This is an automatic backport of pull request cometbft#5820 done by
[Mergify](https://mergify.com).

Co-authored-by: JayT106 <[email protected]>
Co-authored-by: Matt Acciai <[email protected]>

* perf(consensus): skip fsync for unsigned internal messages (block parts) (cometbft#5695)

## Summary

- Skip `fsync` (`WriteSync`) for `BlockPartMessage` in the consensus
WAL's `receiveRoutine`, using buffered `Write` instead
- Only signed messages (`VoteMessage`, `ProposalMessage`) retain
`WriteSync` for double-signing prevention
- Adds explicit type-switch with `default: panic` to prevent future
signed message types from silently bypassing fsync
- Replaces stale TODO in `replay_test.go` with documentation of the
selective-fsync approach

## Safety analysis

**Why signed messages MUST keep `WriteSync`:**
- Pre-sign `FlushAndSync` ensures WAL replay reaches the same
deterministic state
- Post-sign `WriteSync` ensures the signed message is durable before
`handleMsg` processes/broadcasts it
- Without this, crash-replay could re-sign a different vote →
equivocation

**Why `BlockPartMessage` can safely use `Write`:**
1. Block parts are unsigned data chunks derived from the proposal block
2. On crash: proposal exists (fsynced), some block parts may be missing
→ round times out → consensus proceeds
3. The periodic 2-second WAL flush (`processFlushTicks`) eventually
flushes them
4. Any subsequent `WriteSync` (vote) or `FlushAndSync` (pre-sign) also
flushes buffered block parts
5. `EndHeightMessage` uses `WriteSync`, which flushes ALL buffered
writes before the end marker

**Defensive measures:**
- Explicit `case *BlockPartMessage` (not `default`) ensures new message
types panic rather than silently bypassing fsync
- `default: panic("unexpected internal message type")` with SAFETY
comment for future maintainers
- WAL `Write` failure panics (matches `WriteSync` behavior) since write
errors indicate disk failure

## Benchmark results (Apple M1 Max SSD)

```
BenchmarkWALWrite-10          ~1μs/op     1680 B/op    13 allocs/op
BenchmarkWALWriteSync-10      ~4.4ms/op   1680 B/op    13 allocs/op

BenchmarkWALRoundSimulation/AllWriteSync-10       ~233ms/round
BenchmarkWALRoundSimulation/SelectiveFsync-10     ~9.3ms/round  (~25x faster)
```

---

#### PR checklist

- [x] Tests written/updated
- [x] Changelog entry added in `CHANGELOG.md`
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments

---------

Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: Dmitry S <[email protected]>
(cherry picked from commit 62a15e7)

* fix(abci): prevent panic on unlock in socket server panic recovery (cometbft#5593)

---

#### PR checklist
Fix a bug in handleRequests where the panic recovery defer function
would attempt to unlock appMtx even when the lock was never acquired.
- [x] Tests written/updated
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments

---------

Co-authored-by: Alex | Cosmos Labs <[email protected]>
Co-authored-by: Dmitry S <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 320e79e)

* changelog

* changelog

* chore(v0.39.2): restore Krakatoa app mempool and finalize changelog (cometbft#5827)

## Summary
- Cherry-pick Krakatoa restoration commit `f4a9ba936` into
`chore/0.39.2-prep`, restoring app mempool/reactor flow and related
ABCI/proxy/config wiring.
- Reintroduce app-mempool e2e fixtures and proto/generated ABCI updates
required for the restored flow.
- Finalize `v0.39.2` release notes in `CHANGELOG.md` while keeping
existing backport entries (`cometbft#5803`, `cometbft#5804`, `cometbft#5816`, `cometbft#5820`, `cometbft#5823`).

## Test plan
- [x] `go test ./abci/... ./mempool/... ./proxy/... ./config/...`
- [x] `make proto-gen`
- [x] `make proto-lint`

---------

Co-authored-by: Dmitry S <[email protected]>
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Eric Warehime <[email protected]>
Co-authored-by: mattac21 <[email protected]>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* fix(mempool): allow CheckTx retries (backport cometbft#5802) (cometbft#5832)

Backport cometbft#5802

Closes STACK-2402

* fix(mempool): allow CheckTx retries (backport cometbft#5802) #2 (cometbft#5833)

---

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `CHANGELOG.md`
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments

* build(deps): Bump github.com/lib/pq from 1.11.2 to 1.12.0 (backport cometbft#5713) (cometbft#5723)

Bumps [github.com/lib/pq](https://github.com/lib/pq) from 1.11.2 to
1.12.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/lib/pq/releases">github.com/lib/pq's
releases</a>.</em></p>
<blockquote>
<h2>v1.12.0</h2>
<ul>
<li>
<p>The next release may change the default sslmode from
<code>require</code> to <code>prefer</code>. See <a
href="https://redirect.github.com/lib/pq/issues/1271">#1271</a> for
details.</p>
</li>
<li>
<p><code>CopyIn()</code> and <code>CopyInToSchema()</code> have been
marked as deprecated. These are simple query builders and not needed for
<code>COPY [..] FROM STDIN</code> support (which is <em>not</em>
deprecated). (<a
href="https://redirect.github.com/lib/pq/issues/1279">#1279</a>)</p>
<pre><code>// Old
tx.Prepare(CopyIn(&quot;temp&quot;, &quot;num&quot;, &quot;text&quot;,
&quot;blob&quot;, &quot;nothing&quot;))
<p>// Replacement
tx.Prepare(<code>copy temp (num, text, blob, nothing) from stdin</code>)
</code></pre></p>
</li>
</ul>
<h3>Features</h3>
<ul>
<li>
<p>Support protocol 3.2, and the <code>min_protocol_version</code> and
<code>max_protocol_version</code> DSN parameters (<a
href="https://redirect.github.com/lib/pq/issues/1258">#1258</a>).</p>
</li>
<li>
<p>Support <code>sslmode=prefer</code> and <code>sslmode=allow</code>
(<a
href="https://redirect.github.com/lib/pq/issues/1270">#1270</a>).</p>
</li>
<li>
<p>Support <code>ssl_min_protocol_version</code> and
<code>ssl_max_protocol_version</code> (<a
href="https://redirect.github.com/lib/pq/issues/1277">#1277</a>).</p>
</li>
<li>
<p>Support connection service file to load connection details (<a
href="https://redirect.github.com/lib/pq/issues/1285">#1285</a>).</p>
</li>
<li>
<p>Support <code>sslrootcert=system</code> and use
<code>~/.postgresql/root.crt</code> as the default value of sslrootcert
(<a href="https://redirect.github.com/lib/pq/issues/1280">#1280</a>, <a
href="https://redirect.github.com/lib/pq/issues/1281">#1281</a>).</p>
</li>
<li>
<p>Add a new <code>pqerror</code> package with PostgreSQL error codes
(<a
href="https://redirect.github.com/lib/pq/issues/1275">#1275</a>).</p>
<p>For example, to test if an error is a UNIQUE constraint
violation:</p>
<pre><code>if pqErr, ok :=
errors.AsType[*pq.Error](https://github.com/lib/pq/blob/HEAD/err); ok
&amp;&amp; pqErr.Code == pqerror.UniqueViolation {
    log.Fatalf(&quot;email %q already exsts&quot;, email)
}
</code></pre>
<p>To make this a bit more convenient, it also adds a
<code>pq.As()</code> function:</p>
<pre><code>pqErr := pq.As(err, pqerror.UniqueViolation)
if pqErr != nil {
    log.Fatalf(&quot;email %q already exsts&quot;, email)
}
</code></pre>
</li>
</ul>
<h3>Fixes</h3>
<ul>
<li>
<p>Fix SSL key permission check to allow modes stricter than 0600/0640
(<a
href="https://redirect.github.com/lib/pq/issues/1265">#1265</a>).</p>
</li>
<li>
<p>Fix Hstore to work with binary parameters (<a
href="https://redirect.github.com/lib/pq/issues/1278">#1278</a>).</p>
</li>
<li>
<p>Clearer error when starting a new query while pq is still processing
another query (<a
href="https://redirect.github.com/lib/pq/issues/1272">#1272</a>).</p>
</li>
<li>
<p>Send intermediate CAs with client certificates, so they can be signed
by an intermediate CA (<a
href="https://redirect.github.com/lib/pq/issues/1267">#1267</a>).</p>
</li>
<li>
<p>Use <code>time.UTC</code> for UTC aliases such as
<code>Etc/UTC</code> (<a
href="https://redirect.github.com/lib/pq/issues/1283">#1283</a>).</p>
</li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/lib/pq/blob/master/CHANGELOG.md">github.com/lib/pq's
changelog</a>.</em></p>
<blockquote>
<h2>v1.12.0 (2026-03-18)</h2>
<ul>
<li>
<p>The next release may change the default sslmode from
<code>require</code> to <code>prefer</code>.
See <a href="https://redirect.github.com/lib/pq/issues/1271">#1271</a>
for details.</p>
</li>
<li>
<p><code>CopyIn()</code> and <code>CopyInToSchema()</code> have been
marked as deprecated. These are
simple query builders and not needed for <code>COPY [..] FROM
STDIN</code> support (which
is <em>not</em> deprecated). (<a
href="https://redirect.github.com/lib/pq/issues/1279">#1279</a>)</p>
<pre><code>// Old
tx.Prepare(CopyIn(&quot;temp&quot;, &quot;num&quot;, &quot;text&quot;,
&quot;blob&quot;, &quot;nothing&quot;))
<p>// Replacement
tx.Prepare(<code>copy temp (num, text, blob, nothing) from stdin</code>)
</code></pre></p>
</li>
</ul>
<h3>Features</h3>
<ul>
<li>
<p>Support protocol 3.2, and the <code>min_protocol_version</code> and
<code>max_protocol_version</code> DSN parameters (<a
href="https://redirect.github.com/lib/pq/issues/1258">#1258</a>).</p>
</li>
<li>
<p>Support <code>sslmode=prefer</code> and <code>sslmode=allow</code>
(<a
href="https://redirect.github.com/lib/pq/issues/1270">#1270</a>).</p>
</li>
<li>
<p>Support <code>ssl_min_protocol_version</code> and
<code>ssl_max_protocol_version</code> (<a
href="https://redirect.github.com/lib/pq/issues/1277">#1277</a>).</p>
</li>
<li>
<p>Support connection service file to load connection details (<a
href="https://redirect.github.com/lib/pq/issues/1285">#1285</a>).</p>
</li>
<li>
<p>Support <code>sslrootcert=system</code> and use
<code>~/.postgresql/root.crt</code> as the default
value of sslrootcert (<a
href="https://redirect.github.com/lib/pq/issues/1280">#1280</a>, <a
href="https://redirect.github.com/lib/pq/issues/1281">#1281</a>).</p>
</li>
<li>
<p>Add a new <code>pqerror</code> package with PostgreSQL error codes
(<a
href="https://redirect.github.com/lib/pq/issues/1275">#1275</a>).</p>
<p>For example, to test if an error is a UNIQUE constraint
violation:</p>
<pre><code>if pqErr, ok :=
errors.AsType[*pq.Error](https://github.com/lib/pq/blob/master/err); ok
&amp;&amp; pqErr.Code == pqerror.UniqueViolation {
    log.Fatalf(&quot;email %q already exsts&quot;, email)
}
</code></pre>
<p>To make this a bit more convenient, it also adds a
<code>pq.As()</code> function:</p>
<pre><code>pqErr := pq.As(err, pqerror.UniqueViolation)
if pqErr != nil {
    log.Fatalf(&quot;email %q already exsts&quot;, email)
}
</code></pre>
</li>
</ul>
<h3>Fixes</h3>
<ul>
<li>
<p>Fix SSL key permission check to allow modes stricter than <a
href="https://redirect.github.com/0600/0640/issues/0600">0600/06400600</a>
(<a
href="https://redirect.github.com/lib/pq/issues/1265">#1265</a>).</p>
</li>
<li>
<p>Fix Hstore to work with binary parameters (<a
href="https://redirect.github.com/lib/pq/issues/1278">#1278</a>).</p>
</li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/lib/pq/commit/42ab0ff7c4b1b585fa6cd216a12a126715b5af06"><code>42ab0ff</code></a>
Change default sslmode from &quot;require&quot; to
&quot;prefer&quot;</li>
<li><a
href="https://github.com/lib/pq/commit/6d40f13cfefe5ae4b489404b45114ba03224947a"><code>6d40f13</code></a>
Release v1.12.0</li>
<li><a
href="https://github.com/lib/pq/commit/386fc0e764f82951e9706dd8e618fc416fb5fb2c"><code>386fc0e</code></a>
Document NULL behaviour with COPY</li>
<li><a
href="https://github.com/lib/pq/commit/a62682e9083edee5ffe2d3904e80c30aaaa0877f"><code>a62682e</code></a>
Better staticcheck cache 2</li>
<li><a
href="https://github.com/lib/pq/commit/87ee06c600347478cfef07ad31b5ea617008aee7"><code>87ee06c</code></a>
Better staticcheck cache</li>
<li><a
href="https://github.com/lib/pq/commit/09624587cd3d4b69cd4a1a3b403b544ec0ddb2f7"><code>0962458</code></a>
Rewrite tests to use pqerror, pq.As()</li>
<li><a
href="https://github.com/lib/pq/commit/0d209810a155b9b8a173ab6d5da332f8c6cbc2c9"><code>0d20981</code></a>
Don't move pq.Error to pqerror.Error</li>
<li><a
href="https://github.com/lib/pq/commit/433213859e656dfe7dbba17b2838839e03a43ca2"><code>4332138</code></a>
Add pqerror package</li>
<li><a
href="https://github.com/lib/pq/commit/620d6d50817f9c4dcbfcbfeadb12ec552b636bf3"><code>620d6d5</code></a>
Make tests run faster</li>
<li><a
href="https://github.com/lib/pq/commit/dc8ff5d519b00bfa67626e68ea1ff3fdde0cc1b2"><code>dc8ff5d</code></a>
Implement connection service file</li>
<li>Additional commits viewable in <a
href="https://github.com/lib/pq/compare/v1.11.2...v1.12.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/lib/pq&package-manager=go_modules&previous-version=1.11.2&new-version=1.12.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details><hr>This is an automatic backport of pull request cometbft#5713 done
by [Mergify](https://mergify.com).

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: aljo242 <[email protected]>
Co-authored-by: mattac21 <[email protected]>

* chore: changelog updates for release (cometbft#5836)

---

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `CHANGELOG.md`
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments

* test(consensus): fix flaky TestByzantinePrevoteEquivocation (backport cometbft#5814) (cometbft#5840)

## Summary
Fix the failing CI at
https://github.com/cometbft/cometbft/actions/runs/25421557069/job/74564693795?pr=5837

`TestByzantinePrevoteEquivocation` was sporadically timing out on CI
under the `-race` detector. The root cause was goroutine leaks:
subscriptions were created with `context.Background()`, so the
subscriber goroutines had no clean exit path when a block with evidence
never arrived — they blocked forever on `sub.Out()`, leaked across
tests, and exhausted resources on the runner.

## Changes

- Replace `for range sub.Out()` with a `select` that also handles
`sub.Canceled()`, so goroutines exit cleanly when the eventbus stops
during test cleanup
- Add `subErrCh` to surface unexpected subscription cancellation errors
instead of silently swallowing them

## Test plan

- [x] `go test ./consensus/... -run TestByzantinePrevoteEquivocation -v
-count=1` passes locally
- [x] CI passing<hr>This is an automatic backport of pull request cometbft#5814
done by [Mergify](https://mergify.com).

Co-authored-by: songgaoye <[email protected]>

* test(consensus): fix cs.GetRoundState deadlock after ensureNewProposal (backport cometbft#5815) (cometbft#5842)

The same deadlock pattern existed across multiple consensus tests in
`state_test.go`, `replay_test.go`, and `node_test.go`:

- The consensus goroutine holds `cs.mtx` while publishing a vote event
  and blocks until the test drains it.
- The test calls `cs.GetRoundState()` (which acquires `cs.mtx`) between
  receiving the proposal event and draining the vote channel.
- Both sides wait on each other until `go test -timeout` aborts the run.

**Fix:** make `ensureNewProposal` return the `types.BlockID` from the
`EventDataCompleteProposal` it already reads. All call sites that only
needed `ProposalBlock.Hash()` and `ProposalBlockParts.Header()` now use
`blockID.Hash` and `blockID.PartSetHeader` directly. For sites that need
the full `ProposalBlock` (e.g. `Time`, `Txs`) but only use it after
channel drains, `GetRoundState()` is deferred to after those drains.

**Files fixed:**
- `consensus/common_test.go`: `ensureNewProposal` now returns
`types.BlockID`
- `consensus/state_test.go`: 13 call sites fixed across 11 tests
- `consensus/replay_test.go`: 6 call sites fixed in
`setupChainWithChangingValidators`
- `node/node_test.go`: 4 tests fixed to not bind the hardcoded GRPC port
36658,
  preventing address-in-use failures when tests run in parallel

#### PR checklist

- [x] Tests written/updated
- [ ] Changelog entry added in `CHANGELOG.md`
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments<hr>This is an automatic backport of pull request cometbft#5815 done by
[Mergify](https://mergify.com).

Co-authored-by: songgaoye <[email protected]>

* fix(mempool): fix setRecheckFull/setDone race causing spurious ErrRecheckFull (backport cometbft#5837) (cometbft#5844)

* fix(blocksync): validate blocksync response sender and signature count (backport cometbft#5860) (cometbft#5862)

---

Adds additional validation to blocksync, ensuring _before response
unmarshalling_ that we have made a `BlockRequest` to the peer that is
sending us a `BlockResponse` recently, and also that the response
contains a valid amount of commit signatures (not > MaxVoteCount). To do
this preunmarshal validation, we have added a `MsgBytesFilter` interface
that `Reactors` can implement. Currently only `BLOCKSYNC` does. The
`FilterMsgBytes` function is called for both comet P2P and libp2p
implementations, inside of the `onReceive` function when setting up a
peer for comet p2p, and inside of `handleStream` for libp2p, just before
unmarshalling the message in both.

#### PR checklist

- [x] Tests written/updated
- [x] Changelog entry added in `CHANGELOG.md`
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
<hr>This is an automatic backport of pull request cometbft#5860 done by
[Mergify](https://mergify.com).

Co-authored-by: mattac21 <[email protected]>

* feat(consensus): additional validation for vote ext signatures (backport cometbft#5873) (cometbft#5876)

<hr>This is an automatic backport of pull request cometbft#5873 done by
[Mergify](https://mergify.com).

Co-authored-by: Dmitry S <[email protected]>
Co-authored-by: Alex | Cosmos Labs <[email protected]>

* test(types): clarify EventBusBufferCapacity test intent (cometbft#5886)

improves the test added in cometbft#5883:

- rename `cap` → `bufCap` (shadows the builtin `cap` function)
- add a comment explaining why the server is intentionally not started
(blocking is on the `s.cmds` channel level, not subscriber delivery)
- use `range bufCap` loop instead of hardcoded publish calls
- collapse final assertion to one line

---------

Co-authored-by: jay.tseng <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Vlad J <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Dmitry S <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matt Acciai <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: songgaoye <[email protected]>
Co-authored-by: Alex | Cosmos Labs <[email protected]>
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Eric Warehime <[email protected]>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: songgaoye <[email protected]>
kevindharmawan pushed a commit to SeeMoReLab/cometbft that referenced this pull request Jul 30, 2026
rootulp added a commit to celestiaorg/celestia-core that referenced this pull request Nov 9, 2026
…ting extended commits (#3616)

Closes [PROTOCO-3528](https://linear.app/celestia/issue/PROTOCO-3528)
Closes [PROTOCO-2801](https://linear.app/celestia/issue/PROTOCO-2801)

Ports upstream CometBFT's `ValidatorSet.VerifyCommitExtended` (cometbft/cometbft#5873, v0.38.x backport #5877) and uses it in blocksync when vote extensions are enabled. It checks that extensions are present, verifies the commit, and also verifies each vote extension signature before the extended commit is persisted. This only matters when vote extensions are enabled (`VoteExtensionsEnableHeight > 0`).

Tests: upstream `TestVerifyCommitExtended`, plus a new reactor test `TestBlockSyncVerifiesVoteExtensionSignatures` (fails on `main`, passes with this change). The blocksync fuzz harness now checks extension signatures and has a new seed for this case.

---
_Generated by [Claude Code](https://claude.ai/code/session_01K7RNxbncz2ofoyBqAyucMo)_
rootulp added a commit to celestiaorg/celestia-core that referenced this pull request Nov 9, 2026
…ting extended commits (#3616)

Closes [PROTOCO-3528](https://linear.app/celestia/issue/PROTOCO-3528)
Closes [PROTOCO-2801](https://linear.app/celestia/issue/PROTOCO-2801)

Ports upstream CometBFT's `ValidatorSet.VerifyCommitExtended` (cometbft/cometbft#5873, v0.38.x backport #5877) and uses it in blocksync when vote extensions are enabled. It checks that extensions are present, verifies the commit, and also verifies each vote extension signature before the extended commit is persisted. This only matters when vote extensions are enabled (`VoteExtensionsEnableHeight > 0`).

Tests: upstream `TestVerifyCommitExtended`, plus a new reactor test `TestBlockSyncVerifiesVoteExtensionSignatures` (fails on `main`, passes with this change). The blocksync fuzz harness now checks extension signatures and has a new seed for this case.

---
_Generated by [Claude Code](https://claude.ai/code/session_01K7RNxbncz2ofoyBqAyucMo)_

(cherry picked from commit bee6fc1)

# Conflicts:
#	blocksync/reactor_fuzz_test.go

Co-authored-by: Rootul P <[email protected]>
rootulp added a commit to celestiaorg/celestia-core that referenced this pull request Nov 9, 2026
…ting extended commits (backport #3616) (#3630)

Closes [PROTOCO-3528](https://linear.app/celestia/issue/PROTOCO-3528)
Closes [PROTOCO-2801](https://linear.app/celestia/issue/PROTOCO-2801)

Ports upstream CometBFT's `ValidatorSet.VerifyCommitExtended`
(cometbft/cometbft#5873, v0.38.x backport #5877) and uses it in
blocksync when vote extensions are enabled. It checks that extensions
are present, verifies the commit, and also verifies each vote extension
signature before the extended commit is persisted. This only matters
when vote extensions are enabled (`VoteExtensionsEnableHeight > 0`).

Tests: upstream `TestVerifyCommitExtended`, plus a new reactor test
`TestBlockSyncVerifiesVoteExtensionSignatures` (fails on `main`, passes
with this change). The blocksync fuzz harness now checks extension
signatures and has a new seed for this case.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01K7RNxbncz2ofoyBqAyucMo)_<hr>This
is an automatic backport of pull request #3616 done by
[Mergify](https://mergify.com).

---------

Co-authored-by: Rootul P <[email protected]>
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

backport-to-v0.38.x Tell Mergify to backport the PR to v0.38.x backport-to-v0.39.x Tell Mergify to backport the PR to v0.39.x

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants