Skip to content

build: pin neutrino sync test stack#10906

Draft
Roasbeef wants to merge 1 commit into
lightningnetwork:masterfrom
Roasbeef:neutrino-sync-stack-test
Draft

build: pin neutrino sync test stack#10906
Roasbeef wants to merge 1 commit into
lightningnetwork:masterfrom
Roasbeef:neutrino-sync-stack-test

Conversation

@Roasbeef

Copy link
Copy Markdown
Member

In this PR, we pin lnd to the current neutrino sync test stack so people can build and test the full SQL, querysync, and headersync series through lnd. This is meant as a draft tester branch, not a final dependency bump.

The branch points github.com/lightninglabs/neutrino at github.com/Roasbeef/neutrino commit bae6bfdf157b8a8b38adc85ee2060147428907f5, which is the top of the current neutrino PR stack ending at lightninglabs/neutrino#374. We also mirror the golang-migrate fork replace used by that stack, since the SQL backend imports github.com/lightningnetwork/lnd/sqldb/v2 and needs the programmatic migration support from the Lightning Labs fork.

The intended use is to let reviewers and testers run fresh neutrino lnd syncs without needing to manually wire a local replace. Once the neutrino stack lands upstream, this PR should collapse down to an ordinary module bump or disappear entirely.

Validation

go test ./... -run '^$'

@gemini-code-assist

Copy link
Copy Markdown

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 introduces temporary dependency pins to facilitate the testing of the full SQL, querysync, and headersync series within lnd. By pointing to a specific neutrino fork and mirroring the necessary golang-migrate fork, it allows developers to validate these features without manual local configuration. These changes are intended to be transient and will be replaced with standard module updates once the upstream stack is finalized.

Highlights

  • Dependency Pinning: Pinned the neutrino dependency to a specific fork to enable testing of the full SQL, querysync, and headersync stack.
  • Migration Tooling: Added a replace directive for golang-migrate to support the programmatic migration requirements of the SQL backend.
  • Dependency Updates: Updated several project dependencies, including grpc-gateway, golang.org/x/time, and various modernc packages, to ensure compatibility.
New Features

🧠 You can now enable Memory (public preview) 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.

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 the 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 counterproductive. 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.

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.

@github-actions github-actions Bot added the severity-medium Focused review required label Jun 17, 2026

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

Copy link
Copy Markdown

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 updates several dependencies and indirect requirements in go.mod and go.sum. A critical issue was identified where the newly added indirect dependency github.com/lightningnetwork/lnd/sqldb/v2 is missing a corresponding replace directive to point to the local ./sqldb directory, which could cause build failures or prevent local database changes from being picked up.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread go.mod Outdated
// TODO(elle): remove once the gossip V2 sqldb changes have been made.
replace github.com/lightningnetwork/lnd/sqldb => ./sqldb

replace github.com/lightninglabs/neutrino => github.com/Roasbeef/neutrino v0.0.0-20260617224621-bae6bfdf157b

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The indirect dependency github.com/lightningnetwork/lnd/sqldb/v2 has been added to go.mod (line 73), but there is no corresponding replace directive for it in the replace block (unlike github.com/lightningnetwork/lnd/sqldb which is replaced with ./sqldb on line 203).

Since the golang-migrate fork imports github.com/lightningnetwork/lnd/sqldb/v2, Go will attempt to fetch this module from the remote repository instead of using your local sqldb directory. This has two major consequences:

  1. Any local changes made to the sqldb package in this branch/PR (such as those in sqldb/migrations.go) won't be picked up by the migration backend during build/test of lnd.
  2. If the commit 6fd5b7bb27d7 is not yet pushed or publicly available on GitHub, the build/test command will fail with a module resolution error.

Additionally, please ensure that sqldb/go.mod (or sqldb/v2/go.mod) also mirrors these replace directives so that running tests directly within the sqldb subdirectory (where sqldb is the main module) does not fail due to missing fork replacements.

Suggested change
replace github.com/lightninglabs/neutrino => github.com/Roasbeef/neutrino v0.0.0-20260617224621-bae6bfdf157b
replace github.com/lightninglabs/neutrino => github.com/Roasbeef/neutrino v0.0.0-20260617224621-bae6bfdf157b
replace github.com/lightningnetwork/lnd/sqldb/v2 => ./sqldb

@github-actions

Copy link
Copy Markdown

PR Severity: MEDIUM (Dependency update, 2 files, 195 lines changed). Files: go.mod and go.sum - not in any critical/high package path, classified as Other Go files not categorized above. No severity bump: 2 files (threshold >20), 195 lines (threshold >500), no multi-critical packages. Reviewers should verify updated dependencies do not introduce supply-chain risks. To override, add severity-override-{critical,high,medium,low} label. <!-- pr-severity-bot -->

In this commit, we pin lnd to the current neutrino sync test stack so users can build and run the full set of SQL, querysync, and headersync changes through lnd. The branch uses a remote replace to Roasbeef/neutrino at the top stack commit, which means testers don't need a local neutrino checkout to try it.

We also mirror the migrate fork replace needed by the neutrino SQL stack's sqldb/v2 dependency. Without that replace, lnd's module graph resolves upstream golang-migrate and fails to compile before it reaches any neutrino code.
@Roasbeef Roasbeef force-pushed the neutrino-sync-stack-test branch from 06c5737 to f37455e Compare June 17, 2026 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

severity-medium Focused review required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant