Sunday, December 22, 2024

lightning community – Unable to pay bill with route hints

You need to use lncli decodepayreq (in case you use LND) to decode the cost request:

$ lncli decodepayreq lnbc100n1pjh3k3ppp5h277ag6ks9wazapk0kyxrhm6r2gk8sncal0kzfkws99zv7l9x5ushp52slq5ft70d7r7z4x8672lde53m74uq07rfjnlewwxmgd0y0e3d4sxqyjw5qrzjqtmr7jfnnj958rpjjx4jrc6ardty9tprvqjqq694anfl65vr7tqyyyqsqyqqzqgpqyqqqqlgqqqqqeqqjqcqzzssp5a6ny5q66gj0whuzw3du9tagc3kt99kc22qv76adgx7eakuauwyxs9qypqsqa24wluek4dn6j0zc5r95alpsvjmt6k6egxlg695t4ysgywkvd8354a80fsd3y8w5sqv07nrx89exea04je23kxkvm2q72s72jlp44nsqw7dz30
{
    "vacation spot":  "02679279a043c444e6524f00172d911264b5d27c5b35e4df3bab4a30c3564ff3ca",
    "payment_hash":  "babdeea356815dd174367d8861df7a1a9163c278efdf6126ce814a267be53539",
    "num_satoshis":  "10",
    "timestamp":  "1702418977",
    "expiry":  "604800",
    "description":  "",
    "description_hash":  "543e0a257e7b7c3f0aa63ebcafb7348efd5e01fe1a653fe5ce36d0d791f98b6b",
    "fallback_addr":  "",
    "cltv_expiry":  "80",
    "route_hints":  [
        {
            "hop_hints":  [
                {
                    "node_id":  "02f63f49339c8b438c3291ab21e35d1b5642ac2360240068b5ecd3fd5183f2c042",
                    "chan_id":  "1157426203762688257",
                    "fee_base_msat":  1000,
                    "fee_proportional_millionths":  100,
                    "cltv_expiry_delta":  144
                }
            ]
        }
    ],
    "payment_addr":  "eea64a035a449eebf04e8b7855f5188d9652db0a5019ed75a837b3db73bc710d",
    "num_msat":  "10000",
    "options":  {
        "9":  {
            "title":  "tlv-onion",
            "is_required":  false,
            "is_known":  true
        },
        "15":  {
            "title":  "payment-addr",
            "is_required":  false,
            "is_known":  true
        }
    }
}

With none route trace, my well-connected node (c-otto.de) is unable to discover a route:

$ lncli queryroutes --dest 02679279a043c444e6524f00172d911264b5d27c5b35e4df3bab4a30c3564ff3ca --amt 10
[lncli] rpc error: code = Unknown desc = unable to discover a path to vacation spot

There’s a path to the node (ThunderHub) talked about within the route trace, although. The bill appears to be like OK to me. Paying it through lncli payinvoice resulted in a short lived channel failure (which is OK), then a timeout. With lnd-manageJ I used to be capable of pay the bill, although:

$ curl http://localhost:8081/api/funds/pay-payment-request/lnbc100n1pjh3k3ppp5h277ag6ks9wazapk0kyxrhm6r2gk8sncal0kzfkws99zv7l9x5ushp52slq5ft70d7r7z4x8672lde53m74uq07rfjnlewwxmgd0y0e3d4sxqyjw5qrzjqtmr7jfnnj958rpjjx4jrc6ardty9tprvqjqq694anfl65vr7tqyyyqsqyqqzqgpqyqqqqlgqqqqqeqqjqcqzzssp5a6ny5q66gj0whuzw3du9tagc3kt99kc22qv76adgx7eakuauwyxs9qypqsqa24wluek4dn6j0zc5r95alpsvjmt6k6egxlg695t4ysgywkvd8354a80fsd3y8w5sqv07nrx89exea04je23kxkvm2q72s72jlp44nsqw7dz30
{"timestamp":"2023-12-15T16:15:39.668723594Z","message":"Initializing cost babdeea356815dd174367d8861df7a1a9163c278efdf6126ce814a267be53539"}
{"timestamp":"2023-12-15T16:15:39.669776403Z","message":"Fee Choices: PaymentOptions[feeRateWeight=Optional[0], feeRateLimit=Non-obligatory.empty, feeRateLimitExceptIncomingHops=Non-obligatory.empty, ignoreFeesForOwnChannels=true, peer=Non-obligatory.empty, peerForFirstHop=Non-obligatory.empty]"}
{"timestamp":"2023-12-15T16:15:39.675791434Z","message":"#1: Sending 10 (0.0% = 0 in flight)"}
{"timestamp":"2023-12-15T16:15:43.240118946Z","message":"Sending to route #1: 10: [780301x1866x1 (known xxx), 799439x980x1 (cap 500,000,000), 774246x1727x1 (cap 79,999,806), 1052673x257x257 (cap 5,000,000,000)], 200100ppm, 201700ppm with first hop, chance 0.9999998529997013"}
{"timestamp":"2023-12-15T16:15:47.443849094Z","message":"#2: Sending 10 (0.0% = 0 in flight)"}
{"timestamp":"2023-12-15T16:15:48.660211543Z","message":"Sending to route #2: 10: [810332x675x10 (known xxx), 810525x2141x6 (cap 40,281,160), 1052673x257x257 (cap 5,000,000,000)], 100100ppm, 101000ppm with first hop, chance 0.9999997497449911"}
{"timestamp":"2023-12-15T16:16:49.351773462Z","message":"#3: Sending 10 (0.0% = 0 in flight)"}
{"timestamp":"2023-12-15T16:16:51.064301481Z","message":"Sending to route #3: 10: [780301x1866x1 (known xxx), 710892x988x1 (cap 11,000,000), 1052673x257x257 (cap 5,000,000,000)], 101200ppm, 102700ppm with first hop, chance 0.9999990889091753"}
{"timestamp":"2023-12-15T16:16:52.219868645Z","message":"#4: Sending 10 (0.0% = 0 in flight)"}
{"timestamp":"2023-12-15T16:16:53.465844812Z","message":"Sending to route #4: 10: [820281x324x1 (known xxx), 820126x2751x0 (cap 10,010,000), 1052673x257x257 (cap 5,000,000,000)], 200100ppm, 200100ppm with first hop, chance 0.9999989989991027"}
{"timestamp":"2023-12-15T16:16:56.510273552Z","message":"Settled"}

You are welcome 🙂

Based mostly on my makes an attempt, it appears each “LNBϟG [Edge-3]” and “bfx-lnd1” didn’t learn about their (introduced) channels to ThunderHub, inflicting “UNKNOWN_NEXT_PEER” errors.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles