Skip to content

StateStorage fast init #413

@ronnno

Description

@ronnno

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions