Skip to content

build(deps): Bump golang.org/x/net from 0.57.0 to 0.58.0 - #1412

Closed
dependabot[bot] wants to merge 2 commits into
v1.7-devfrom
dependabot/go_modules/golang.org/x/net-0.58.0
Closed

dependabot[bot] wants to merge 2 commits into
v1.7-devfrom
dependabot/go_modules/golang.org/x/net-0.58.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Bumps golang.org/x/net from 0.57.0 to 0.58.0.

Commits
  • acc78e0 go.mod: update golang.org/x dependencies
  • 90d10f0 internal/http3: delete invalid Content-Length if declared in server handler
  • 08abf4d internal/http3: infer headers when Content-Encoding is set but is empty
  • 8d10596 http2: avoid deadlocks in wrapped ClientConn state callback
  • 99c3b0a http2/hpack: build the table lookup maps lazily, only for encoders
  • 5a920b1 http3: rework registration to allow using a fake network
  • 7fd2842 quic: return an error from Accept after PacketConn reader exits
  • 825111d quic: avoid busy-loop when keep-alive is blocked by congestion control
  • a02ddfa http/httpproxy: prioritize lowercase proxy environment variables
  • 574e5eb quic: halt conn goroutines on close when listener exits early
  • Additional commits viewable in compare view

@dependabot dependabot Bot added the dependencies Pull requests that update a dependency file label Aug 18, 2026
@dependabot dependabot Bot added the dependencies Pull requests that update a dependency file label Aug 18, 2026
@dependabot
dependabot Bot changed the base branch from v1.6-dev to v1.7-dev August 25, 2026 08:36
@Claudius-Maginificent

Copy link
Copy Markdown
Collaborator

Dependency Security Review — golang.org/x/net 0.57.0 → 0.58.0

Righto, cracked this one open properly. Verdict up front: the bump is Safe. The red CI is not this PR's fault — every failing check already fails on v1.7-dev itself.

Change Summary

Dependabot pulled three modules, not one (the title undersells it):

Module Old New Type
golang.org/x/net 0.57.0 0.58.0 direct
golang.org/x/crypto 0.54.0 0.55.0 direct (co-bumped)
golang.org/x/text 0.40.0 0.41.0 indirect

14 commits in x/net, 31 files, +1123/-398. Nature: bug fixes and hardening. No breaking API changes, no new transitive dependencies.

Diff Integrity — clean

  • Tag integrity verified. v0.58.0 resolves to acc78e0d2b2c855c0c4fbdcfe5f42a9e3d0f9778 in an independent clone, byte-identical to the Origin.Hash that proxy.golang.org recorded for refs/tags/v0.58.0. No moved tag.
  • Checksums verified. All six go.sum lines in this PR match sum.golang.org exactly. go mod verify → all modules verified.
  • No undocumented commits. All 14 commits carry Gerrit Reviewed-on trailers and named Google reviewers; every touched file maps to a commit message. No install/build hooks (Go has none), no obfuscation, no new outbound network calls, no new env-var reads.
  • Contributor provenance normal — changes landed by bradfitz, dneil et al., plus one reviewed outside contribution.

Known Vulnerabilities

Module OSV result
x/net 0.58.0 None
x/text 0.41.0 None
x/crypto 0.55.0 GO-2026-5932 only — the perennial "x/crypto/openpgp is unmaintained" advisory, applies to all versions (introduced: 0)

GO-2026-5932 does not apply to us: tenderdash imports zero openpgp packages (grepped, confirmed), and govulncheck did not flag it as reachable.

What Actually Reaches Our Binary

Most of the diff is irrelevant to tenderdash. Of the packages changed, only http2 and http2/hpack are in our build graph (pulled in via gRPC). quic, http3, internal/http3 — roughly 900 of the 1123 added lines — are not compiled by us at all. Likewise http/httpproxy (so the lowercase-proxy-env behavior change can't affect us) and dns/dnsmessage (so the new SVCB boundary check is upstream goodness we simply don't exercise).

I read the two in-graph commits line by line:

  1. 99c3b0a http2/hpack: build lookup maps lazily, only for encoders. Correct, and a net security win for us. Decoder dynamic tables no longer allocate byName/byNameValue maps — upstream measured ~230MB of live heap reclaimed on a 124k-connection proxy. Our gRPC/RPC server pins one decoder table per connection, so this shaves a genuine per-peer memory-amplification DoS surface. I checked the obvious trap: search now mutates the table (lazy buildMaps) on a formerly read-only path, which would be a data race if the shared package-level staticTable hit it. It cannot — static_table.go ships both maps as eagerly-populated composite literals, so byName != nil at package init and the lazy path is never taken for the global. Per-encoder dynamic tables are single-goroutine-owned. No race. The reconstructed ids in buildMaps (evictCount + k + 1) also match addEntry's formula exactly, and newest-wins on duplicates is preserved by iteration order.
  2. 8d10596 http2: avoid deadlocks in wrapped ClientConn state callback. Fixes net/http: Go 1.27rc2 deadlocks in net/http when using x/net/http.Transport golang/go#80680. Moves Reserve() out from under cc.mu, and correctly releases the reservation if doNotReuse wins the race. Strictly an improvement.

Library audit findings: none at MEDIUM or above. Nothing to fix on our side.

The Red CI — pre-existing, not caused by this bump

This is the bit that matters for the audit verdict, so here's the evidence rather than a vibe.

govulncheck FAILURE — 100% pre-existing, and nothing a dependency bump can fix.

All 6 reported vulnerabilities are Go standard library, not module dependencies. The log's own summary line: Your code is affected by 6 vulnerabilities from the Go standard library.

ID Package Fixed in
GO-2026-6218 net/url go1.26.6
GO-2026-6091 html/template go1.26.6
GO-2026-6090 crypto/tls go1.26.6
GO-2026-6089 net/http go1.26.6
GO-2026-5972 encoding/asn1 go1.26.6
GO-2026-5026 net/http go1.26.6

Every single one is Fixed in: <pkg>@go1.26.6, and this repo pins Go 1.26.5 in go.mod and in all ten workflow files. Zero of the six live in x/net, x/crypto, or x/text. Confirmed independently: govulncheck fails on v1.7-dev itself — both of the base branch's recent push runs are red. That is also why #1410 and #1411 show the identical failure.

The fix is a Go toolchain bump to 1.26.6+, in its own PR — not something #1412 introduces, and not something #1412 could ever have resolved.

tests (01) FAILURE — pre-existing flake. --- FAIL: TestReactorValidatorSetChanges (120.08s), a consensus reactor block-wait timeout (context deadline exceeded, part-set header mismatch). The identical test fails on base branch v1.7-dev at bf3d1b0 — a plain push commit with no dependency changes. Sibling PR #1411 passes tests (01) on the same base. Nothing about netutil/http2 plausibly reaches consensus block propagation.

golangci-lint CANCELLED — cancelled, not failed. #1410 shows it green on the same base. No signal here; the rebase will re-run it.

Codebase Compliance

Check Status
openpgp (GO-2026-5932) imported? No — advisory inapplicable
Direct x/net surface netutil.LimitListener only (rpc/jsonrpc/server/http_server.go:304) — untouched by this diff
x/crypto surface p2p secret-connection primitives (chacha20poly1305, curve25519, hkdf, nacl/box, ripemd160) — untouched by this diff
go mod verify all modules verified (exit 0)
Module graph resolves Yes, -mod=readonly clean

Risk Assessment

Overall: Safe. Clean supply-chain provenance, no applicable advisories, and the only changes that reach our binary are a deadlock fix and a memory-reduction win on an attacker-facing path. Diff integrity is unblemished, so nothing floors the rating.

Recommendations

  1. Merge this once CI is green — the bump itself is sound. I've triggered a rebase to pick up current base.
  2. Open a separate PR bumping the pinned Go toolchain 1.26.5 → 1.26.6+ (go.mod plus all ten .github/workflows/*.yml). That is the single change that turns govulncheck green across build(deps): Bump golang.org/x/crypto from 0.54.0 to 0.55.0 #1410, build(deps): Bump github.com/stretchr/testify from 1.11.1 to 1.12.1 #1411 and build(deps): Bump golang.org/x/net from 0.57.0 to 0.58.0 #1412 at once. Two of those six stdlib vulns (crypto/tls handshake, net/http server) are reachable from our RPC server and Dash Core client paths, so this is worth doing on its own merits, not just to un-red the dashboard.
  3. TestReactorValidatorSetChanges deserves a flake ticket — it's failing on the base branch and taxing every dependabot PR with a false red.

🤖 Co-authored by Claudius the Magnificent AI Agent

@Claudius-Maginificent

Copy link
Copy Markdown
Collaborator

@dependabot rebase

@dependabot @github

dependabot Bot commented on behalf of github Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

Sorry, only users with push access can use that command.

@lklimek

lklimek commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

@dependabot rebase

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.57.0 to 0.58.0.
- [Commits](golang/net@v0.57.0...v0.58.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.58.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot
dependabot Bot force-pushed the dependabot/go_modules/golang.org/x/net-0.58.0 branch from 8c963ed to b0ab5ab Compare August 25, 2026 09:13
@lklimek lklimek mentioned this pull request Aug 25, 2026
1 of 5 tasks
lklimek added a commit that referenced this pull request Aug 26, 2026
govulncheck fails identically on v1.7-dev and every open PR branch
(#1412, #1411, #1410) with 6 Go standard-library findings, all
"Found in: go1.26.5 / Fixed in: go1.26.6":

- GO-2026-6218 (net/url)
- GO-2026-6091 (html/template)
- GO-2026-6090 (crypto/tls)
- GO-2026-6089 (net/http, x2)
- GO-2026-5972 (encoding/asn1)

Reachable from our TLS/RPC/HTTP server and Dash Core client paths
(same call sites as PR #1395). Bumping the pinned toolchain from
1.26.5 to 1.26.6 turns govulncheck green everywhere at once and
unblocks #1412, #1411, #1410.

Mirrors PR #1395's pattern (1.26.4 -> 1.26.5): pure patch-release
toolchain swap, no language/API changes, same 16 files touched
(go.mod, CI workflow go-version pins, Dockerfiles, docs).

Verified locally with go1.26.6: go build ./... succeeds, and
govulncheck ./... reports 0 vulnerabilities (down from 6).


Claude-Session: https://claude.ai/code/session_01RoXmbFrVf1BqVW1BHZv6Va

Co-authored-by: Claude Sonnet 5 <[email protected]>
@Claudius-Maginificent

Copy link
Copy Markdown
Collaborator

🔒 Dependency Security Audit — golang.org/x/net 0.57.0 → 0.58.0

Audited by request. Nothing here was taken on trust: every claim below was verified against upstream source, the Go checksum database, and the build graph — not against a scanner's summary.

Change Summary

Module From To Direct?
golang.org/x/net 0.57.0 0.58.0 direct
golang.org/x/crypto 0.54.0 0.55.0 direct (MVS fallout — this is the whole of #1410)
golang.org/x/text 0.40.0 0.41.0 indirect

Diff touches go.mod and go.sum only — consistent with every prior gomod dependabot commit on v1.7-dev (#1383–#1398). No stray files.

Supply-Chain Integrity — verified, not assumed

  • Checksum DB match. All three h1: and /go.mod hashes in go.sum were independently fetched from sum.golang.org/lookup/... and compared byte-for-byte. All match. go mod verify → all modules verified. go mod tidy -diff → no-op.
  • Tag integrity. v0.58.0 resolves to acc78e0d2b2c (Gopher Robot, 2026-08-12), matching the commit set dependabot enumerated. No moved tag.
  • Diff shape. 14 commits; no new files, no non-Go files beyond go.mod/go.sum, no build/release hooks, no obfuscated or encoded blobs, no new os/exec, environment reads, or outbound network calls. The two //go:linkname hits a naive grep flags in http3/http3.go are pre-existing (symbols renamed, not introduced) — I diffed v0.57.0 to confirm.
  • Provenance. 13/14 commits by Go core (Damien Neil, Nicholas Husin, Brad Fitzpatrick, Gopher Robot). The single external contribution is the dns/dnsmessage bounds check, three named Google reviewers plus LUCI trybot; I read it line-by-line — a 4-line bodyEnd > len(msg) guard returning errResourceLen, no behaviour change beyond rejecting malformed input.

Known Vulnerabilities

Source Result
OSV.dev — x/[email protected] and @0.58.0 none
OSV.dev — x/[email protected] none
OSV.dev — x/[email protected] GO-2026-5932 (openpgp unmaintained) — applies to all versions, package not in build graph, pre-existing
GitHub Advisory DB — x/net highest patched version across all 10 advisories is 0.55.0; 0.57.0 was already clear
Repo Dependabot alerts none for x/net, x/crypto, x/text
govulncheck CI job pass

This is not a security-fix release. 0.57.0 carried no outstanding registered advisory, so the bump closes nothing — it is routine currency maintenance. Merge it on that basis, not on a false premise that it patches something.

What Actually Reaches This Codebase

go list -deps ./... (842 packages) gives the reachable set. Of the x/net packages in the module build graph — context, http/httpguts, http2, http2/hpack, idna, internal/httpcommon, internal/httpsfv, netutil, trace, internal/timeseries — only two changed:

  • http2/hpack (reachable via gRPC's HTTP/2 framer, both directions). Change: dynamic-table lookup maps built lazily so decoder tables never allocate them. I reviewed it for the obvious traps and it is sound: staticTable is a generated literal with both maps already non-nil, so buildMaps() never fires on the shared global — no lazy-init race across connections; buildMaps's id arithmetic (evictCount + k + 1) matches addEntry's, including newest-wins ordering; decoder paths never call search. Net effect is a reduction in per-connection heap, i.e. it mildly improves our posture against HTTP/2 many-connection memory pressure.
  • http2 (transport_wrap.go) — deadlock fix for ClientConn.Reserve called under cc.mu (net/http: Go 1.27rc2 deadlocks in net/http when using x/net/http.Transport golang/go#80680). Compiled but not exercised: we do not use http2.Transport; gRPC carries its own transport.

netutil — our only direct x/net import (rpc/jsonrpc/server/http_server.go:304, LimitListener) — has zero diff between the two versions. Likewise idna, httpguts, internal/httpcommon, internal/httpsfv, trace, context.

The eye-catching entries in the changelog (quic/*, internal/http3/*, http/httpproxy, dns/dnsmessage) are not reachable. Note the trap worth stating explicitly: dns/dnsmessage and http/httpproxy do appear in the dependency listing, but only as vendor/golang.org/x/net/... — the standard library's own vendored copies, pinned by the Go toolchain (1.26.6), not by our go.mod. So:

  • the unpackSVCBResource out-of-bounds slice fix (CWE-125, an unregistered security fix — no CVE, no GHSA) does not land via this bump; it arrives only with a Go toolchain update;
  • the http/httpproxy change in lowercase-vs-uppercase HTTP_PROXY precedence — the one genuine behaviour change in this release, and the only one with operational bite — likewise does not reach us here. Worth knowing for the day the toolchain moves: any deployment setting both cases with different values would see the proxy target flip.

Crypto Path — x/crypto 0.54.0 → 0.55.0

This one matters more than the headline dependency, since it sits under secret_connection. Verdict: the sovereign crypto path is byte-identical.

chacha20poly1305, curve25519, hkdf, nacl/box, ripemd160, chacha20, salsa20/salsa, sha3, blake2b, argon2, pbkdf2 — no diff whatsoever. The release is ssh/*, acme, ocsp, and an x509roots bundle refresh, none of which we import. The only change touching our graph is internal/poly1305: a new riscv64 assembly file plus two build-tag lines adding riscv64. The amd64/arm64 code paths we build are unchanged.

For the record, 0.55.0 does carry real hardening (ssh: reject certificate signature keys before recursing, ssh: enforce the source-address critical option for all auth callbacks) — delivered, but not applicable to us.

x/text 0.41.0 has one functional commit, in secure/precis — not in our build graph (we pull only secure/bidirule, transform, unicode/*, language, cases, encoding, runes).

CI Assessment — tests (02) failure is flaky, not caused by this bump

--- FAIL: TestLoadRouterSharedQueueOccupancyAndDrops
    load_router_queue_test.go:54: "76" is not less than or equal to "72"

Three independent lines of evidence, and I would not sign this off on fewer:

  1. No causal path exists. internal/p2p imports golang.org/x/net nowhere. internal/p2p/limit_listener.go merely names netutil.LimitListener in a comment as a design analogue — it is a local reimplementation with no version coupling. And netutil did not change in this release regardless.

  2. The assertion is a scheduling-dependent measurement, not a determinism check. The test floods an undrained queue and asserts retention ≤ ceiling+capacity (72). Retention depends on how far the queue's consumer goroutine gets before the producer stops — under -race, on a loaded shared runner. 76 is a 5.5% overshoot of a hand-tuned tolerance, not a broken bound.

  3. Sibling PRs failed the same way, at the same moment, on different tests. Three dependabot runs launched within ~10 seconds today each failed a different member of the same load-measurement family introduced in build(deps): Bump github.com/cosmos/iavl from 0.15.0-rc5 to 0.15.0 #17:

    Three unrelated dependency bumps cannot each break a different timing assertion in the same package. Shared-runner contention can, and did.

Recommendation beyond this PR: that test family is a recurring red herring on every dependabot run and will keep costing triage time. Either widen the tolerances to reflect measured variance, gate them behind a build tag, or mark them t.Skip under CI load. Filing that as follow-up work would be time well spent.

Out of Scope, but Flagging It — our govulncheck gate has a blind spot

While enumerating the tree I found something that has nothing to do with this PR and everything to do with our exposure:

google.golang.org/grpc v1.82.1 is affected by GHSA-vp52-pcj8-j9qc (HIGH) — gRPC-Go heap memory exhaustion (OOM) via HTTP/2 DATA frame fragmentation. Fixed in 1.83.1. We expose gRPC.

The part that should concern us: this advisory is not registered in the Go vulnerability database (vuln.go.dev) — OSV returns the GHSA with no GO- identifier. That is precisely why the govulncheck job on this PR is green while the exposure is live. Our automated gate is blind to it, and will be blind to every advisory the Go DB never registers. Treat a green govulncheck as necessary, not sufficient.

#1433 (grpc 1.82.1 → 1.83.2) closes it and should be prioritised ahead of this PR.

Risk Assessment

Overall: Safe.

  • Supply-chain integrity independently verified against sum.golang.org — clean.
  • Diff integrity — clean; nothing undocumented, no hooks, no obfuscation, provenance sound.
  • No registered advisory affects either the old or the new version.
  • Reachable code delta is two http2 packages; the only one actually exercised (hpack) is a reviewed, correct memory reduction.
  • The crypto path under secret_connection is untouched, verified file-by-file.
  • The single failing check has no causal path to this change and is corroborated as flaky by two sibling PRs.

No blocking gates tripped. No security concern attributable to this bump.

Merge notes: landing this makes #1410 empty — confirm dependabot auto-closes it rather than leaving a conflicting go.sum behind. x/sys and x/term sit un-annotated in the indirect require block (go.mod:355-356), a pre-existing cosmetic inconsistency go mod tidy will not repartition; untouched here, noted for the record only.


🍬 Tally — 4: 1 HIGH (GHSA-vp52-pcj8-j9qc, pre-existing, out of scope), 1 MEDIUM (govulncheck blind to unregistered advisories), 2 INFO (unregistered dnsmessage OOB fix not reaching us; httpproxy precedence behaviour change deferred to the toolchain).

🤖 Co-authored by Claudius the Magnificent AI Agent

@Claudius-Maginificent

Copy link
Copy Markdown
Collaborator

@dependabot rebase

@dependabot @github

dependabot Bot commented on behalf of github Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Sorry, only users with push access can use that command.

@Claudius-Maginificent

Copy link
Copy Markdown
Collaborator

Addendum — the CI flake is now reproduced, not merely argued

My assessment above rested on absence-of-causal-path plus the sibling-PR pattern. That is circumstantial, so it has been corroborated with a controlled local run (go1.26.6, -race, -count=10) on both dependency sets:

Tree Result Observed held values (threshold 72)
This PR (x/net 0.58.0) 10/10 pass 60, 62, 58, 67, 60, 58, 61, 58, 62, 60 — max 67
Base v1.7-dev (x/net 0.57.0) 10/10 pass 63, 61, 58, 61, 58, 60, 61, 71, 62, 63 — max 71

Two things settle it:

  1. The distributions are indistinguishable. No dependency-mediated mechanism moves this number, and the trace confirms why — internal/p2p/rqueue.go imports only container/heap, sort, time, and gogoproto. Nothing from x/net.
  2. The unmodified base came within a single count of the ceiling (71 vs 72). The margin this assertion ships with is one envelope on a quiet local machine. A contended CI runner reaching 76 is the expected tail of that distribution, not a signal.

Root cause, precisely: simpleQueue.run() trims the heap to maxSize only when the 1-buffered signal channel send fails, or on a 10 ms ticker — never synchronously per enqueue(). So overshoot equals whatever arrives inside the pre-trim window, which is a function of goroutine scheduling on the host. ceiling+capacity is an empirically-padded fudge factor, not a structural guarantee, and the test message ("its memory is unbounded") overstates what a breach actually proves.

Follow-up worth filing (out of scope here, pre-existing): either trim synchronously once past maxSize, or restate the bound as explicitly probabilistic. As it stands this test will keep ambushing unrelated PRs — three did today alone.

Verdict unchanged: Safe. The red check is not attributable to this bump.

🤖 Co-authored by Claudius the Magnificent AI Agent

@Claudius-Maginificent

Copy link
Copy Markdown
Collaborator

Status — audit complete, CI retry blocked on permissions

For the record, so the next person does not repeat the attempt:

  • @dependabot rebase → refused: "Sorry, only users with push access can use that command."
  • gh run rerun --failed on run 33633800680 → refused: "Must have admin rights to Repository."

Both routes to giving CI a second run are closed to a triage-role account, so the head commit is unchanged and tests (02) still shows its original red. That red is the reproduced flake documented above, not a defect in this bump.

This PR needs someone with push access to do one of: re-run the failed tests (02) job, or comment @dependabot rebase. Either should clear it — the failure has no causal path to the dependency change, and the base branch reproduces the same assertion within one count of its ceiling.

Audit verdict stands: Safe. Not merged, solely because the required check is red and I will not merge past a red gate on a flake I cannot clear myself.

Worth doing ahead of this: #1433 (grpc 1.82.1 → 1.83.2), which closes the HIGH GHSA-vp52-pcj8-j9qc OOM advisory that govulncheck cannot see.

🤖 Co-authored by Claudius the Magnificent AI Agent

@lklimek

lklimek commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

@dependabot rebase

@dependabot @github

dependabot Bot commented on behalf of github Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Looks like this PR has been edited by someone other than Dependabot. That means Dependabot can't rebase it - sorry!

If you're happy for Dependabot to recreate it from scratch, overwriting any edits, you can request @dependabot recreate.

@lklimek

lklimek commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

@dependabot recreate

@dependabot @github

dependabot Bot commented on behalf of github Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Looks like golang.org/x/net is up-to-date now, so this is no longer needed.

@dependabot dependabot Bot closed this Sep 3, 2026
@dependabot
dependabot Bot deleted the dependabot/go_modules/golang.org/x/net-0.58.0 branch September 3, 2026 07:06
lklimek added a commit that referenced this pull request Sep 7, 2026
* chore(deps): bump Go to 1.26.6 (#1417)

govulncheck fails identically on v1.7-dev and every open PR branch
(#1412, #1411, #1410) with 6 Go standard-library findings, all
"Found in: go1.26.5 / Fixed in: go1.26.6":

- GO-2026-6218 (net/url)
- GO-2026-6091 (html/template)
- GO-2026-6090 (crypto/tls)
- GO-2026-6089 (net/http, x2)
- GO-2026-5972 (encoding/asn1)

Reachable from our TLS/RPC/HTTP server and Dash Core client paths
(same call sites as PR #1395). Bumping the pinned toolchain from
1.26.5 to 1.26.6 turns govulncheck green everywhere at once and
unblocks #1412, #1411, #1410.

Mirrors PR #1395's pattern (1.26.4 -> 1.26.5): pure patch-release
toolchain swap, no language/API changes, same 16 files touched
(go.mod, CI workflow go-version pins, Dockerfiles, docs).

Verified locally with go1.26.6: go build ./... succeeds, and
govulncheck ./... reports 0 vulnerabilities (down from 6).

Claude-Session: https://claude.ai/code/session_01RoXmbFrVf1BqVW1BHZv6Va

Co-authored-by: Claude Sonnet 5 <[email protected]>
(cherry picked from commit 0a7a33e)

* ci(lint): bump golangci-lint from v2.12 to v2.13

golangci-lint v2.12.2 (the latest v2.12.x, matching the current
floating `version: v2.12` selector) panics rather than reporting
findings when analyzing this codebase under Go 1.27.1: the bundled
staticcheck analyzer (honnef.co/go/[email protected]) crashes its SSA/IR
builder with "unexpected expr: *ast.KeyValueExpr" while building IR
for the stdlib package internal/poll. Confirmed deterministic
(reproduced twice) and not a stale-binary artifact (rebuilt
golangci-lint v2.12.2 from source with the go1.27.1 toolchain itself,
same panic). Isolating the culprit with --disable=staticcheck makes
the panic disappear and returns 0 issues, but disabling staticcheck
in CI is rejected as a fix: it is the linter catching the QF1008
class, and turning it off to land a version bump would trade a real
gate for a green tick.

golangci-lint v2.13.0 shipped 2026-08-19, the same day as Go 1.27.0 —
the 2.13 line is Go 1.27-compatible where 2.12 predates Go 1.27
entirely. Measured v2.13.2 (the latest v2.13.x) built fresh with both
toolchains: no panic and 0 --new-from-rev findings at go1.26.6 and at
go1.27.1. The two changes are independent, so this commit lands ahead
of and does not depend on the Go 1.27.1 bump that follows it — every
intermediate commit in this branch keeps the lint job runnable.

Kept the existing floating-minor pin convention (`v2.13`, not an
exact `v2.12.2`-style pin): the crash was caused by the minor version
predating Go 1.27, not by floating within a minor, so an exact pin
would have failed identically and there is no reason to change the
convention in response to a problem it did not cause.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019gAC8rAzQagn5sgDxUJNjj

* chore(mockery): bump to v3.7.4 and regenerate

The `check-mocks` CI job pins `mockery=3.7.0` (released 2026-03-06,
five months before Go 1.27.0). Under a go1.27.1 toolchain, mockery
3.7.0 fails outright rather than producing a diff:

    internal error: package "github.com/dashpay/tenderdash/libs/ds"
    without types was imported from "github.com/dashpay/tenderdash/libs/store"

This is mockery's bundled golang.org/x/tools/go/packages loader
failing to attach type information to a transitively-imported
package when driven by the newer toolchain — not a defect in this
repository's source. Reproduced locally under the exact conditions
CI runs (GOTOOLCHAIN=local, the go1.27.1 binary setup-go installs,
no auto-download); the CI log itself can't show this, since the
generation step runs `make mockery 2>/dev/null` and discards stderr
— anyone hitting this in CI needs to reproduce it locally to see
anything past "exit code 2".

mockery v3.7.4 (released 2026-08-23, four days after Go 1.27.0)
fixes it: same reproduction conditions, clean exit. Measured it under
both go1.26.6 and go1.27.1 and got byte-identical regenerated output
either way — the interface{}->any / parameter-naming differences
below come entirely from mockery's own codegen version, not from
which Go toolchain drives it. That's what makes this commit stand on
its own ahead of the Go 1.27.1 bump that follows it in this branch,
rather than being a consequence of it.

Bumped both pin sites: check-generated.yml's MOCKERY and
scripts/mockery_generate.sh's VERSION. The version bump and the
regenerated mocks can't be split into separate commits: CI
regenerates and diffs in the same step, so a pin bump without
regenerated mocks leaves check-mocks red (diff appears), and
regenerated mocks without the pin bump leaves it red too (CI
regenerates with 3.7.0 and hits the error above again).

Regenerated all mocks under mockery v3.7.4 (`make mockery`). The
diff is mechanical and cosmetic only, inspected file-by-file rather
than trusted from the diffstat: every change is either
`interface{}` -> `any` in generated _Expecter method signatures (Go
1.18+ built-in alias, identical type), or a generated parameter name
recovering the interface's real source name where 3.7.0 fell back to
a generic placeholder (`v`, `vs`, `context1`). No method set changed,
no mock behavior changed. Confirmed behaviorally rather than just by
reading the diff: `go build ./...` is clean with the regenerated
mocks in place, and `go test ./internal/consensus/... -count=1` is
green (one run hit the already-known-flaky TestByzantinePrevoteEquivocation
from this task's original brief; a second run was clean, consistent
with that test's known ~18% flake rate and unrelated to this change).

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019gAC8rAzQagn5sgDxUJNjj

* test(rpc): close idle client connections in TestMaxOpenConnections

Go 1.27 changed HTTP/1 Response.Body.Close() to automatically drain
any unread content, up to a conservative limit, to allow the
underlying connection to be reused (see the "net/http" section of
the Go 1.27 release notes). TestMaxOpenConnections never reads its
response bodies before closing them, so under Go 1.27 the requests
it makes leave healthy, idle keep-alive connections sitting in the
client's pool instead of being closed outright as they were under
Go 1.26. Those idle connections keep the corresponding server-side
handler goroutines parked in a read wait, which the leaktest check
registered at the top of the test flags as leaked:

    leaktest: leaked goroutine: ... [IO wait]:
        ... net/http.(*conn).serve ...
        created by net/http.(*Server).Serve

This is not a defect in the server's shutdown path, and reading the
response body before closing it does not fix it — 1.27 already
drains it for you, which is the entire behavior change; an explicit
drain reaches the identical end state (healthy, pooled connection,
server goroutine still parked). Confirmed by testing it directly:
draining the body explicitly still leaks 100% of the time under
go1.27.1.

Fixed by sharing one Client across the request goroutines (http.Client
is safe for concurrent use) and calling its CloseIdleConnections after
they've all completed, before the leaktest check fires. This does not
change what the test measures: instrumented it locally to confirm
peak concurrent open connections still reaches exactly `max` with the
shared client, matching the per-goroutine-client version — concurrent
in-flight requests still each need their own connection regardless of
pooling, since pooling only affects connections after they go idle.

Verified at both go1.26.6 and go1.27.1 (5 consecutive runs each,
clean at both, plus one run with -race): this fix is a general test
correctness improvement, not conditional on either toolchain, which
is why it lands ahead of the Go 1.27.1 bump in this branch rather
than after it.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019gAC8rAzQagn5sgDxUJNjj

* test(rpc): assert on our own error family, not stdlib phrasing

TestRPCParams and TestParseURI/Decode asserted on the stdlib's exact
wording for a malformed json.Number ("invalid number literal" /
"invalid number"). That wording changed between Go versions — under
Go 1.27 it reads "cannot unmarshal string ... into Go value of type
json.Number: invalid syntax" instead — which breaks the assertion
even though the actual behavior (the malformed input is still
rejected, with the same RPC error code) hasn't changed at all.

Traced the code path rather than guessing a new substring:
RPCFunc.parseParams wraps every parameter-decode failure via
invalidParamsError(), which always builds an rpctypes.RPCError with
Code: CodeInvalidParams and Message: CodeInvalidParams.String() —
our own constant, literally "Invalid params", unconditionally. Only
RPCError.Data ever carries the wrapped stdlib error text. Asserting
on "Invalid params" instead of the stdlib phrase pins our own
contract (this rejection landed in the invalid-params family) rather
than a description we don't own and that a future Go release is free
to reword again.

This is also a stronger assertion than the one it replaces: the old
substring match could not distinguish an invalid-params rejection
from any other error that happened to contain the same words,
whereas the new one names the specific error family.

Checked for the same pattern elsewhere before touching only these
two sites: types/genesis_test.go:164 pins a different stdlib JSON
error string ("cannot unmarshal string into Go struct field ... of
type int64"), but that's the struct-field type-mismatch error class,
not the json.Number-literal class this Go release changed, and it
already passes clean under go1.27.1 (16/16 subtests) — confirmed by
running it, not assumed. Two sites, not a repo-wide problem.

Verified at both go1.26.6 and go1.27.1 (all TestRPCParams and
TestParseURI subtests green at both, full package test suite green
at go1.26.6): version-neutral, so this lands ahead of the Go 1.27.1
bump rather than after it.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019gAC8rAzQagn5sgDxUJNjj

* chore(deps): bump Go to 1.27.1

Follow-on to the previous two commits: with golangci-lint on v2.13
(previous commit), it is safe to move the pinned Go toolchain past
1.26.6 to 1.27.1. This is a minor-version bump, not a patch bump —
Go 1.26.6 -> 1.27.1 crosses a Go release boundary, so the "no
language/API changes" claim that held for the 1.26.5 -> 1.26.6 patch
swap does not carry here and was verified fresh rather than assumed.

Verified for the full three-commit stack (this commit on top of the
golangci-lint v2.13 bump on top of the Go 1.26.6 cherry-pick):

- go build ./... clean.
- go vet ./... reports the same 4 findings, byte-for-byte, before and
  after this commit (3x fmt.Errorf %q in test/e2e/pkg/testnet.go, 1x
  IPv6 address format in dash/quorum/nodeid_resolver.go) — all
  pre-existing and unrelated to this change. No new vet strictness
  under Go 1.27.
- govulncheck ./... reports the same finding sets before and after:
  0 stdlib vulnerabilities affecting our code, and the same 4
  dependency-only findings our code doesn't call (GO-2026-6355,
  GO-2026-6354, GO-2026-6303, GO-2026-5932) on both sides.
- golangci-lint v2.13.2 (what the v2.13 selector resolves to) with
  --new-from-rev=origin/v1.7-dev: 0 issues, no panic.
- go test ./internal/consensus/... -count=1, twice: both green
  (61.1s, 69.0s) on the final three-commit stack.
- GOTOOLCHAIN=auto correctly resolves and downloads go1.27.1 from
  this module's go.mod, confirmed via `go version` run from inside
  the module.

What moved, reported rather than fixed:

- golangci-lint's gofmt formatter (.golangci.yml formatters.enable)
  flags one pre-existing, untouched file — internal/rpc/core/
  mempool.go:149 — as differently formatted under Go 1.27.1's
  bundled gofmt than under 1.26.6's (a multi-value return with a
  composite literal inside a select/case reindents differently).
  --new-from-rev correctly excludes it since the affected line isn't
  part of any diff in this branch, so no CI gate fails on it. It is
  an active check, not an absent one — it simply isn't triggered
  against a line this branch touches. Left unformatted: out of scope
  for a toolchain-pin change.
- During earlier measurement (not the two required runs above, both
  of which were clean), one go1.27.1 run of
  `go test ./internal/consensus/...` hit a failure in
  TestPoC_HeightVoteSet_UnboundedRoundAllocation (retained 308 bytes
  per message against a <149 threshold), not one of the two
  previously-known flaky tests in this package. Isolated reruns of
  just this test passed 5/5 under go1.27.1 and 3/3 under go1.26.6.
  The 1.26.6 baseline never ran this test under equivalent
  full-package concurrent load, so this is not a like-for-like
  comparison between Go versions — left unresolved and not claimed
  to be version-related.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019gAC8rAzQagn5sgDxUJNjj

* style: reformat mempool.go for Go 1.27's gofmt

Go 1.27's gofmt reindents a multi-value return containing a composite
literal inside a select/case block differently than Go 1.26's gofmt
does: the composite literal body and the trailing fmt.Errorf
continuation drop one level of indentation. Formatted here with the
go1.27.1 toolchain's own gofmt -w -s (`go env GOROOT`'s bin/gofmt
under this branch's now-pinned toolchain) — the same flags
`make format`'s gofmt step uses; `-s` (simplify) produces an
identical diff to plain gofmt here, so it isn't smuggling in any
rewrite beyond the reindent.

Ran the full-repository gofmt -l -s sweep under go1.27.1 first, using
make format's own exclusions (skip *.pb.go, *pb_test.go, .git) rather
than fixing only the single file golangci-lint's filtered lint run
had named: internal/rpc/core/mempool.go was the only file the sweep
flagged, before and after -s. Did not run the rest of `make format`
(golines, goimports) since those are separate tools operating on
unrelated lines (line-wrapping, import grouping) — out of scope for
a pure gofmt-drift fix.

This repository has no standalone gofmt gate that this drift was
failing: .golangci.yml's `formatters.enable` list does include gofmt
(a distinct section from `linters.enable` in golangci-lint v2's
config schema — it is an active check, not an absent one), but the
one finding it produced was on a line outside any diff in this
branch, so `--new-from-rev` filtered it and no CI gate was failing.
`make format` itself writes rather than checks, so it enforces
nothing on its own either. This commit removes latent formatting
drift ahead of it mattering, not a fix for a red gate.

Confirmed asymmetric in both directions: after this reformat,
`gofmt -l -s` is clean under go1.27.1 (this branch's pinned
toolchain) but go1.26.6's gofmt now wants the same lines re-indented
back the other way. Anyone building this file with a local Go 1.26.x
toolchain and running gofmt/make format against it will see a diff
again — expected, since the two Go versions' gofmt disagree on this
construct in both directions, and this branch is pinned to 1.27.1.

No logic changes: the diff is pure reindentation of already-existing
lines, confirmed via `gofmt -d` before applying.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019gAC8rAzQagn5sgDxUJNjj

---------

Co-authored-by: Claude Sonnet 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants