-
Notifications
You must be signed in to change notification settings - Fork 914
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
renepay: bugfix assertion htlc_total<=known_max #7574
renepay: bugfix assertion htlc_total<=known_max #7574
Conversation
d07117d
to
5d13c82
Compare
7aa263b
to
77684a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack 77684a1
Tests have just discovered a bug:
|
b87b113
to
9c968d8
Compare
Fixed some failed checks. It is confusing, even for me, the fact that we have sometimes flows with fees and some other times flows without fees (because MCF have flow conservation, fees cannot be transported). After the release I think a good approach Rebased on top of v24.08rc2 to fix conflicts. |
4161c2e
to
88dcfc9
Compare
In theory we should not have htlc_total<=known_max. But for some strange race condition we do sometimes. Until we find a solution to ensure the correct state of the uncertainty network we remove the assertion. Thanks to signed arithmetic and MIN guards, the rest of the code in linearize_channel can handle the weird cases with known_max<htlc_total. Signed-off-by: Lagrang3 <[email protected]>
- add more checks - add more error messages - compute probabilities without fees during MCF - compute probabilities with fees during get_routes Signed-off-by: Lagrang3 <[email protected]>
Reserved HTLCs were underestimated by floor (mathematical function) use ceil instead. Signed-off-by: Lagrang3 <[email protected]>
Refresh gossmap once before we read the routehints. Make sure that if channels in the routehints are public, we retrieve their capacities from gossip. Signed-off-by: Lagrang3 <[email protected]>
Add a little bit of uncertainty to the local channels to avoid consuming precisely all spendable_msat on our side, which leads to temporary channel failure if the spendable_msat changes during the course of the payment. Signed-off-by: Lagrang3 <[email protected]>
Channel filter must apply to the modified gossmap+localmods, otherwise we disable local channels with htlcmax=0. Signed-off-by: Lagrang3 <[email protected]>
88dcfc9
to
bc38f2d
Compare
Rebased |
Signed-off-by: Lagrang3 <[email protected]>
bc38f2d
to
b5f9734
Compare
ACK b5f9734 |
Make knowledge update and removal of pending HTLCs atomic to avoid race conditions.A quick and dirty solution: comment the assertion making sure the rest of the code in
linearize_channel
can handle theoffending cases (for which
known_max<htlc_total
).Fixes #7535.