Skip to content

mod+multi: bump neutrino to v0.16.2 and btcwallet to 70a94ea#10629

Open
Roasbeef wants to merge 4 commits intomasterfrom
bump-neutrino-btcwallet-deps
Open

mod+multi: bump neutrino to v0.16.2 and btcwallet to 70a94ea#10629
Roasbeef wants to merge 4 commits intomasterfrom
bump-neutrino-btcwallet-deps

Conversation

@Roasbeef
Copy link
Member

@Roasbeef Roasbeef commented Mar 5, 2026

In this PR, we bump two of our core chain backend dependencies: neutrino
from v0.16.1 to v0.16.2, and btcwallet to commit 70a94ea39e9c (a
pre-release past v0.16.17). The btcwallet update changes the
chain.Interface Start method signature from Start() error to
Start(context.Context) error, and the same change was made to
neutrino's ChainService.Start. We update all call sites and interface
implementations across the codebase to match.

The affected packages are: chainntnfs/bitcoindnotify, chainreg,
config_builder, lnmock, lntest/unittest, lnwallet/btcwallet,
lnwallet/test, and routing/chainview. For now we pass
context.Background() at non-test call sites; test code uses t.Context()
per the linter's preference.

We also bump google.golang.org/grpc from v1.59.0 to v1.79.1 (the latest
release, which includes several bug fixes). The new btcwallet already
requires grpc v1.73.0 at minimum, so we go the rest of the way to the
latest. All protobuf Go stubs are regenerated accordingly, and the CI's
pinned dependency check is updated to match.

See each commit message for a detailed description w.r.t the incremental
changes.

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on upgrading core chain backend dependencies, specifically neutrino and btcwallet. These updates necessitated a change in the Start method signature for chain interfaces, which has been propagated throughout the codebase to ensure compatibility. The change involves introducing a context.Context parameter to the Start method, laying the groundwork for more robust cancellation and timeout mechanisms in future iterations.

Highlights

  • Dependency Updates: Updated neutrino from v0.16.1 to v0.16.2 and btcwallet to commit 70a94ea39e9c (a pre-release past v0.16.17), along with numerous transitive dependencies.
  • Method Signature Change: Modified the chain.Interface Start method signature from Start() error to Start(context.Context) error in both neutrino and btcwallet.
  • Codebase Adaptation: Updated all affected call sites and interface implementations across the codebase to match the new Start method signature, passing context.Background() for initial compatibility.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • chainntnfs/bitcoindnotify/bitcoind.go
    • Imported the context package.
    • Updated chainConn.Start() to chainConn.Start(context.Background()).
  • chainntnfs/bitcoindnotify/bitcoind_dev.go
    • Imported the context package.
    • Updated chainConn.Start() to chainConn.Start(context.Background()).
  • chainreg/no_chain_backend.go
    • Imported the context package.
    • Updated the Start method signature to accept context.Context.
  • config_builder.go
    • Updated neutrinoCS.Start() to neutrinoCS.Start(context.Background()).
  • go.mod
    • Updated btcutil from v1.1.5 to v1.1.6.
    • Updated btcutil/psbt from v1.1.8 to v1.1.10.
    • Updated btclog from v0.0.0-20241003133417-09c4e92e319c to v1.0.0.
    • Updated btcwallet from v0.16.17 to v0.16.17-0.20260213031108-70a94ea39e9c.
    • Updated decred/dcrd/dcrec/secp256k1/v4 from v4.3.0 to v4.4.0.
    • Updated go-flags from v1.4.0 to v1.6.1.
    • Updated neutrino from v0.16.1 to v0.16.2.
    • Updated neutrino/cache from v1.1.2 to v1.1.3.
    • Updated golang.org/x/crypto from v0.37.0 to v0.41.0.
    • Updated golang.org/x/exp from v0.0.0-20240325151524-a685a6edb6d8 to v0.0.0-20250811191247-51f88131bc50.
    • Updated golang.org/x/sync from v0.13.0 to v0.16.0.
    • Updated golang.org/x/term from v0.31.0 to v0.34.0.
    • Updated google.golang.org/grpc from v1.59.0 to v1.73.0.
    • Updated google.golang.org/protobuf from v1.33.0 to v1.36.6.
    • Updated cespare/xxhash/v2 from v2.2.0 to v2.3.0.
    • Updated decred/dcrd/crypto/blake256 from v1.0.1 to v1.1.0.
    • Updated go-logr/logr from v1.4.2 to v1.4.3.
    • Updated golang/glog from v1.1.2 to v1.2.4.
    • Updated envoyproxy/protoc-gen-validate from v1.0.2 to v1.2.1.
    • Updated rogpeppe/go-internal from v1.13.1 to v1.14.1.
    • Updated golang.org/x/mod from v0.17.0 to v0.27.0.
    • Updated golang.org/x/net from v0.39.0 to v0.43.0.
    • Updated golang.org/x/oauth2 from v0.14.0 to v0.28.0.
    • Updated golang.org/x/sys from v0.32.0 to v0.35.0.
    • Updated golang.org/x/text from v0.24.0 to v0.28.0.
    • Updated golang.org/x/tools from v0.21.1-0.20240508182429-e35e4ccd0d2d to v0.36.0.
    • Updated google.golang.org/genproto/googleapis/api from v0.0.0-20231016165738-49dd2c1f3d0b to v0.0.0-20250324211829-b45e905df463.
    • Updated google.golang.org/genproto/googleapis/rpc from v0.0.0-20231030173426-d783a09b4405 to v0.0.0-20250603155806-513f23925822.
    • Removed google.golang.org/appengine.
  • go.sum
    • Updated checksums for various dependencies to reflect version bumps.
  • lnmock/chain.go
    • Imported the context package.
    • Updated the Start method signature to accept context.Context.
  • lntest/unittest/backend.go
    • Imported the context package.
    • Updated spvNode.Start() to spvNode.Start(context.Background()).
  • lnwallet/btcwallet/btcwallet.go
    • Imported the context package.
    • Updated b.chain.Start() to b.chain.Start(context.Background()).
  • lnwallet/test/test_interface.go
    • Imported the context package.
    • Updated aliceChain.Start() to aliceChain.Start(context.Background()).
    • Updated bobChain.Start() to bobChain.Start(context.Background()).
  • routing/chainview/bitcoind.go
    • Imported the context package.
    • Updated b.chainClient.Start() to b.chainClient.Start(context.Background()).
  • routing/chainview/interface_test.go
    • Imported the context package.
    • Updated spvNode.Start() to spvNode.Start(context.Background()).
Activity
  • The pull request was created by Roasbeef.
  • The pull request description details the dependency bumps and the required method signature changes across the codebase.
  • No human review comments or additional activities have been recorded yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@lightninglabs-deploy lightninglabs-deploy added the severity-critical Requires expert review - security/consensus critical label Mar 5, 2026
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly updates the neutrino and btcwallet dependencies, addressing the change in the Start method signature across the codebase by passing context.Background(). The changes are consistent and well-contained. My review identified a couple of minor opportunities to improve documentation by adding comments to exported functions, in line with the repository's style guide.

Note: Security Review is unavailable for this PR.

@Roasbeef Roasbeef force-pushed the bump-neutrino-btcwallet-deps branch from dd9fbe6 to 0601b84 Compare March 5, 2026 02:30
@lightninglabs-deploy lightninglabs-deploy added severity-critical Requires expert review - security/consensus critical and removed severity-critical Requires expert review - security/consensus critical labels Mar 5, 2026
Roasbeef and others added 4 commits March 4, 2026 18:56
In this commit, we update our two core chain backend dependencies:
neutrino is bumped from v0.16.1 to v0.16.2, and btcwallet is updated
to commit 70a94ea39e9c (a pre-release past v0.16.17).

The updated btcwallet changes the `chain.Interface` `Start` method
signature from `Start() error` to `Start(context.Context) error`. The
same change was made to neutrino's `ChainService.Start`. We update all
call sites and interface implementations across the codebase to pass a
`context.Background()` at non-test call sites, and `t.Context()` in
tests.

The affected packages are: chainntnfs/bitcoindnotify, chainreg,
config_builder, lnmock, lntest/unittest, lnwallet/btcwallet,
lnwallet/test, and routing/chainview.
In this commit, we bump the grpc dependency from the v1.73.0 version
(pulled in transitively by btcwallet) to v1.79.1 which is the latest
release and includes several bug fixes. This also bumps a number of
related transitive deps including google.golang.org/protobuf to v1.36.10
and several golang.org/x packages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
In this commit, we regenerate all protobuf Go stubs to match the
updated grpc and protobuf library versions. This is a mechanical
change with no functional differences; the generated code simply
uses the newer protobuf runtime APIs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
In this commit, we update the CI workflow's pinned dependency check
for google.golang.org/grpc from v1.59.0 to v1.79.1 to match the
version now required by our updated btcwallet dependency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Roasbeef Roasbeef force-pushed the bump-neutrino-btcwallet-deps branch from 0601b84 to 3239af8 Compare March 5, 2026 02:56
@lightninglabs-deploy lightninglabs-deploy added severity-critical Requires expert review - security/consensus critical and removed severity-critical Requires expert review - security/consensus critical labels Mar 5, 2026
@ziggie1984 ziggie1984 self-requested a review March 5, 2026 07:50
Copy link
Member

@yyforyongyu yyforyongyu left a comment

Choose a reason for hiding this comment

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

Straightforward - only got one Q.

}

if err := neutrinoCS.Start(); err != nil {
if err := neutrinoCS.Start(context.Background()); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Q: why context.Background() here? initNeutrinoBackend already takes a ctx that's threaded through to kvdb.Open above. Neutrino's Start passes it to importer.Import(ctx) for header imports, so using context.Background() means it can't be cancelled on shutdown.

Think this should be:

if err := neutrinoCS.Start(ctx); err != nil {

Copy link
Collaborator

@ziggie1984 ziggie1984 left a comment

Choose a reason for hiding this comment

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

LGTM (pending yy's comment)

We previoulsy decided to remove the co-authored tag by claude to make sure the creator of the PR takes full responsibilty and attests that he did review the code before submitting.

Moreover I think you need to update the repo rules for the CI pinned dep. job.

@@ -548,7 +548,7 @@ jobs:
fail-fast: false
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit commit msg comment is misleading we upgraded the grpc library to the latest stable release, the btcwallet only requires 1.73

matrix:
pinned_dep:
- google.golang.org/grpc v1.59.0
- google.golang.org/grpc v1.79.1
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you still need to update the repo-rules for the grpc check, because iirc just updating the CI file is not all we must have configured it somewhere else as well.

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

Labels

no-changelog severity-critical Requires expert review - security/consensus critical

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants