Skip to content

Conversation

@TheBlueMatt
Copy link
Collaborator

While our router fuzzer is pretty good at hitting internal assertions in our pathfinder, it doesn't actually do anything to check that the returned route is valid (or meets the requirements given to the pathfinder). Here we add some initial checks covering the feerates of the hops taken in the returned route. 

Currently fails because of lightning/bolts#1249

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Apr 10, 2025

👋 Hi! This PR is now in draft status.
I'll wait to assign reviewers until you mark it as ready for review.
Just convert it out of draft status when you're ready for review!

@TheBlueMatt TheBlueMatt marked this pull request as draft April 10, 2025 15:54
@TheBlueMatt TheBlueMatt force-pushed the 2025-04-route-valid-fuzz branch 3 times, most recently from faa148e to a364073 Compare April 10, 2025 19:00
When routing, we have to assign a node counter for the recipient. When searching for a path to a blinded recipient, we do this by assigning a node counter to a NUMS pubkey. This should be fine as there is no known private key corresponding to this NUMS point, and thus no first-hop or network graph nodes can appear for the same pubkey. However, this can fail in fuzzing as the fuzzer can forge valid signatures for the NUMS pubkey. Thus, here, we adapt the node counter allocation to issue a node counter without a corresponding public key when paying to a blinded path.
While our router fuzzer is pretty good at hitting internal assertions in our pathfinder, it doesn't actually do anything to check that the returned route is valid (or meets the requirements given to the pathfinder). Here we add some initial checks covering the feerates of the hops taken in the returned route.
@TheBlueMatt TheBlueMatt force-pushed the 2025-04-route-valid-fuzz branch from a364073 to 908c5bc Compare April 28, 2025 18:24
@codecov
Copy link

codecov bot commented Apr 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.13%. Comparing base (233aa39) to head (908c5bc).

Additional details and impacted files
@@ Coverage Diff @@ ## main #3728 +/- ## ======================================= Coverage 89.13% 89.13% ======================================= Files 157 157 Lines 123959 123968 +9 Branches 123959 123968 +9 ======================================= + Hits 110485 110497 +12  - Misses 10791 10796 +5  + Partials 2683 2675 -8 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants