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

Pure state sync refactoring (part-2) #6521

Merged
merged 14 commits into from
Nov 20, 2024

Conversation

liuchengxu
Copy link
Contributor

This PR is the second part of the pure state sync refactoring, encapsulating StateSyncMetadata as a separate entity. Now it's pretty straightforward what changes are needed for the persistent state sync as observed in the struct StateSync:

  • state: redirect directly to the DB layer instead of being accumulated in the memory.
  • metadata: handle the state sync metadata on disk whenever the state is forwarded to the DB, resume an ongoing state sync on a restart, etc.

@lexnv lexnv self-requested a review November 18, 2024 18:21
@bkchr bkchr added the T0-node This PR/Issue is related to the topic “node”. label Nov 18, 2024
/// is ready to be imported.
pub struct StateSync<B: BlockT, Client> {
target_block: B::Hash,
struct StateSyncMetadata<B: BlockT> {
Copy link
Contributor

Choose a reason for hiding this comment

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

minor nit; Would be useful to have some documatation on this struct and exposed methods

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a private struct and not publicly exposed. Feel free to add some docs if you think that's necessary :(

Copy link
Contributor

@lexnv lexnv left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks again for contributing 🙏

@bkchr bkchr enabled auto-merge November 19, 2024 22:13
@bkchr bkchr added this pull request to the merge queue Nov 19, 2024
Merged via the queue into paritytech:master with commit 07a5933 Nov 20, 2024
194 of 198 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T0-node This PR/Issue is related to the topic “node”.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants