lightning-cli -k invoice msatoshi=50000 description=test label=test exposeprivatechannels=true"warning_capacity": "No channels"getinfo output{
"id": "#",
"alias": "#",
"color": "#",
"num_peers": 3,
"num_pending_channels": 0,
"num_active_channels": 3,
"num_inactive_channels": 0,
"address": [],
"binding": [
{
"type": "ipv4",
"address": "127.0.0.1",
"port": 9735
}
],
"version": "v0.8.2",
"blockheight": 631295,
"network": "bitcoin",
"msatoshi_fees_collected": 0,
"fees_collected_msat": "0msat",
"lightning-dir": "/var/lib/clightning/bitcoin"
}
Could be that your channel's incoming capacity (i.e., capacity owned by the remote end minus its reserve value) is below the amount of the invoice.
If you have created a 1'000'000 satoshi outgoing channel, and then send 55'000 satoshi through it you have the following balances: 945'000 / 55'000. The remote reserve usually is 1%, so at least 10'000 satoshi need to stay at the remote end.
So while the remote end has 55'000 > 50'000 satoshi, it cannot send all of them, since 10'000 need to stay at their end, making the total incoming capacity "only" 45'000 satoshis, hence the warning.
Hmm, I have almost 5,000,000 sat incoming capacity on some channels. I opened a new, smaller private channel for testing, with which I can now generate invoices, up to its incoming capacity (shown in spark-wallet). However, I can still not generate 4,000,000 sat invoices with the older channels, even though their capacity is more than enough.
All of my old channels, however, have almost no outgoing capacity. Could this have something to do with it?
Unlikely, I should also point out that this is just a warning, you should still get a valid invoice. We just added that to avoid complaints about being unable to receive and not have an indication as to what the issue might be. The heuristic is not the most stable though, and we get a number of false positives.
I'm getting a valid invoice, without route hints though. Can one manually add a route hint?
Hmmm. If all channels are unpublished (please do not use the term "private" for unpublished channels, as unpublished channels represent a privacy tradeoff (you are informing your direct peer that you are very almost definitely the final recipient/sender whenever you receive/send via an unpublished channel, but you gain the bonus that the onchain funding UTXO is not revealed as a funding outpoint until it is closed) and are not perfectly better for privacy than published channels), then an invoice without any routehints at all is worthless, as it cannot be paid.
On the other hand, even if at the time the invoice is created all channels have insufficient capacity, the node operator could arrange to have channels drained later.
So how about this:
How about that instead?
Can one manually add a route hint?
Currently, no.
If you try to force a route hint, you have to first arrange for incoming capacity on the channel you are forcing into the route hint. And our pay command does not really give that kind of fine-grained control that we can say "take money from this channel only". So you have to go fix your channel capacities beforehand. Possibly, what we can do is what I suggested above: try to get incoming capacity in total above the invoice amount, and hope that somebody has invented a decent MPP that can actually pay it.
This should be fixed now with the new MPP invoices, is this still an issue @nixbitcoin ?
Still an issue. For some reason my older private channels with abundant incoming balance aren't included in route hints. Any way I can reinitialize the channels or make them public to bring them into scope for the invoice command?
When using unpublished channels, we do a round-robin scheme for the incoming channels rather than leak information on sizes by preferring larger incoming unpublished channels (which is the default when using published channels). It could be that your older channels with lots of incoming capacity are just on the tail end of the round-robin scheme. Can you check decodepay of generated invoices and try large numbers of invoice commands? How many channels do you have?
Can you check
decodepayof generatedinvoices and try large numbers ofinvoicecommands?
I did exactly that, for some reason they're not in scope for invoice generation.
How many channels do you have?
4 active channels, 2 older private channels that for some reason can't be used for invoice generation.
Hmmm. Needs more info. Are you willing to show listpeers result? getinfo?
Don't wanna doxx myself. Maybe it's better to run public channels anyway.
@nixbitcoin Is there any exact way to reproduce it? The reproduction script/steps could be private enough…
Could be the same issue I'm facing in #4386 (those are all public, though). I can't seem to make it include more than a single channel in route hints