Skip to content

build: bump grpc to v1.83.1 - #11105

Open
ziggie1984 wants to merge 3 commits into
lightningnetwork:masterfrom
ziggie1984:bump-grpc-1.82.1
Open

build: bump grpc to v1.83.1#11105
ziggie1984 wants to merge 3 commits into
lightningnetwork:masterfrom
ziggie1984:bump-grpc-1.82.1

Conversation

@ziggie1984

@ziggie1984 ziggie1984 commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Change Description

Routine maintenance bump of google.golang.org/grpc to the latest release,
v1.83.1, keeping our gRPC dependency current with upstream. The latest
release rolls up a number of upstream fixes and robustness improvements over
the version we currently pin.

The bump pulls the transitive requirements forward to what grpc v1.83.1
declares (golang.org/x/net, golang.org/x/sys, golang.org/x/text,
golang.org/x/crypto, golang.org/x/mod, golang.org/x/tools,
golang.org/x/term, and the two genproto/googleapis modules).
google.golang.org/protobuf is unchanged at v1.36.11, so the existing
protobuf-go-hex-display replace directive is untouched.

The pinned-dependency CI matrix entry in .github/workflows/main.yml is updated
to match, mirroring the previous grpc bump (#10841).

A second commit runs go mod tidy in the independently-versioned kvdb module
so its transitive requirements and checksums line up with the version selected
by the module graph, matching what was done for the last bump.

Steps to Test

  • go build ./...
  • make build
  • go test ./rpcperms/...
  • make rpc produces no changes to generated code (the protobuf toolchain
    version is pinned separately in lnrpc/Dockerfile and is unaffected)

Pull Request Checklist

Testing

  • Your PR passes all CI checks.

Code Style and Documentation

  • The change obeys the code style guidelines.
  • Commits follow the ideal Git commit structure.
  • This is a dependency bump; no-changelog label applied.

@ziggie1984 ziggie1984 self-assigned this Aug 19, 2026
@ziggie1984 ziggie1984 added this to v0.21 Aug 19, 2026
@ziggie1984 ziggie1984 added this to the v0.21.3 milestone Aug 19, 2026
@ziggie1984 ziggie1984 added the backport-v0.21.x-branch This label triggers a backport to branch `v0.21.x-branch ` label Aug 19, 2026
@ziggie1984
ziggie1984 requested review from gijswijs, starius and yyforyongyu and removed request for yyforyongyu August 19, 2026 20:02
@ziggie1984 ziggie1984 changed the title build: bump grpc to v1.82.1 build: bump grpc to v1.83.1 Aug 20, 2026
@github-actions github-actions Bot added the severity-medium Focused review required label Aug 20, 2026
@github-actions

Copy link
Copy Markdown

🟡 PR Severity: MEDIUM

Classified from 5 changed files | 154 lines changed

🟡 Medium (2 files)
  • go.mod - root module dependency/toolchain version bump
  • go.sum - checksum updates accompanying go.mod bump
🟡 Medium (2 files, kvdb submodule)
  • kvdb/go.mod - kvdb submodule dependency/toolchain version bump
  • kvdb/go.sum - checksum updates accompanying kvdb go.mod bump
🟢 Low (1 file)
  • .github/workflows/main.yml - CI/CD configuration change

Analysis

This PR only touches Go module/toolchain files (go.mod/go.sum in the root and kvdb submodule) plus a one-line CI workflow tweak — consistent with a Go toolchain/dependency version bump. No source files in any critical or high-severity package are touched, file count (5) and line count (154) are both well under the bump thresholds, and no single critical package is affected. Severity is set to MEDIUM based on the go.mod/go.sum changes.


To override, add a severity-override-{critical,high,medium,low} label.

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

LGTM!

Small optional nit added.

Comment thread kvdb/go.mod
go.uber.org/zap v1.17.0 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
golang.org/x/crypto v0.46.0 // indirect
golang.org/x/crypto v0.51.0 // indirect

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.

Nit: x/crypto v0.51.0 can now return an error from ChaCha initialization under explicit strict FIPS mode, while brontide/noise.go:174 assumes only key length can fail. Since Lightning transport requires ChaCha and strict FIPS mode is inherently unsuitable, the code is still safe, but the comment is stale. We can expand it, to clarify the invariant:

diff --git a/brontide/noise.go b/brontide/noise.go
index a1b7cd4dd..a3b7c205d 100644
--- a/brontide/noise.go
+++ b/brontide/noise.go
@@ -172,7 +172,10 @@ func (c *cipherState) InitializeKey(key [32]byte) {
        c.nonce = 0

        // Safe to ignore the error here as our key is properly sized
-       // (32-bytes).
+       // (32-bytes). Starting with x/crypto v0.51.0, this can also return an
+       // error when Go's strict FIPS 140-only mode is enabled. Brontide requires
+       // ChaCha20-Poly1305, which isn't permitted in that mode, so lnd cannot
+       // operate with strict FIPS enforcement enabled.
        c.cipher, _ = chacha20poly1305.New(c.secretKey[:])
 }

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good catch, added the comment expansion in c348a58 as a separate commit.

I went with the comment-only route rather than actually catching the error, for two reasons. First, the path is unreachable for lnd: brontide mandates ChaCha20-Poly1305, which strict FIPS 140-only mode forbids, so the two can't coexist. Second, propagating the error would mean adding an error return to InitializeKey -> rotateKey -> Encrypt, but Encrypt returns only []byte and calls rotateKey from a defer, so that's an invasive signature change through hot-path transport code, out of scope for a dependency bump.

@github-actions github-actions Bot added severity-critical Requires expert review - security/consensus critical and removed severity-medium Focused review required labels Aug 20, 2026
@github-actions

Copy link
Copy Markdown

⚠️ Severity changed: MEDIUMCRITICAL (files changed since last classification)

🔴 PR Severity: CRITICAL

Classified from 6 changed files | 159 lines changed

🔴 Critical (1 file)
  • brontide/noise.go - Noise protocol / encrypted peer connection handshake code
🟡 Medium (4 files)
  • go.mod - root module dependency/toolchain version bump
  • go.sum - checksum updates accompanying go.mod bump
  • kvdb/go.mod - kvdb submodule dependency/toolchain version bump
  • kvdb/go.sum - checksum updates accompanying kvdb go.mod bump
🟢 Low (1 file)
  • .github/workflows/main.yml - CI/CD configuration change

Analysis

This PR was previously classified as MEDIUM (grpc dependency bump only), but it now also modifies brontide/noise.go, which implements the Noise protocol handshake used for encrypted peer connections. Changes to brontide/* require expert review regardless of size, so the severity is raised to CRITICAL. File count (6) and line count (159) are both well under the bump thresholds, so the escalation here comes solely from the package touched, not from PR size.


To override, add a severity-override-{critical,high,medium,low} label.

@ziggie1984 ziggie1984 added the backport-v0.20.x-branch This label is used to trigger the creation of a backport PR to the branch `v0.20.x-branch`. label Aug 20, 2026

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

Commit 1 leaves kvdb/go.mod in an inconsistent intermediate state (grpc v1.82.1) that commit 2 immediately fixes. Squashing would be tidier imho, but each commit still builds, so it's harmless.

The kvdb module is versioned and published independently, so it must
also be tested or consumed as a nested module on its own.

Run go mod tidy in kvdb so the transitive requirements and checksums
match the grpc version selected by the module graph.
x/crypto v0.51.0 adds a second failure mode to chacha20poly1305.New:
it now returns an error under Go's strict FIPS 140-only mode, in
addition to the existing bad-key-length case. The key here is a fixed
[32]byte, and lnd cannot run under strict FIPS mode because brontide
mandates ChaCha20-Poly1305, so the discarded error remains unreachable.
Expand the comment to record that widened invariant.
@ziggie1984

Copy link
Copy Markdown
Collaborator Author

Good catch @gijswijs — fixed in a force-push. That intermediate kvdb state was an artifact of re-basing the earlier v1.82.1 revision onto v1.83.1: a git reset --soft had kept the stale v1.82.1 kvdb change staged, so commit 1 picked it up.

The commits are rebuilt so the split is clean now:

  • commit 1 (build: bump grpc to v1.83.1) touches only the root go.mod/go.sum and the CI pin — kvdb is untouched;
  • commit 2 (kvdb: bump grpc module floor) takes kvdb straight from v1.79.3 to v1.83.1, no intermediate.

The final tree is byte-identical to before, and each commit builds on its own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-v0.20.x-branch This label is used to trigger the creation of a backport PR to the branch `v0.20.x-branch`. backport-v0.21.x-branch This label triggers a backport to branch `v0.21.x-branch ` no-changelog severity-critical Requires expert review - security/consensus critical

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants