question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Option to include private route hints in the invoice

See original GitHub issue

Describe the problem/bug When BTCpay Server generates and invoice for a node with private channels, there are no route hints added so the payment cannot be routed.

Your environment

  • Version of BTCPay Server: 1.0.4.0
  • Deployment method: manual deployment on a RaspiBlitz
  • Other relevant environment details: RaspiBlitz 1.4 with LND 0.9.0

Logs (if applicable) Test invoicegenerated by BTCpay (redacted) :

lncli decodepayreq lnbcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
{
    "destination": "xxxxxxxxxxxxxxxxxxxxxxxx",
    "payment_hash": "xxxxxxxxxxxxxxxxxxxx",
    "num_satoshis": "13844",
    "timestamp": "xxxxxxxxxx",
    "expiry": "899",
    "description": "Paid to test (Order ID: )",
    "description_hash": "",
    "fallback_addr": "",
    "cltv_expiry": "40",
    "route_hints": [
    ],
    "payment_addr": "xxxxxxxxxxxxxxxxxx",
    "num_msat": "13844000",
    "features": {
        "9": {
            "name": "tlv-onion",
            "is_required": false,
            "is_known": true
        },
        "15": {
            "name": "payment-addr",
            "is_required": false,
            "is_known": true
        },
        "17": {
            "name": "multi-path-payments",
            "is_required": false,
            "is_known": true
        }
    }
}

Invoice created in the command line with lncli addinvoice 1 (redacted):

$ lncli decodepayreq xxxxxxxxxxxxxxxxxxxxxxxxxxx
{
    "destination": "xxxxxxxxxxxxxx",
    "payment_hash": "xxxxxxxxxxxxxx",
    "num_satoshis": "1",
    "timestamp": "xxxxxxxxxx",
    "expiry": "3600",
    "description": "",
    "description_hash": "",
    "fallback_addr": "",
    "cltv_expiry": "40",
    "route_hints": [
        {
            "hop_hints": [
                {
                    "node_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                    "chan_id": "xxxxxxxxxxxx",
                    "fee_base_msat": 1000,
                    "fee_proportional_millionths": 1,
                    "cltv_expiry_delta": 40
                }
            ]
        }
    ],
    "payment_addr": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "num_msat": "1000",
    "features": {
        "9": {
            "name": "tlv-onion",
            "is_required": false,
            "is_known": true
        },
        "15": {
            "name": "payment-addr",
            "is_required": false,
            "is_known": true
        },
        "17": {
            "name": "multi-path-payments",
            "is_required": false,
            "is_known": true
        }
    }
}

To Reproduce Generate invoice on a node with private channels only .

Expected behavior Being able to pay.

Actual behavior Failed to send payment: unable to find path to the destination.

Screenshots/Links REST API format of route hints: https://api.lightning.community/rest/index.html#routehint

Additional context It is a good privacy feature to run a lightning node with private channels only. In that case the pubkey and channels are only advertised to the payer and not publicly.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:20 (12 by maintainers)

github_iconTop GitHub Comments

3reactions
bolatovumarcommented, May 10, 2020

This is what Zap wallet shows when you are creating a Lightning invoice. Notice the “Include routing hints” toggle. There is also a tooltip element that explains why you would want to enable it.

Capture

2reactions
rockstardevcommented, May 13, 2020

I’m on this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Give the option to add route hints / set private flag for invoices
When creating an invoice we can flag the private flag and thus the invoice will not include route hints for private channels Description...
Read more >
Choosing a routing policy
Choose a routing policy before you create records in Amazon Route 53. ... You can use simple routing to create records in a...
Read more >
Configuring routes and domains
The Cloud Foundry Gorouter routes requests to apps by associating an app with an address, known as a route. This is known as...
Read more >
Set up electric vehicle routing in Maps on iPhone
Set up electric vehicle routing in Maps on iPhone. The Maps app can help you plan trips that include stops for charging your...
Read more >
Routing incoming calls with IVR
The way you structure your IVR menu determines how callers are routed and what options they hear. ... Choose an IVR greeting from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found