Uh oh!
There was an error while loading. Please reload this page.
Avoid looping CLTV shadow routes. - #1360
Conversation
Codecov Report
@@ Coverage Diff @@## main #1360 +/- ##
==========================================
- Coverage 90.77% 90.75% -0.02%
==========================================
Files 73 73 Lines 41062 41069 +7 Branches 41062 41069 +7 ==========================================
+ Hits 37272 37273 +1 - Misses 3790 3796 +6
Continue to review full report at Codecov.
|
5c48f4d to
2adbbfdCompareSince the fuzzer was failing at a related point, I now rebased this off #1358. |
TheBlueMatt
commented
Mar 17, 2022
Sorry about the fuzz failure, #1358 landed now so feel free to rebase. |
2adbbfd to
e3e437dComparetnull
commented
Mar 17, 2022
No apology necessary, especially in this case... Rebased on main now. |
Uh oh!
There was an error while loading. Please reload this page.
e3e437d to
a26083eCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
jkczyz
commented
Mar 23, 2022
Overall looks good. Fine with squashing and merging as is. Just want to note my observation that |
eb5a4c4 to
6b84c7eComparetnull
commented
Mar 23, 2022
Rebased and squashed. |
jkczyz
commented
Mar 23, 2022
Looks like github actions are acting up. Could you run the following? |
TheBlueMatt
commented
Mar 23, 2022
Hmm, did you have to rebase? Please don't rebase unless there's an actual conflict as it means reviewers can't as easily compare to the previous state. |
6b84c7e to
11c3120Comparetnull
commented
Mar 23, 2022
Done!
Ah, sorry, didn't realize that. Will keep in mind. |
Uh oh!
There was an error while loading. Please reload this page.
This PR is a follow-up to #1286: it avoids 'shadow route' random walks that loop back on the actual payment path, since such paths are implausible from an adversary's perspective.
With this I also simplified the code a bit and opted to always generate a random shadow route of a certain length. When no suitable offset can be retrieved from the (unvisited) public network graph, the hop offset is filled with the default of
MEDIAN_HOP_CLTV_EXPIRY_DELTA == 40to simulate a partially private path.As however already noted in #1286, such loopless random walks tend to be less diverse. For example, in the small test scenario generated by
build_graph(), this implementation now basically always uses the fallback value since it's running out of options. It should also be noted that in order not to reduce the set of candidate paths even further, I now opted to account for visited nodes on per-path basis, i.e., crossing the streams is still possible for MPPs.