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.

Lightning address pay fails if millisatoshi is not 0 mod 1000

See original GitHub issue

I’ve noticed this with btcpay.coincharge.io, I think this is a general issue in the new lnurlp implementation (but feel free to close if not). If the number of msatoshi is not round % 1000, it shows a fairly non-descript error:

$ curl "https://btcpay.coincharge.io/.well-known/lnurlp/<user>"
{"callback":"https://btcpay.coincharge.io/BTC/LNURL/pay/i/…", …
$ curl 'https://btcpay.coincharge.io/BTC/LNURL/pay/i/…?amount=123123&comment='
{"status":"ERROR","reason":"Lightning node could not generate invoice with description hash"}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
NicolasDoriercommented, Nov 4, 2021

Old version of LND (2 years old) didn’t support at API level sub satoshi invoices. Our library kept using the old field of the old API.

This fix at our library level https://github.com/btcpayserver/BTCPayServer.Lightning/commit/f66aa0ef8083e309625271c131b4f3cd8db674ce

I will release new version tonight with this bug fix.

1reaction
pavlenexcommented, Nov 3, 2021

Thanks for reporting it @laanwj.

cc @Kukks this could be related to problems people had (BTCPay Jungle/CoinCards)?

Read more comments on GitHub >

github_iconTop Results From Across the Web

lightning/tests/test_connection.py at master
Core Lightning — Lightning Network implementation focusing on spec compliance and performance - lightning/tests/test_connection.py at master ...
Read more >
lightning network - What makes millisatoshi real?
In the Lightning Network, it's possible to pay in units a thousandth of a satoshi, a millisatoshi. But you can't redeem them directly...
Read more >
[Bulletin] 1.3.2 - BitcoinTechWeekly.com
New Features: * Greenfield: Adds the Archive status to Invoice model ... Lightning address payment would fail if millisatoshi is not 0 mod...
Read more >
⚡ Wallet of Satoshi (@walletofsatoshi) / X
Reply with your WoS Lightning Address or LNURL Pay Static QR Code! We are going to send 10,000 sats each to 100 users,...
Read more >
lnd-grpc @ 0.1.22 .. 0.2.1 - Package Diff
+ window of zero indicates that no addresses should be recovered, such after ... + The passed payment hash *must* be exactly 32...
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