How users select snapshots
Minimal data snapshot (s0): Belongs to the light client and is used for wallet broadcast transaction nodes.
Ordinary data snapshot (s1): the defi project side of the exclusive rpc service
Archived data snapshot (s3): professional chain node service organization (such as infura), a service provider with on-chain big data summary query
Minimum data snapshot s0
The minimum data snapshot is the data cut to the last block, delete cs.wal, tx_index.db, watch.db data, the advantage is that the amount of data is small, the download data is fast, and the node can be quickly deployed; the disadvantage is that the historical data cannot be queried, including Historical block data, transaction data, status data, event data, etc. The data before the block height cannot be queried; after synchronizing the block operation, the data after the block height can be queried.
Ordinary data snapshot s1
Ordinary data snapshots have a medium amount of data. The block height starts at 2322601. Only the state data of the latest height is kept. The previous state data has been pruned, and the block and states data have not been pruned. The block and state data contain data from height 2322601 to the height of the current block. You can query the current block data, transaction data, and status data, which can be used for continuous delivery after deployment;
archive data snapshot s3
Archived data snapshots have the largest amount of data, and the block height starts at 2322601 without any pruning. The block, state, and application data include all data from the height of 2322601 to the current block height, and can query historical block data, transaction data, status data, event data, etc. The disadvantage is that the amount of data is very large, and it takes a certain amount of time to download the data.
Parameter settings and size comparison of s0-s3:
- s0. The smallest size, only contains the last block and the last data status.
- s1. exchaind start --pruning everything: All saved states will be deleted, only the current state will be stored, and a pruning operation will be performed every 10 blocks. bigger than s0
- s2. exchaind start --pruning default: Save the state every 10,000 blocks, and keep the state of the last 100 blocks, and perform a pruning operation every 10 blocks. bigger than 1
- s3. exchaind start --pruning nothing: All historical state will be preserved and nothing will be deleted, i.e. archive nodes. size max
Data snapshot deployment suggestions
Archived data snapshot (s3): Need to query historical data, select archived data snapshot
Ordinary data snapshot (s1): Need to continue to generate blocks, query the data of the current block, select ordinary archive snapshots
Minimum data snapshot (s0): Need to quickly deploy nodes, choose the minimum data snapshot