Skip to content

feat(f3): prefetch the power table of every parent tipset #13107

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

Closed

Conversation

Stebalien
Copy link
Member

Given that we lag F3 by 4 epochs, this means we SHOULD already have the appropriate power table in the cache before we try to agree on it. This is very "best effort" and won't be very effective during catch-up.

Honestly, the right way to do this is likely to have F3 pre-fetch and queue up future tipsets, but that's more complicated.

follows #13106

@github-project-automation github-project-automation bot moved this to 📌 Triage in FilOz May 7, 2025
@github-project-automation github-project-automation bot moved this to Todo in F3 May 7, 2025
@Stebalien Stebalien force-pushed the steb/f3-power-table-once branch from fbd9463 to 514574b Compare May 7, 2025 12:46
@Stebalien Stebalien force-pushed the steb/f3-power-table-prefetch branch from c0e3f56 to beeebd0 Compare May 7, 2025 12:46
@Stebalien Stebalien requested a review from Kubuxu May 7, 2025 12:49
Given that we lag F3 by 4 epochs, this means we SHOULD already have the
appropriate power table in the cache before we try to agree on it. This
is very "best effort" and won't be very effective during catch-up.

Honestly, the _right_ way to do this is likely to have F3 pre-fetch and
queue up future tipsets, but that's more complicated.
@Stebalien Stebalien force-pushed the steb/f3-power-table-prefetch branch from beeebd0 to 40c3ef6 Compare May 7, 2025 13:46
@BigLep BigLep moved this from Todo to In review in F3 May 7, 2025
@Kubuxu
Copy link
Contributor

Kubuxu commented May 7, 2025

This has a nasty side effect of causing non-useful work while F3 is behind. Pre-fetch will override itself before the work becomes useful.

@Stebalien
Copy link
Member Author

Hm. I thought our cache was bigger. One option is to only cache so far beyond the last requested tipset but... that defeats the point of doing this in lotus (trying to keep it simple).

Given that we already lag F3 by 4 epochs, the right approach is (IMO) to do this prefetching in F3 itself by:

  1. Fetching the chain we need immediately.
  2. Spawning an async task to pre-fetch up to the max tipsets per-instance power-tables (or doing this in some task worker).

(and fetch power tables in parallel in general).

@Stebalien Stebalien closed this May 7, 2025
@github-project-automation github-project-automation bot moved this from 📌 Triage to 🎉 Done in FilOz May 7, 2025
@github-project-automation github-project-automation bot moved this from In review to Done in F3 May 7, 2025
@Kubuxu
Copy link
Contributor

Kubuxu commented May 7, 2025

Yeah, that is my plan. Thanks for the code in any case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Status: 🎉 Done
Development

Successfully merging this pull request may close these issues.

2 participants