You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add new oasis-node storage create-checkpoint --version:[uint64] --runtime[hex id], that creates checkpoints for all storage roots of the specified State DB. If --runtime flag is omitted than command creates a checkpoint for the consensus State DB.
To import the checkpoint we could use symmetric oasis-node storage import-checkpoint
Pros
Trivial to implement, as we already have all building blocks (see checkpoint package).
Creating a snapshot will no longer require genesis sync, but instead you will start Consensus Block Sync and later followed with Runtime Diff Sync from the exact checkpoint height (!).
Cons
You need access to a node that has at least as old state as your snapshot start date. Then you have to create a checkpoint on the remote node, copy it to the new node, and finally import it.
Bonus
Since checkpoints are currently < 10Gb, we could in addition to providing snapshots offer historical checkpoints (e.g. every half a year).
As suggested by @peternose, probably the cleanest way would be to add keep_from strategy to the pruning config.
This way you could specify height/round from which the data should be preserved.
Assuming you would have pruning enabled from the genesis onward this would work out of the box for you, as internally we could implement very aggressive pruning until this height/round - thread.
Pros
Relatively easy to implement as this is just another pruner kind for consensus and runtime.
Cons
You will still have to sync from the genesis onwards.
Need to extend config, increasing LOC of main oasis logic.
Update: Add per-runtime pruning config as not every runtime has same version at given consensus height.
Motivation
Storing all historical data for all paratimes from genesis on has exceeded
2TB, hence we are moving towards incremental snapshot creation.Creating a snapshot with exact start
dayversion is currently practically impossible (e.g. see). Moreover, it takes too much time.Additional Challenges
Proposed Solution
Add new create/import checkpoint commands
Add new
oasis-node storage create-checkpoint --version:[uint64] --runtime[hex id], that creates checkpoints for all storage roots of the specified State DB. If--runtimeflag is omitted than command creates a checkpoint for the consensus State DB.To import the checkpoint we could use symmetric
oasis-node storage import-checkpointPros
checkpointpackage).Cons
Bonus
10Gb, we could in addition to providing snapshots offer historical checkpoints (e.g. every half a year).Alternative
keep_frompruning configuration.Pros
Cons
We could also implement both.