[v0.20.x-branch] Backport #11098: build: bump Go language to 1.25.13 and toolchain to 1.26.6 - #11103
Conversation
🔴 PR Severity: CRITICAL
🔴 Critical (1 file)
🟠 High (3 files)
🟡 Medium (9 files)
🟢 Low (14 files)
AnalysisThis PR is a mechanical Go toolchain/version bump (go 1.25.13 → 1.26.6) touching To override, add a |
Go 1.26 drops the 32-bit windows/arm port, so cross-compiling the windows-arm release target fails once the toolchain moves to 1.26.6. Switch the release matrix and release flags to windows-arm64, matching what master did in lightningnetwork#10838 (commit d3dad16). That change bundled the arm64 switch into a Go toolchain bump but was never backported to v0.20.x, so it is carried here alongside the toolchain bump that requires it.
|
Heads up for reviewers: pushed one additional commit — Go 1.26 drops the 32-bit windows/arm port, so once this PR moves the toolchain to 1.26.6 the It's a two-line change ( |
843d436
into
lightningnetwork:v0.20.x-branch
Backport of #11098
Opened manually rather than via the backport bot, since the change touches
.github/files.go.modfiles move togo 1.25.13Behaviour change reviewers should be aware of
Unlike the v0.21.x backport (#11101), this branch was on
go 1.24.11, so thegodirective crosses a Go minor. That directive is what selects the GODEBUGcompatibility baseline compiled into the binary, so five defaults flip. Verified
on the built binary:
What each dropped pin means for lnd:
containermaxprocs,updatemaxprocsruntime.GOMAXPROCS; the fiveruntime.NumCPU()call sites (rpcserver.go,autopilot/top_centrality.go,fn/slice.go, sig pools) are unaffected, sinceNumCPUreads the affinity mask rather than the cgroup quota. Containerised nodes may see a different schedulerPcount.x509sha256skidcert/selfsigned.goomitsSubjectKeyIdwithIsCA: true, so Go computes it. Cosmetic: the cert is self-signed and pinned by clients. Certs already on disk are untouched.tlssha1cert/tls.goalready pins four non-SHA-1 suites withMinVersion: TLS1.2.decoratemappingsAll five remain overridable at runtime via the
GODEBUGenvironment variable,so an operator can restore the previous behaviour without a rebuild.
Additional fix: windows-arm -> windows-arm64 release target
Go 1.26 drops the 32-bit windows/arm port, so cross-compiling the
windows-armrelease target fails once the toolchain moves to 1.26.6. The release matrix in
.github/workflows/main.ymland the target list inmake/release_flags.mkareswitched to
windows-arm64.This mirrors master's #10838 (commit
d3dad1690), which bundled the same arm64switch into an earlier Go toolchain bump. That change was never backported to
v0.20.x, so it is carried here alongside the toolchain bump that requires it.Added as its own commit for clarity.
Backport adaptations
Every hunk conflicted, since the branch was on
go 1.24.11/ toolchain1.25.5. Conflicts were resolved by taking the incoming version numbers; fourplaces needed manual attention:
Three files do not exist on this branch and are deliberately not
introduced:
.github/workflows/govulncheck.yml,actor/go.mod, andsqldb/v2/go.mod.queue/go.mod— this branch keeps itsgodirective at the end of thefile, while master has it at the top. The three-way merge produced a file with
two
godirectives and dropped therequire github.com/lightningnetwork/lnd/tickerline. Rewritten so the only change is the version.
kvdb/go.mod— thegodirective sits after tworeplacedirectives(GHSA-25xm-hr59-7c27 and GO-2021-0053) that master no longer has in that
position. The conflict region spanned them; restored explicitly.
mobile/README.md— this branch still referencedgo1.17.6via the oldgolang.org/dlURL. Master fixed that in an earlier bump that was neverbackported, so the line is brought up to date here rather than left stale.
Testing
make check-go-version— all Dockerfiles and YAML files report 1.26.6GOTOOLCHAIN=go1.26.6 make build—lnd-debugandlncli-debugbuild and report0.20.3-betaGOTOOLCHAIN=go1.26.6 go build ./...in all 11 submodules — cleango mod edit -jsonparses all 13 trackedgo.modfiles; each verified to contain exactly onegodirective and to differ from the branch only in the version linegit diff --check— clean1.24.11or1.25.5references in tracked files