Skip to content
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

Plot while syncing #2487

Merged
merged 2 commits into from
Feb 1, 2024
Merged

Plot while syncing #2487

merged 2 commits into from
Feb 1, 2024

Conversation

nazar-pc
Copy link
Member

Builds on changes introduced in #2476 and resolves #2400 by only waiting for node to become aware of archival history, not to sync to the tip.

This means that piece cache sync and plotting can happen in parallel to node sync and reduce total amount of time farmer needs before they can start farming.

While the logic here is not perfect, I believe it is good enough for things to work reasonably well in practice, better than they did before.

Code contributor checklist:

@nazar-pc nazar-pc requested a review from NingLin-P January 31, 2024 08:15
@nazar-pc nazar-pc enabled auto-merge January 31, 2024 19:59
@nazar-pc nazar-pc added this pull request to the merge queue Feb 1, 2024
Copy link
Contributor

@ParthDesai ParthDesai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense. Just one minor question.

@@ -303,21 +305,36 @@ where

info!("Synchronizing piece cache");

// TODO: Query from the DSN too such that we don't build outdated cache at start if node is
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this TODO no longer apply here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we query it from the node instead now. I mean we could query DSN from farmer as well, but for simplicity of the implementation I decided to not do that

github-merge-queue bot pushed a commit that referenced this pull request Feb 1, 2024
@nazar-pc nazar-pc removed this pull request from the merge queue due to a manual request Feb 1, 2024
@nazar-pc nazar-pc added this pull request to the merge queue Feb 1, 2024
Merged via the queue into main with commit a518d2e Feb 1, 2024
11 checks passed
@nazar-pc nazar-pc deleted the plot-while-syncing branch February 1, 2024 08:15
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.

Allow plotting while the node is still syncing
2 participants