-
Notifications
You must be signed in to change notification settings - Fork 367
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
Fix debug panic in the case where a first hop has a channel with an introduction node #2503
Fix debug panic in the case where a first hop has a channel with an introduction node #2503
Conversation
Fuzzer disagrees with you, it definitely knows how to get this :).
|
Well you're running the main fuzzers, so I won't know if it gets it unless you tell me lol. Lmk if it got anything else. |
I mean you can run it too, there's nothing special about me :) |
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.
looks good!
c305cda
to
24b11ff
Compare
Added another fix and test for this failing fuzz input: https://pastebin.com/GtCUpwEd |
This previously led to a debug panic in the router because we wouldn't account for the blinded path fee when calculating first_hop<>intro_node hop's available liquidity and construct an invalid path that forwarded more over said hop than was actually available. This also led to us hitting unreachable code, see direct_to_matching_intro_nodes test description.
24b11ff
to
c9f5a75
Compare
Previously, we wouldn't account for the blinded path fee when calculating a
first_hop
<>intro_node
hop's available liquidity, and construct an invalid path that forwarded more over said hop than was actually available, leading to a debug panic.I'm not sure why the fuzzer didn't catch this. I don't see anything stopping it from generating routes where we have a direct channel between a first hop and an intro node? But I also don't have the strongest understanding of the art of our fuzzing framework. Seems like a candidate for the post-BOLT12 "let's focus on paying down tech debt" quarter.<- the fuzzer did catch it actually