Skip to content

Conversation

Roasbeef
Copy link
Member

We may start to use this in btcd, wanting to avoid any circualr dep issues like we're hammering out in btcsuite/btcd#1825.

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.

Summary of Changes

Hello @Roasbeef, 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 refactors the query package into its own independent Go module. The primary purpose of this change is to prevent potential circular dependency issues, especially in anticipation of its future integration and use within the btcd project. This modularization enhances the project's dependency management and overall code organization.

Highlights

  • Module Refactoring: The existing query package has been extracted and converted into an independent Go module (github.com/lightninglabs/neutrino/query).
  • Dependency Management: The main go.mod file now includes the new query module as a local replacement, and its own go.mod defines its specific dependencies, preventing circular dependency issues with projects like btcd.
  • Go Version Update: The project's Go version has been updated from 1.23.6 to 1.24.4 across both the main module and the new query sub-module.
  • Dependency Updates: Updated btclog to v1.0.0 and testify to v1.10.0 in the main module, and these updated versions are also reflected in the new query module's dependencies.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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.

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 refactors the query package into its own Go submodule. This is a good structural change to avoid circular dependencies and allow the query package to be used independently. The changes primarily involve updating go.mod and go.sum files. My main feedback is to ensure that the dependencies in the new query/go.mod are aligned with the dependencies in the root go.mod to maintain consistency and prevent potential issues.

go 1.24.4

require (
github.com/btcsuite/btcd v0.24.2

Choose a reason for hiding this comment

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

high

The version of btcd used in this submodule (v0.24.2) is different from the version used in the main module (v0.24.3-0.20250318170759-4f4ea81776d6). To ensure consistency and avoid potential build or runtime issues, it's recommended to use the same version of btcd across all modules in the repository.

After updating the btcd version, please run go mod tidy in the query directory to align indirect dependencies as well. For example, golang.org/x/crypto and golang.org/x/sys seem to be using older versions here compared to the root module.

    github.com/btcsuite/btcd v0.24.3-0.20250318170759-4f4ea81776d6

Copy link
Contributor

@mohamedawnallah mohamedawnallah 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 this one #325 (comment)

)

go 1.23.6
go 1.24.4
Copy link
Contributor

Choose a reason for hiding this comment

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

We perhaps want to update the tools/Dockerfile to reflect this currently updated go version as currently linter complains

FROM golang:1.23.6-bookworm

@lightninglabs-deploy
Copy link

@Roasbeef, remember to re-request review from reviewers when ready

@Roasbeef
Copy link
Member Author

Will hold off on merging this for now. We're regrouping a bit re the parallel block download feature for btcd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants