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

Implement state sync strategy #4238

Open
dimartiro opened this issue Oct 9, 2024 · 0 comments
Open

Implement state sync strategy #4238

dimartiro opened this issue Oct 9, 2024 · 0 comments
Assignees
Labels
C-complex Complex changes across multiple modules. Possibly will require additional research. P-low this is mostly nice to have. S-network issues related to the dot/network package. T-feat this issue/pr is a new feature or functionality.

Comments

@dimartiro
Copy link
Contributor

dimartiro commented Oct 9, 2024

When the warp sync finished getting the fragments and its completed, we need to request and import the latest state.
This is a task that could take time and needs its own logic to be handle correctly.
For this reason we are not going to implement the state sync as part of the warp sync, instead, we are going to implement it as an independent strategy that might be run right after the warp sync strategy finished.

  • OnBlockAnnounceHandshake: Will update the best block hash / number for that peer
  • OnBlockAnnounce: same than OnBlockAnnounceHandshake
  • NextActions : Will return a state request
  • Process: Will process the response and import the state

We can read more about how the state sync is started after warp sync finishes here

An idea of how to implement the state sync strategy based on parity's implementation is here

@dimartiro dimartiro self-assigned this Oct 9, 2024
@dimartiro dimartiro added C-complex Complex changes across multiple modules. Possibly will require additional research. S-network issues related to the dot/network package. P-low this is mostly nice to have. T-feat this issue/pr is a new feature or functionality. labels Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-complex Complex changes across multiple modules. Possibly will require additional research. P-low this is mostly nice to have. S-network issues related to the dot/network package. T-feat this issue/pr is a new feature or functionality.
Projects
None yet
Development

No branches or pull requests

1 participant