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

StateStorage fast init #413

Open
ronnno opened this issue Oct 31, 2018 · 1 comment
Open

StateStorage fast init #413

ronnno opened this issue Oct 31, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@ronnno
Copy link
Contributor

ronnno commented Oct 31, 2018

Instead of intra-node sync between block storage and state storage:

  1. Build state in NewInMemoryStatePersistence() - by scanning state diffs from raw blocks without locks overhead.
  2. Build merkle only for final state entries - do not build intermediate merkle trees.

This approach bypasses all service synchronization and safety checks when first loading state into memory on node startup. The node does not go online until this process completes and there is no need for intra-node sync.

This should improve loading time state into memory by two orders of magnitude, based on current benchmarks.

@ronnno ronnno added the enhancement New feature or request label Oct 31, 2018
@netoneko
Copy link
Contributor

netoneko commented Jul 5, 2020

Proof of concept #1558

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants