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

Persist temp states to not lose sync progress #2151

Merged
merged 1 commit into from
Mar 16, 2021

Conversation

dapplion
Copy link
Contributor

@dapplion dapplion commented Mar 9, 2021

Motivation

Currently, we store a state every 1024 epochs. At slow sync speeds of 4 slots / second, that's +2 hours of sync progress lost. Fixes #2048

Screenshot from 2021-03-09 10-24-59

Proposed solution

Store state more frequently, every 32 epochs. Then, after a successful store, keep only the first state every 1024 epochs and delete the rest. In normal conditions, only 0 or 1 states will be deleted. The resulting layout of store states will look like

    |         |       |    .
 x-1024*2  x-1024   x-32   x

@codeclimate
Copy link

codeclimate bot commented Mar 9, 2021

Code Climate has analyzed commit 9c3b043 and detected 0 issues on this pull request.

View more on Code Climate.

@dapplion dapplion force-pushed the dapplion/persist-more-states branch 2 times, most recently from 8dd05e2 to a765f67 Compare March 13, 2021 08:42
@dapplion dapplion force-pushed the dapplion/persist-more-states branch from a765f67 to 9c3b043 Compare March 16, 2021 12:55
@dapplion
Copy link
Contributor Author

dapplion commented Mar 16, 2021

Bump, until we fix all our memory issues the problem this PR mitigates is very annoying, in this case the node is spending 10% of the time re-syncing lost progress

Screenshot from 2021-03-16 13-47-48

@wemeetagain wemeetagain merged commit e5e801a into master Mar 16, 2021
@wemeetagain wemeetagain deleted the dapplion/persist-more-states branch March 16, 2021 14:51
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.

Sudden crash cause synced progress lost
4 participants