Closed levmi closed 1 week ago
send asset keysend payment from alice to dave (no_route)
So this can happen if the sender doesn't have a node announcement from the dest yet. In the near future, we'll start to just assume they have the bit set.
create asset invoice on alice, pay with asset on dave (multi-hop, opposite direction after funding sending half asset amt. FAILURE_REASON_NO_ROUTE)
In this case, do all parties have enough to satisfy the normal BTC reserve?
So this can happen if the sender doesn't have a node announcement from the dest yet. In the near future, we'll start to just assume they have the bit set.
I'll try again, keeping an eye out for the node announcements. Is there anything specific I should be looking for in the logs or describegraph
?
In this case, do all parties have enough to satisfy the normal BTC reserve?
Sorry, I forgot to mention that the channel was funded with push_sat=5000
. The invoice payment succeeds if paid by a direct peer (bob) but fails for multi-hop. Maybe this is due to the missing node announcement as well. I'll try again.
I spent some more time testing these specific failures.
send asset keysend payment from alice to dave (no_route)
So this can happen if the sender doesn't have a node announcement from the dest yet. In the near future, we'll start to just assume they have the bit set.
After noodling on this one a bit more, I'm thinking multi-hop asset->asset keysend payments over BTC channels shouldn't be possible. With an invoice payment, dave would tell carol to swap the incoming sats
to the asset in order to receive on their asset channel. For a keysend payments, how would carol know what to do with the incoming payment to dave other than forward sats.
Actually, before it gets to the delivery issue, alice doesn't even know dave exists without the hophint since there's only the private asset channel between carol and dave. So dave doesn't show up in alice's view of the graph. I tested by adding a BTC channel between carol and dave. Now dave is present in alice's graph and when I sent an asset keysend payment from alice to dave, it succeeds. However, it delivers sats to dave over the BTC channel. It makes total sense to me why this happens and doesn't feel like a bug.
Correct me if I'm wrong, but I believe the original use case I was testing (asset->asset multi-hop keysend) is technically not feasible, right?
create asset invoice on alice, pay with asset on dave (multi-hop, opposite direction after funding sending half asset amt. FAILURE_REASON_NO_ROUTE)
In this case, do all parties have enough to satisfy the normal BTC reserve?
The problem with this one turned out to be that the sats
channel between bob and carol didn't have enough on carol's side to make the payment in the other direction. After balancing that channel, invoice payments between alice and dave succeed consistently in both directions.
@levmi I think it's safe to remove these two or mark them as resolved in the OP.
Marked those 2 as covered!
For the direct peer sats -> sats, I think it might be the external traffic shaper getting in the way, was it a keysend payment?
Related-ish logs:
2024-06-12 16:12:58.956 [DBG] CRTR: Payment cab2b64d68edef70f4632daed02d249fa73c5e1b33991a1ac55c3c7cb7300513: status=Initiated, active_shards=0, rem_value=10000000 mSAT, fee_limit=0 mSAT
2024-06-12 16:12:58.956 [DBG] CRTR: PaymentSession(cab2b64d68edef70f4632daed02d249fa73c5e1b33991a1ac55c3c7cb7300513): pathfinding for amt=10000000 mSAT
2024-06-12 16:12:58.957 [DBG] CRTR: ShortChannelID=463:1:0: external traffic shaper is handling traffic: true
2024-06-12 16:12:58.957 [DBG] CRTR: ShortChannelID=463:1:0: external traffic shaper reported available bandwidth: 0 mSAT
2024-06-12 16:12:58.957 [WRN] CRTR: Not enough outbound balance to send htlc of amount: 10000000 mSAT, only have local balance: 0 mSAT
@Roasbeef the sats -> sats payments I tested were using invoices.
I've come across an issue where litd
will hang when paying invoices for a large asset amounts. I am using the flag --taproot-assets.experimental.rfq.mockoraclecentpersat=1000000
so that the mock exchange rate is 100 sats per 1 asset. The network graph is the same as above, but I minted 1,000,000 AAA
assets and funded the asset channels with 400,000 AAA
. I funded the sats
channel with 10M sats.
I created an invoice on dave for 5,000 AAA
(equivalent to 500,000 sats). When I attempt to pay this invoice on alice, the payinvoice
command will hang with the output below:
litd@alice:/$ litcli --macaroonpath ~/.lnd/data/chain/bitcoin/regtest/admin.macaroon ln payinvoice -f -asset_id bc8ccb6108f132e00776d2d260997500d9223c7df7923bae71ff71257abd8f93 lnbcrt5m1pnxk9y4pp59shpvhwq7nh7nl5z30v2zy634mdmy9qauj9w6mwshhq8cq4saz4sdqqcqzzsxqyz5vqrzjq2mecn7fxjfjjgn0s284l0zpexrmq8apkakhmu93wfscpcq4dadx4xz3hkc0f2em35qqqqlgqqqqqqgq2qsp5602rr4c5r0xhqprueh5s7shn63dwlcf4c0vd6hme9mc40xt33req9qxpqysgqjrq0hmv8pvnrf5pyctnpu5fkt7jph88cndnzm6je59a7llmcaqdy09m7gfg3skhffvpceu68ff7vc6mckvc32q8wc06h8gtktcahp8spy2sjpf
Asking peer 0344e6f5eef4af071f1d4f867bf0b745a41c2f00d43b238592d426a4777146ea0c for quote to sell assets to pay for invoice over 500000000 msats; waiting up to 60s
Got quote for 5000 asset units at 100000 msat/unit from peer 0344e6f5eef4af071f1d4f867bf0b745a41c2f00d43b238592d426a4777146ea0c with SCID 11993423829610654351
+------------+--------------+--------------+--------------+-------+----------+-----------------+--------------------+
| HTLC_STATE | ATTEMPT_TIME | RESOLVE_TIME | RECEIVER_AMT | FEE | TIMELOCK | CHAN_OUT | ROUTE |
+------------+--------------+--------------+--------------+-------+----------+-----------------+--------------------+
| IN_FLIGHT | 0.019 | - | 62500 | 2.124 | 412 | 133040907026432 | bob->carol->03eb01 |
| IN_FLIGHT | 0.042 | - | 54687.5 | 2.108 | 412 | 133040907026432 | bob->carol->03eb01 |
| IN_FLIGHT | 0.063 | - | 47851.562 | 2.094 | 412 | 133040907026432 | bob->carol->03eb01 |
| IN_FLIGHT | 0.118 | - | 41870.117 | 2.082 | 412 | 133040907026432 | bob->carol->03eb01 |
| IN_FLIGHT | 0.136 | - | 73272.705 | 2.146 | 412 | 133040907026432 | bob->carol->03eb01 |
| IN_FLIGHT | 0.153 | - | 54954.529 | 2.108 | 412 | 133040907026432 | bob->carol->03eb01 |
| IN_FLIGHT | 0.241 | - | 41215.896 | 2.082 | 412 | 133040907026432 | bob->carol->03eb01 |
| IN_FLIGHT | 0.260 | - | 61823.845 | 2.122 | 412 | 133040907026432 | bob->carol->03eb01 |
| IN_FLIGHT | 0.381 | - | 61823.846 | 2.122 | 412 | 133040907026432 | bob->carol->03eb01 |
+------------+--------------+--------------+--------------+-------+----------+-----------------+--------------------+
Amount + fee: 0 + 0 sat
Payment hash: 2c2e165dc0f4efe9fe828bd8a11351aedbb2141de48aed6dd0bdc07c02b0e8ab
Payment status: IN_FLIGHT
The command does not timeout after the default 60 seconds. I also noticed that after running this command, litd
will not shutdown gracefully. Docker has to kill the process in order to stop the container.
I also created a new network then tried a direct peer payment by creating the 5,000 AAA
invoice on bob. The behavior is the same in this case as well.
I have tested asset invoice payments of 1K, 2K, 3K, and 4K. Those all succeed. It hangs when I send a payment of 5K or more.
Here are the logs for all of the nodes if it is helpful. alice.log bob.log carol.log dave.log
I believe I have been able to reproduce the above issue in the litd
itests by making the following changes to litd_custom_channels_test.go:
Note: Paying a 50K asset invoice works, but 60K and higher fails
Here's the diff of the changes I made to the itests
diff --git a/itest/litd_custom_channels_test.go b/itest/litd_custom_channels_test.go
index 63cc0ef7..01037ab9 100644
--- a/itest/litd_custom_channels_test.go
+++ b/itest/litd_custom_channels_test.go
@@ -53,7 +53,7 @@ var (
AssetType: taprpc.AssetType_NORMAL,
Name: "itest-asset-cents",
AssetMeta: dummyMetaData,
- Amount: 1_000_000,
+ Amount: 2_000_000,
}
shortTimeout = time.Second * 5
@@ -197,7 +197,7 @@ func testCustomChannels(_ context.Context, net *NetworkHarness,
// We need to send some assets to Dave, so he can fund an asset channel
// with Yara.
const (
- fundingAmount = 50_000
+ fundingAmount = 400_000
startAmount = fundingAmount * 2
)
daveAddr, err := daveTap.NewAddr(ctxb, &taprpc.NewAddrRequest{
@@ -410,7 +410,7 @@ func testCustomChannels(_ context.Context, net *NetworkHarness,
// a direct channel invoice payment with an RFQ SCID present in the
// invoice.
// ------------
- const daveInvoiceAssetAmount = 2_000
+ const daveInvoiceAssetAmount = 60_000
invoiceResp := createAssetInvoice(
t.t, charlie, dave, daveInvoiceAssetAmount, assetID,
)
There's an issue which I previously reported in chat that I forgot to mention here.
After opening a channel with a capacity that's lower than the node's total asset balance, the remaining balance becomes inaccessible. tapcli assets list
returns no assets and tapcli assets balance
shows the asset with the pre-channel balance.
I've come across an issue where
litd
will hang when paying invoices for a large asset amounts. I am using the flag--taproot-assets.experimental.rfq.mockoraclecentpersat=1000000
so that the mock exchange rate is 100 sats per 1 asset. The network graph is the same as above, but I minted 1,000,000AAA
assets and funded the asset channels with 400,000AAA
. I funded thesats
channel with 10M sats.I created an invoice on dave for 5,000
AAA
(equivalent to 500,000 sats). When I attempt to pay this invoice on alice, thepayinvoice
command will hang with the output below:litd@alice:/$ litcli --macaroonpath ~/.lnd/data/chain/bitcoin/regtest/admin.macaroon ln payinvoice -f -asset_id bc8ccb6108f132e00776d2d260997500d9223c7df7923bae71ff71257abd8f93 lnbcrt5m1pnxk9y4pp59shpvhwq7nh7nl5z30v2zy634mdmy9qauj9w6mwshhq8cq4saz4sdqqcqzzsxqyz5vqrzjq2mecn7fxjfjjgn0s284l0zpexrmq8apkakhmu93wfscpcq4dadx4xz3hkc0f2em35qqqqlgqqqqqqgq2qsp5602rr4c5r0xhqprueh5s7shn63dwlcf4c0vd6hme9mc40xt33req9qxpqysgqjrq0hmv8pvnrf5pyctnpu5fkt7jph88cndnzm6je59a7llmcaqdy09m7gfg3skhffvpceu68ff7vc6mckvc32q8wc06h8gtktcahp8spy2sjpf Asking peer 0344e6f5eef4af071f1d4f867bf0b745a41c2f00d43b238592d426a4777146ea0c for quote to sell assets to pay for invoice over 500000000 msats; waiting up to 60s Got quote for 5000 asset units at 100000 msat/unit from peer 0344e6f5eef4af071f1d4f867bf0b745a41c2f00d43b238592d426a4777146ea0c with SCID 11993423829610654351 +------------+--------------+--------------+--------------+-------+----------+-----------------+--------------------+ | HTLC_STATE | ATTEMPT_TIME | RESOLVE_TIME | RECEIVER_AMT | FEE | TIMELOCK | CHAN_OUT | ROUTE | +------------+--------------+--------------+--------------+-------+----------+-----------------+--------------------+ | IN_FLIGHT | 0.019 | - | 62500 | 2.124 | 412 | 133040907026432 | bob->carol->03eb01 | | IN_FLIGHT | 0.042 | - | 54687.5 | 2.108 | 412 | 133040907026432 | bob->carol->03eb01 | | IN_FLIGHT | 0.063 | - | 47851.562 | 2.094 | 412 | 133040907026432 | bob->carol->03eb01 | | IN_FLIGHT | 0.118 | - | 41870.117 | 2.082 | 412 | 133040907026432 | bob->carol->03eb01 | | IN_FLIGHT | 0.136 | - | 73272.705 | 2.146 | 412 | 133040907026432 | bob->carol->03eb01 | | IN_FLIGHT | 0.153 | - | 54954.529 | 2.108 | 412 | 133040907026432 | bob->carol->03eb01 | | IN_FLIGHT | 0.241 | - | 41215.896 | 2.082 | 412 | 133040907026432 | bob->carol->03eb01 | | IN_FLIGHT | 0.260 | - | 61823.845 | 2.122 | 412 | 133040907026432 | bob->carol->03eb01 | | IN_FLIGHT | 0.381 | - | 61823.846 | 2.122 | 412 | 133040907026432 | bob->carol->03eb01 | +------------+--------------+--------------+--------------+-------+----------+-----------------+--------------------+ Amount + fee: 0 + 0 sat Payment hash: 2c2e165dc0f4efe9fe828bd8a11351aedbb2141de48aed6dd0bdc07c02b0e8ab Payment status: IN_FLIGHT
The command does not timeout after the default 60 seconds. I also noticed that after running this command,
litd
will not shutdown gracefully. Docker has to kill the process in order to stop the container.I also created a new network then tried a direct peer payment by creating the 5,000
AAA
invoice on bob. The behavior is the same in this case as well.I have tested asset invoice payments of 1K, 2K, 3K, and 4K. Those all succeed. It hangs when I send a payment of 5K or more.
Here are the logs for all of the nodes if it is helpful. alice.log bob.log carol.log dave.log
I think the above bug is solved by https://github.com/lightninglabs/taproot-assets/pull/959 I'll aim to get it merged and then bump the litd staging branch so that we can test once more.
Closing this issue as incomplete tasks have been rolled into their own issues.
(h/t to @jamaljsr for running these tests and documenting it all) Jamal ran through test flows on Polar to exhaustively test what is currently working with the latest vs. what is not working. Those flows and their outcomes are outlined below.
The network structure is the following with all
litd
nodes except forerin
which is Core Lightning. I've re-tested using the latestlitd branch 0-19-staging
(https://github.com/lightninglabs/lightning-terminal/commit/980ee938aa1e7a45633216aff8775ca8d05c12aa)Working
push_sat=5000
Not Working
FAILURE_REASON_NO_ROUTE
)FAILURE_REASON_INSUFFICIENT_BALANCE
) --> Solved by https://github.com/lightninglabs/taproot-assets/pull/962FAILURE_REASON_INSUFFICIENT_BALANCE
) --> Solved by https://github.com/lightninglabs/taproot-assets/pull/962no_route
)[WRN] CRTR: Failed to find route for payment 9923156905ce128cf60f1f807c200e78f4b5323f2c58f867870d4b7fb295b1da: destination hop doesn't understand new TLV payloads
Let us know if there are other flows to run through!