Skip to content

[bug]: Issue with Paying Sats Invoices Using Taproot Assets via sendPayment with rfqId #1814

@pranav-punjabi

Description

@pranav-punjabi

Background

Image
  • We are working with a setup where we have Litd nodes (node a, b, c) and a Sats Node (as per the attached diagram). Node b acts as the Edge Node.

  • Currently, we use the Taproot Assets sendPayment API to pay invoices from Litd Nodes.

  • By design, sendPayment first places an AddAssetSellOrder and then routes the payment to the destination.

  • Since we run our own Price Oracle Server to fetch BTC ↔️ TaprootAsset exchange rates, we have faced the following problem:

  • When calling sendPayment, the API attempts to place a SellOrder, but we hit a "connection reset by peer" error.

  • This is consistent with the issue described here: lightninglabs/taproot-assets#1267.

The root cause seems to be a network layer error due to idleness between the Edge Node and the Price Oracle server. The channel closes without sending a GO_AWAY message, leaving the client unaware of the broken connection, which results in payment failure.

Our Approach to Mitigate
To avoid this error, we split the process into two steps:

  1. Manually place SellOrder for the msats amount specified in the invoice.
  2. We handle retries and timeouts explicitly.
  3. This ensures reliability and always gives us a PeerAcceptedSellOrder.
  4. Call sendPayment with the rfqId obtained from the PeerAcceptedSellOrder response.

Current Problem:

  • This approach works in most cases. However, we hit a specific issue:

    **When paying Sats invoices with TaprootAssets using sendPayment with the manually provided rfqId, we consistently receive NO_ROUTE errors.**
    

The strange part is that:

  • A valid path does exist.
  • If we retry the same payment without setting the rfqId, it succeeds.
  • any other relevant environment details
    we are using tapd v0.6.1
    "lightning-terminal version : v0.15.1-alpha"

Steps to reproduce

  1. Create an invoice on the Sats Node.
  2. Decode the invoice to get the msats amount.
  3. On Node A(LitdNode), manually place a SellOrder for the decoded msats amount.
  4. Use the returned acceptedPeerQuoteId in the rfqId field of the sendPayment API.
  5. Call sendPayment.

Observed Result:
The payment fails with NO_ROUTE.

Payment with hash 86ae98dc44ffdeac5097b15f62f863f6309e73e454f53339156ad94d1f52ff5f failed under this scenario. I have attached the relevant log file for this failed attempt.

output (1).log

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions