Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[custom channels]: send/receive of below-dust sat amounts get pathfinding spinning #1073

Closed
vanditshah99 opened this issue Aug 9, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@vanditshah99
Copy link

We tried a few scenarios

a. Receiver provides us with SATS invoice, we pay the invoice via Assets, the node hangs up due to showing inflight status

42600e04aacd:/# litcli -n testnet --macaroonpath /root/.lnd/data/chain/bitcoin/testnet/admin.macaroon ln payinvoice --pay_req lntb12u1pntf9twpp5wadm3egqwkqkhndw0pavf0hphr7pcc90l0qz5pufwvpztldydcaqdqqcqzzsxqr23ssp5rnks6m82weyly7fyqsmnd00cw3f3lukew8cyl3c53dn4rdx5nsqq9qyyssq5cx3lafn8whmxvg7vlgf4ugzz7v07zhgmr36263qypr2zfl8a3gq8vj7whc5uxmq3r52eds80kgwx36wgh3cmcmpelxmwfzeu5at9jgq8y2k74 --asset_id f8ffc554dad8a3780c408297a70b70af1c8d96cae3c167ff55cbd6308edb2a08
Asking peer 0310fc0c9bec84463bfc7fc2c9c8de4ebb1a0417e89c4aaeb0be14ea80390959b3 for quote to sell assets to pay for invoice over 1200000 msats; waiting up to 60s
Got quote for 66666 asset units at 18 msat/unit from peer 0310fc0c9bec84463bfc7fc2c9c8de4ebb1a0417e89c4aaeb0be14ea80390959b3 with SCID 5345748488891851941
Payment hash: 775bb8e50075816bcdae787ac4bee1b8fc1c60affbc02a0789730225fda46e3a
Description:
Amount (in satoshis): 1200
Fee limit (in satoshis): 60
Destination: 026c0f266268c1edc4e1f7e17ba6aa18979fee47f059e46a40cafbbcc56ab3df57
Confirm payment (yes/no): yes
+------------+--------------+--------------+--------------+-------+----------+---------------------+--------------------------+
| HTLC_STATE | ATTEMPT_TIME | RESOLVE_TIME | RECEIVER_AMT | FEE   | TIMELOCK | CHAN_OUT            | ROUTE                    |
+------------+--------------+--------------+--------------+-------+----------+---------------------+--------------------------+
| IN_FLIGHT  |        0.052 |            - | 1200         | 1.001 |  2872903 | 3157118996311179264 | taplit->SpeedTesnet1Prod |
+------------+--------------+--------------+--------------+-------+----------+---------------------+--------------------------+
Amount + fee:   0 + 0 sat
Payment hash:   775bb8e50075816bcdae787ac4bee1b8fc1c60affbc02a0789730225fda46e3a
Payment status: IN_FLIGHT

Here are the logs from the server
paying_via_asset.txt

b. Another scenario we tried,
Receiving an asset paying via SATS, for a smaller amount, Lower than 354 Dusk


2024-08-06 11:46:01.062 [DBG] CRTR: TLV traffic shaper returned custom records (lnwire.CustomRecords) (len=1) {
 (uint64) 65536: ([]uint8) (len=46 cap=1024) {
  00000000  01 2c 00 20 f8 ff c5 54  da d8 a3 78 0c 40 82 97  |.,. ...T...x.@..|
  00000010  a7 0b 70 af 1c 8d 96 ca  e3 c1 67 ff 55 cb d6 30  |..p.......g.U..0|
  00000020  8e db 2a 08 01 08 00 00  00 00 00 00 03 e8        |..*...........|
 }
}
 and amount 19000 msat for HTLC
2024-08-06 11:46:01.082 [DBG] CRTR: Attempt 7000 for payment 37c6265bfb55ff73524b591204578d836fa184bf6e7f25c74871b731adb318b9 successfully sent to switch, route: 3157118996311179264 (19000 mSAT), cltv 2872465
2024-08-06 11:46:01.082 [DBG] CRTR: Collecting result for attempt 7000 in payment 37c6265bfb55ff73524b591204578d836fa184bf6e7f25c74871b731adb318b9
2024-08-06 11:46:01.082 [DBG] CRTR: Payment 37c6265bfb55ff73524b591204578d836fa184bf6e7f25c74871b731adb318b9: status=In Flight, active_shards=1, rem_value=0 mSAT, fee_limit=0 mSAT
2024-08-06 11:46:01.082 [DBG] HSWC: ChannelLink(7869867f8e9667dde7ef709bac00497eab921db5d7378626c446eaeb9d48523e:0): queueing keystone of ADD open circuit: (Chan ID=0:0:0, HTLC ID=7000)->(Chan ID=2871383:196:0, HTLC ID=24)
2024-08-06 11:46:01.083 [DBG] PEER: Peer(0310fc0c9bec84463bfc7fc2c9c8de4ebb1a0417e89c4aaeb0be14ea80390959b3): Sending UpdateAddHTLC(chan_id=3e52489debea46c4268637d7b51d92ab7e4900ac9b70efe7dd67968e7f866978, id=24, amt=19000 mSAT, expiry=2872465, hash=37c6265bfb55ff73524b591204578d836fa184bf6e7f25c74871b731adb318b9, blinding_point=, custom_records=map[65536:[1 44 0 32 248 255 197 84 218 216 163 120 12 64 130 151 167 11 112 175 28 141 150 202 227 193 103 255 85 203 214 48 142 219 42 8 1 8 0 0 0 0 0 0 3 232]]) to 0310fc0c9bec84463bfc7fc2c9c8de4ebb1a0417e89c4aaeb0be14ea80390959b3@10.0.6.80:52640
2024-08-06 11:46:01.084 [DBG] HSWC: Subscribing to result for paymentID=7000
2024-08-06 11:46:01.149 [DBG] TSVR: FetchLeavesFromView called, isOurCommit=false, ourBalance=42549000 mSAT, theirBalance=54352000 mSAT, numOurUpdates=1, numTheirUpdates=0
2024-08-06 11:46:01.150 [ERR] HSWC: ChannelLink(7869867f8e9667dde7ef709bac00497eab921db5d7378626c446eaeb9d48523e:0): failing link: unable to update commitment: unable to fetch aux leaves: unable to generate allocations: error checking amounts: outgoing HTLC asset balance 1000 has dust BTC balance (19000 mSAT) on HTLC with index 24 (dust limit 0.00000354 BTC) with error: internal error
2024-08-06 11:46:01.150 [INF] HSWC: ChannelLink(7869867f8e9667dde7ef709bac00497eab921db5d7378626c446eaeb9d48523e:0): exited
2024-08-06 11:46:01.150 [INF] HSWC: ChannelLink(7869867f8e9667dde7ef709bac00497eab921db5d7378626c446eaeb9d48523e:0): stopping

How to handle an asset minted in millicents, and whose exchange cannot make up to dusk limit, how to support micropayments for this? In this case too, node got stuck and we needed to restart the node

Running this LITD Tag

[v0.13.99-experimental](https://github.com/lightninglabs/lightning-terminal/releases/tag/v0.13.99-experimental)
@vanditshah99 vanditshah99 added the bug Something isn't working label Aug 9, 2024
@guggero guggero transferred this issue from lightninglabs/lightning-terminal Aug 9, 2024
@guggero guggero changed the title LIT Node Pauses while sending payment [custom channels]: send/receive of below-dust sat amounts get pathfinding spinning Aug 9, 2024
@guggero
Copy link
Member

guggero commented Aug 9, 2024

Symptom seems to be similar to #1013, the path finding algorithm ends up spinning forever trying to find a route.

@Roasbeef
Copy link
Member

Roasbeef commented Aug 9, 2024

Amount + fee: 0 + 0 sat

Looks like it ended up trying to send a zero value HTLC if the logging here is correct.

@guggero
Copy link
Member

guggero commented Aug 12, 2024

Amount + fee: 0 + 0 sat

Looks like it ended up trying to send a zero value HTLC if the logging here is correct.

I think that's always 0 while things are in-flight (and the table above it is being updated).
Because in the table it shows a bigger amount:

+------------+--------------+--------------+--------------+-------+----------+---------------------+--------------------------+
| HTLC_STATE | ATTEMPT_TIME | RESOLVE_TIME | RECEIVER_AMT | FEE   | TIMELOCK | CHAN_OUT            | ROUTE                    |
+------------+--------------+--------------+--------------+-------+----------+---------------------+--------------------------+
| IN_FLIGHT  |        0.052 |            - | 1200         | 1.001 |  2872903 | 3157118996311179264 | taplit->SpeedTesnet1Prod |
+------------+--------------+--------------+--------------+-------+----------+---------------------+--------------------------+

@dstadulis
Copy link
Collaborator

Related to #1060

@GeorgeTsagk
Copy link
Member

Closed by #1120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: ✅ Done
Development

No branches or pull requests

5 participants