Uh oh!
There was an error while loading. Please reload this page.
Periodical external pathfinding scores merge - #449
Conversation
e0b7070 to
58acc12CompareUh oh!
There was an error while loading. Please reload this page.
5858404 to
fdf2b5dCompareUh oh!
There was an error while loading. Please reload this page.
tnull
left a comment
There was a problem hiding this comment.
Thanks! Did a first pass, already looks pretty good!
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.
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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
5a42ff9 to
0cf5774CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
619c9c9 to
6ded8afCompareUh 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.
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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
7bf68af to
14167ebCompareUh 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.
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.
| async fn sync_external_scores( | ||
| logger: &Logger, scorer: &Mutex<CombinedScorer<Arc<Graph>, Arc<Logger>>>, | ||
| node_metrics: &RwLock<NodeMetrics>, kv_store: Arc<DynStore>, url: &String, | ||
| ) -> () { |
There was a problem hiding this comment.
I don't think so - this function cannot fail?
| match body { | ||
| Err(e) => { | ||
| log_error!(logger, "Failed to read external scores update: {}", e); | ||
| return; |
There was a problem hiding this comment.
Let's avoid these explicit returns if possible.
There was a problem hiding this comment.
Indeed, not necessary. I wanted to exit the parent function with these returns, but just letting it run would have the same result.
In this current revision I now have a few real ones, after unwrapping the matches a bit.
14167eb to
1a4b051Comparejoostjager
commented
Feb 7, 2025
Comments addressed. Now need to decide in lightningdevkit/rust-lightning#3562 how to read the combined scorer from disk (with local and merged data), and apply that in this PR. |
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.
7c9309d to
d6bb7cfCompared6bb7cf to
5ae6a35Compare| ) -> () { | ||
| let response = tokio::time::timeout( | ||
| Duration::from_secs(EXTERNAL_PATHFINDING_SCORES_SYNC_TIMEOUT_SECS), | ||
| reqwest::get(url), |
There was a problem hiding this comment.
should create a reqwest client instead of doing reqwest::get, otherwise it needs to redo TLS and everything each time
There was a problem hiding this comment.
should create a reqwest client instead of doing
reqwest::get, otherwise it needs to redo TLS and everything each time
Right, but establishing a new connection once an hour is reasonable? And probably preferable compared to keep a connection open if we only use it once an hour?
joostjager
commented
Sep 10, 2025
This has been parked, but I suppose with the new |
tnull
commented
Sep 10, 2025
Yes, please rebase! |
tnull
commented
Oct 7, 2025
Gentle ping @joostjager |
5ae6a35 to
19bf276Comparejoostjager
commented
Oct 16, 2025
Rebased |
tnull
left a comment
There was a problem hiding this comment.
Two minor comments, otherwise should look good.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
0dfafb6 to
961e67fComparetnull
commented
Oct 17, 2025
@joostjager Feel free to squash the fixup. More detailed/verbose commit messages would also be appreciated. |
Save external pathfinding scores in a cache so that they will be available immediately after a node restart. Otherwise there might be a time window where new scores need to be downloaded still and the node operates on local data only.
961e67f to
52705d3Comparejoostjager
commented
Oct 23, 2025
Squashed without changes. |
Uh oh!
There was an error while loading. Please reload this page.
Fixes#313
Depends on lightningdevkit/rust-lightning#3562
Export functionality in #458