build: pin neutrino sync test stack#10906
Conversation
Summary of ChangesHello, 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
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 AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
| // 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 |
There was a problem hiding this comment.
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:
- Any local changes made to the
sqldbpackage in this branch/PR (such as those insqldb/migrations.go) won't be picked up by the migration backend during build/test oflnd. - If the commit
6fd5b7bb27d7is 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.
| 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 |
|
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.
06c5737 to
f37455e
Compare
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/neutrinoatgithub.com/Roasbeef/neutrinocommitbae6bfdf157b8a8b38adc85ee2060147428907f5, which is the top of the current neutrino PR stack ending at lightninglabs/neutrino#374. We also mirror thegolang-migratefork replace used by that stack, since the SQL backend importsgithub.com/lightningnetwork/lnd/sqldb/v2and 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