Skip to content

Conversation

ffranr
Copy link
Contributor

@ffranr ffranr commented Oct 17, 2025

Update push and merge_group triggers to include *-staging.

darioAnongba and others added 12 commits October 10, 2025 15:26
…whitelist

Improve `MacaroonWhitelist` Structure and Permission Granularity
Refactored GetBlockTimestamp to call GetBlockHeaderByHeight and return
an optional error type. Removed the timestamp-to-block-height cache, as
it did not handle re-orgs correctly. This prepares the codebase for a
more comprehensive caching mechanism to be added in a follow-up commit.
Refactor `fundGenesisPsbt` and enhance test helpers for coverage
Introduce a reusable cache that stores full headers keyed by height and
hash. Tracks confirmation depth and treats shallow entries as unsettled
(return miss). Detects conflicts at a height and invalidates shallower
headers on reorg. Size and random purge fraction are configurable
(default 100k entries, 10 percent).

Not yet used by LndRpcChainBridge.
Adds a block header cache to LndRpcChainBridge, which indirectly
improves performance of methods like GetBlockTimestamp by avoiding
repeated block header fetches.
lndservices: add reorg aware block header cache; use in ChainBridge
@ffranr ffranr added this to the v0.8 milestone Oct 17, 2025
@ffranr ffranr requested review from darioAnongba and jtobin October 17, 2025 15:51
@ffranr ffranr self-assigned this Oct 17, 2025
@ffranr ffranr force-pushed the wip/enable-ci-for-staging-branches branch from 44eee79 to 43e17a5 Compare October 17, 2025 15:52
@gemini-code-assist
Copy link

Summary of Changes

Hello @ffranr, 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 implements a robust feature negotiation framework for Taproot Asset channels, enabling tapd nodes to communicate and agree upon advanced channel capabilities with their peers. By introducing a dedicated tapfeatures package and integrating its AuxChannelNegotiator across critical channel lifecycle components—such as funding, closing, and HTLC processing—the system can now gracefully introduce new functionalities like conditional STXO proof generation and No-Op HTLCs. This approach ensures backward compatibility and allows for a phased rollout of new features, enhancing the protocol's extensibility and upgradeability. The changes also include necessary updates to Go module dependencies and relevant documentation.

Highlights

  • Auxiliary Channel Feature Negotiation: A new tapfeatures package has been introduced to manage and negotiate custom feature bits for Taproot Asset channels. This allows peers to signal support for specific functionalities like 'No-Op HTLCs' and 'STXO proofs' during channel establishment and re-establishment.
  • Integration of Feature Negotiation Logic: The new AuxChannelNegotiator is integrated throughout the tapd daemon, affecting channel funding, closing, HTLC processing, and commitment generation. This ensures that features are only activated when both peers explicitly support them, enhancing compatibility and enabling graceful upgrades.
  • Conditional STXO Proof Generation: The generation of STXO (Spent Transaction Output) proofs is now conditional on peer and channel feature negotiation, allowing for backward compatibility and flexible adoption of this feature.
  • Conditional No-Op HTLCs: The use of No-Op HTLCs, which allow asset transfers without settling the underlying Bitcoin anchor amount, is also made conditional on feature negotiation, providing more flexible asset transfer options.
  • Dependency Updates: Several Go module dependencies have been updated, including core btcwallet, lndclient, and lnd versions, along with various indirect dependencies, to ensure compatibility and leverage the latest improvements.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/main.yaml
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.

Update push and merge_group triggers to include *-staging.
@ffranr ffranr force-pushed the wip/enable-ci-for-staging-branches branch from 43e17a5 to 13f7b29 Compare October 17, 2025 15:54
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 introduces feature bit negotiation for Taproot Asset channels, specifically for NoOpHTLCs and STXO proofs. This is a significant enhancement for channel upgrades and backward compatibility. The changes are well-integrated throughout the codebase, from configuration and RPC layers down to the channel logic. Additionally, there are some logging improvements and dependency updates.

My review focuses on ensuring the new logic is correctly implemented and adheres to the project's style guide. I've found a minor issue in a structured log call and a comment mismatch with a function name.

Copy link
Contributor

@darioAnongba darioAnongba left a comment

Choose a reason for hiding this comment

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

I think this is fine to be merged into 0-8-0-staging but we should not port this to main because we are trying to move away from this type of release flow, to a standard trunk based one so we shouldn't have staging branches anymore.

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

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

4 participants