-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Encountering AmountBelowMinimum routing error in pathfinding is not gracefully handled #4807
Comments
Before things are resolved on our end (to factor in this new usage of the error code), Phoenix could simply start to advertise the correct min_htlc value in their channel update. |
Also one other detail here is that we'll actually try again after the initial failure, in order to give the node a chance and give us an up to date channel update for the channel. In this case since the channel doesn't actually exist (?) I guess they send the default set of channel update params which causes us to try again and fail, only then starting to blacklist the edge. |
Right - the channel doesn't exist at this point (they intend to create the channel on demand) - The only thing that exists about the channel is a routing hint that's embedded in the invoice that is being paid, which looks like this: {
"type":"r",
"length":82,
"description":"routing_information",
"value":{
"public_key":"03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f",
"short_channel_id":"ff7bd5ebdd042c44",
"fee_base_msat":1000,
"fee_proportional_millionths":100,
"cltv_expiry_delta":144
}
} So no detail about |
That wouldn't be enough, because it seems like there's actually another bug where lnd doesn't take into account |
That's because the invoice doesn't have a field for that information, that's why we have to rely on |
Update routing hints upon failure: #2151 |
@t-bast ah you're totally right re the bug related to private chans and chan updates! We'll take a look at re-prioritizing that for our next major release. |
Awesome thanks! |
This should be fixed by #5218 |
Fixed by #5332 |
Background
When trying to pay an invoice to a new Phoenix wallet user that has no existing channels or inbound liquidity the ACINQ node will attempt to do on demand channel creation (similar to what the Breez folks are doing). If the invoice value is above 1000 sats then things work as expected. If the invoice value is below 1000 sats then the Phoenix interceptor node will return the error
AmountBelowMinimum
as they do not want to be opening channels to their users for such small payments.When this happens, it appears that lnd’s mission control system marks the node pair as bad. This causes all subsequent attempts to pay to Phoenix to fail - even if they are over the 1000 sat threshold detailed in the
amount_below_minimum
error response.When pathfinding, LND should handle
AmountBelowMinimum
errors by preventing payments through the problem node that are below the minimum amount as learned from the detail of the error response. But it should not affect payments above the threshold.Your environment
Steps to reproduce
AmountBelowMinimum
error.example:
lnbc100n1p0m6qlrpp5xqrjmnyrdjxv254m0pl6037yusn5h39cdnxq7vm2p04kv252ttrsdqqxqyjw5q9qtzqqqqqq9qsqsp5vqpp6na0urpetme4he4529n8gpdrladyzhvz92scx6a0natdya6srzjqwryaup9lh50kkranzgcdnn2fgvx390wgj5jd07rwr3vxeje0glcllmm6h4a6ppvgsqqqqlgqqqqqeqqjq88ttyankaq99yzj3yg0re244ewp9fwy6pkvmwnp3pk2rwq8872x45923pyr33shvylfpxf596fmxptu4a3fq4ywc3yg2ac23az49znqp6sz5n3
AmountBelowMinimum
error from the ACINQ interceptor node - see full response here: https://paste.ubuntu.com/p/HkX264Tw8r/03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f
) has been blacklisted as a result:lnbc100100n1p0m6p99pp5dtkt5e8aj0n5y442u6f458yxmpcanjmnc9gltj6uer36jjmsag7qdqqxqyjw5q9qtzqqqqqq9qsqsp5a4jzlhayvs4leal0nepkfp0ccc6mflfqg2vpz76fu2enkfz54v3qrzjqwryaup9lh50kkranzgcdnn2fgvx390wgj5jd07rwr3vxeje0glcllmm6h4a6ppvgsqqqqlgqqqqqeqqjq88ddtkt8z9h36nw5jy3v07myvvpmpac8gt6uwc7yryrpnhets7ghfzpmusm37v5gyvzdekkwhf88x7xfelzanfdr4n6gw9atalvj3wgqhg5tga
FailureReasonNoRoute
error:Mission control remains unchanged.
So the net result is that if a single payment attempts fails with the
AmountBelowMinimum
error then this causes all subsequent attempts to fail, even if they are over the minimum value.Problem seems to stem from code here:
lnd/routing/result_interpretation.go
Lines 343 to 364 in 1354a46
See related discussion in slack here https://lightningcommunity.slack.com/archives/C6BDA6DGE/p1606225336336800
One suggestion was that
htlc_minimum_msat
should be integrated into mission control, similar to how it handles temporary channel failures due to lack of funds.Expected behaviour
First payment attempt should fail since it's below the minimum. The second payment attempt should succeed since it's above the threshold.
Actual behaviour
Both payments fail. Essentially, a single case of
AmountBelowMinimum
error causes all future payments through the node to fail.The text was updated successfully, but these errors were encountered: