Skip to content

Add delays when reading past payment events for stats#3288

Merged
t-bast merged 3 commits intomasterfrom
delay-peer-stats-tracker-init
Apr 15, 2026
Merged

Add delays when reading past payment events for stats#3288
t-bast merged 3 commits intomasterfrom
delay-peer-stats-tracker-init

Conversation

@t-bast
Copy link
Copy Markdown
Member

@t-bast t-bast commented Apr 15, 2026

When we restart, we load past payments events into the peer stats tracker to inform our scoring algorithm. We read them in chunks, but it can be quite expensive in terms of bandwidth. Since this is low priority and there are a lot of DB reads already happening when starting up, we add a large initial delay and a small-ish chunk delay.

With the default values, all past events should be loaded ~20 minutes after starting up, and the first run of the scoring algorithm happens 1 hour after starting up, so this should work well.

When we restart, we load past payments events into the peer stats
tracker to inform our scoring algorithm. We read them in chunks,
but it can be quite expensive in terms of bandwidth. Since this is
low priority and there are a lot of DB reads already happening when
starting up, we add a large initial delay and a small-ish chunk delay.

With the default values, all past events should be loaded ~20 minutes
after starting up, and the first run of the scoring algorithm happens
1 hour after starting up, so this should work well.
@t-bast t-bast requested a review from pm47 April 15, 2026 13:37
Comment thread eclair-core/src/main/resources/reference.conf Outdated
Comment thread eclair-core/src/main/scala/fr/acinq/eclair/profit/PeerStatsTracker.scala Outdated
@t-bast t-bast merged commit 1a88ebe into master Apr 15, 2026
1 check passed
@t-bast t-bast deleted the delay-peer-stats-tracker-init branch April 15, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants