Skip to content

Conversation

GeorgeTsagk
Copy link
Member

Description

For the last couple of months we have been isolating tapd specific PRs on the tapd-main-branch side branch. This has been continuously rebasing on top of master and any conflicts have been gradually resolved.

The PRs that contributed to tapd-main-branch are:

  1. dev.Dockerfile: allow forcing lnd/tapd/taprpc/loop repo - rebased #1119
  2. Multi rfq send itest #1097
  3. Custom channels liquidity edge case: AddInvoice with existing route hints #1106
  4. LiT: Custom channels feature bits #1138

Some single-commits that are not contained in any PR were direct pushes to the tapd-main-branch, which was not protected. These commits do routine/maintenance stuff like bumping versions or changing config values, so I hope they're easy to go through.

Purpose of this PR

This is definitely not a call to go through all the diff and verify the content itself, but more like an ACK around version bumps or any changes in the test harness itself. The content of the itests has been thoroughly reviewed and context should be available in the PRs linked above.

guggero and others added 11 commits October 14, 2025 11:38
We can now use the LND_REPO, TAPROOT_ASSETS_REPO, TAPRPC_REPO, and
LOOP_RPC build arguments to force a specific repo to be used so that
commits referenced by LND_VERSION, TAPROOT_ASSETS_VERSION,
TAPRPC_VERSION, and LOOP_VERSION don't have to exist in the default
repository. If any of these build arguments are not defined, the build
continues using the default repository for that module.

NOTE: If these arguments ARE defined then the corresponding
`_VERSION` argument MUST also be defined, otherwise the build continues
using the default repository defined for that module.
This commit mainly changes the returned type of the payment result for
asset payments. We create a struct TapPaymentResult which contains all
the related information for the outcome of an asset payment.
@GeorgeTsagk GeorgeTsagk self-assigned this Oct 15, 2025
Copy link

Summary of Changes

Hello @GeorgeTsagk, 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 integrates a significant number of updates from the tapd-main-branch into the master branch, primarily focusing on enhancing the Taproot Assets protocol. The changes encompass improvements to multi-RFQ capabilities for asset payments, a new test for the upgrade path of Taproot Assets channels, and various updates to LND and Loop RPC interfaces. The underlying dependencies and the integration test harness have also been updated to support these new features and ensure stability.

Highlights

  • Taproot Assets (tapd) Integration: This pull request merges a dedicated side branch (tapd-main-branch) into the main master branch, incorporating several months of development for Taproot Assets functionality.
  • Multi-RFQ Payment Enhancements: Advanced multi-RFQ (Request for Quote) features are introduced and tested, enabling asset payments to be split across multiple channels and peers for improved liquidity and routing. This includes new RPC fields for incoming/outgoing channel IDs in forwarding history and blinded path configurations.
  • Taproot Assets Channel Upgrade Path: A new integration test (testCustomChannelsV1Upgrade) has been added to verify the seamless upgrade of Taproot Assets channels and proper breach handling, including STXO proofs, when nodes transition to newer versions.
  • LND RPC and Dependency Updates: Numerous updates to LND's gRPC definitions are included, such as new fields for pending channels (confirmations until active, confirmation height), query routes (multiple outgoing channel IDs), node/channel info (authentication proofs), and a new RPC for deleting canceled invoices. Core Go dependencies have also been updated.
  • Loop RPC Additions: Loop's RPCs are extended with new fields for QuoteRequest (auto-select deposits), Deposit (swap hash), and StaticAddressLoopInSwap (deposits list, amount), enhancing static address loop-in functionality.
  • Improved Test Harness: The integration test harness has been refined to support node upgrades/downgrades and more complex multi-node asset network topologies, ensuring robust testing of new features and backward compatibility.
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.

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 merges a long-running feature branch for tapd into the master branch. The changes are extensive, including significant dependency updates, new features reflected in protobuf definitions and generated clients, and substantial improvements to the test harness and integration tests. The new tests cover critical scenarios like multi-RFQ payments and channel version upgrades, which is great to see. My review focused on the new code and test utilities, and I've identified a couple of medium-severity issues in the test helpers that could be improved for better robustness and clarity.

Comment on lines +493 to 511
// Ignore the new RFQ array message from the stream, it is also
// not relevant.
quotes := msg.GetAcceptedSellOrders()
if quotes != nil {
for _, quote := range quotes.AcceptedSellOrders {
rpcRate := quote.BidAssetRate
rate, err := rpcutils.UnmarshalRfqFixedPoint(
rpcRate,
)
require.NoError(t, err)

rateVal = *rate

t.Logf("Got quote for %v asset units per BTC "+
"from peer %v", rate, quote.Peer)
}

continue
}

Choose a reason for hiding this comment

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

medium

The logic for handling multiple RFQ quotes in getAssetPaymentResult appears to be incorrect, and the preceding comment is misleading.

  1. The comment on line 493 states that the RFQ array message is ignored, but the code below it processes the message. This comment should be removed or updated to reflect the actual behavior.
  2. The loop starting on line 497 iterates through quotes.AcceptedSellOrders and repeatedly overwrites rateVal. If a payment is split across multiple peers with different rates, this will result in rateVal holding only the rate of the last quote. This is incorrect for calculating the total asset amount or an effective rate.

While this may not cause test failures if all peers in current tests have the same rate, it makes the helper function brittle and incorrect for scenarios with varying rates. The logic should be revised to correctly handle multiple quotes, for example by calculating an effective rate or a total asset amount.

Copy link
Contributor

@gijswijs gijswijs left a comment

Choose a reason for hiding this comment

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

Did a first pass and made some comments. I think it's almost there.

binary string, args []LitArgOption) (string, []LitArgOption) {

if backwardCompat == nil {
noopArg := WithLitArg("taproot-assets.channel.noop-htlcs", "")
Copy link
Contributor

Choose a reason for hiding this comment

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

Referring back to @Roasbeef comment here: 9b7c172#r2422820720

iiuc he suggests to turn noop-htlcs on by default. Not specifically in the context of itests, but just for the tapd client in general. The flag would then be used to turn noop-htlcs off. (Rename the flag to no-noop-htlcs or something)

For the itest it would mean you wouldn't have to pass the argument here, but you would have to pass it for the cases you want to have it specifically turned off.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we can make the switch to being by-default on, without changing the semantics of the config itself. We can just let it be "true" if not defined in our default config in tapd. This way the above line leads to no harm (won't need to update it too).

GeorgeTsagk and others added 7 commits October 15, 2025 13:38
Since we bumped the version of loop and lnd in the previous commit we
also caused the proto files to change. We need to regenerate the proto
files with `make protos` and commit them.
Changes the itest asset used in the decode payreq itest to instead be a
new variable declared within the scope of the itest. This prevents
mutating the global asset that is re-used by other test cases and would
lead to failures otherwise.

Thanks @jtobin for spotting.

Co-authored-by: Jared Tobin <jared@jtobin.io>
Since we're now always using no-op HTLCs over all taproot assets
channels that support it, that means that certain liquidity related
assumptions do not hold anymore. In some test cases where we assume that
a satoshi balance was eventually accumulated we instead manually slosh
that balance as sats don't really shift in the channel balance over the
long term.
Copy link
Contributor

@ViktorT-11 ViktorT-11 left a comment

Choose a reason for hiding this comment

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

Nice thanks a lot 🙏🎉! Looks good from a litd perspective 🙏

Nit: We would need a release note entry for the bumped lnd, loop tapd with this PR though :)

github.com/lightninglabs/loop/looprpc v1.0.8
github.com/lightninglabs/loop/swapserverrpc v1.0.15
github.com/lightninglabs/lndclient v0.20.0-1
github.com/lightninglabs/loop v0.31.3-beta.0.20251014011913-03de0a8ed734
Copy link
Contributor

Choose a reason for hiding this comment

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

This bump is required in order to be compatible with lnd & tapd right? Because with this bump, we'll need to wait for the next loop release (which should be imminent) before we can do a litd release.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, loop had to be bumped in order to reflect some of our latest changes in the tapd codebase (which it depends on).

github.com/lightninglabs/taproot-assets v0.6.1
github.com/lightninglabs/taproot-assets/taprpc v1.0.8-0.20250716163904-2ef55ba74036
github.com/lightningnetwork/lnd v0.19.3-beta
github.com/lightninglabs/taproot-assets v0.7.0-rc1.0.20251014100421-92189161aa7a
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, with this, we'll need to wait for tapd v0.7.0-rc2 before we can do a release as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, when all deps are properly tagged we'll have to make one final version bumping PR.

Copy link
Contributor

@gijswijs gijswijs left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

@GeorgeTsagk GeorgeTsagk merged commit e3a8589 into master Oct 15, 2025
22 checks passed
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