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.
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 structStateSync
: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.