Snapshots are compressed copies of the latest state of a blockchain, allowing a new node to synchronise with the network in an instant instead of downloading all the blocks. Snapshots are designed to satisfy all your node needs. They are fast, minimal and provide instant backups. It is intended for use as an alternative to syncing through the chain, which can take days or weeks. Thus, it is suitable for users who want to join a network without waiting long. And when the worst happens and your node setup gets corrupted, you can restore it instantly.
The RadiumBlock snapshot service is designed to provide a reliable method for bootstrapping Polkadot and Kusama validators. We provide daily snapshots that are available for free and open to the community. Node operators can quickly download and install nodes from our snapshots which reduces recovery times after failures. Snapshots for Kusama and Polkadot are updated daily and can only be downloaded in RocksDb format as of now. We also plan on enabling access to ParityDb snapshots in the future.
RadiumBlock is focused on providing enterprise-grade software and support catering to the need of PoS blockchains like Polkadot and Kusama networks. Snapshot storage, specifically, is one of the areas RadiumBlock has been working on over the past several months to enhance delivery for its customers.
Kusama and Polkadot snapshots are pruned to contain just enough data to validate the chain. The compressed RocksDb of the Kusama snapshot is 83Gb while that of the Polkadot snapshot is 43GB, yet they are not archive snapshots. Instead, they are pruned to contain the last one thousand blocks, making them much more efficient to download and validate.
How to Use Snapshots to Set Up Validator Nodes
We will take you through the steps to set up a validator node from RadiumBlock snapshots.
To begin, install and start the polkadot program(link to polkadot install). It will create the necessary folder structure in ~/.local .
We will be using RocksDb to explain the steps –
Install the polkadot binary and start polkadot as below:
For Polkadot node: polkadot --database RocksDb
For Kusama node: polkadot --database RocksDb --chain kusama
This will create the required folder structure in ~/.local.
- Stop the program with Ctrl+C.
- Remove the db folder:
For Polkadot node:
rm -rf ~/.local/share/polkadot/chains/polkadot/db
For Kusama node:
rm -rf ~/.local/share/polkadot/chains/ksmcc3/db
- Now, go to https://www.radiumblock.com/snapshots.html to choose the chain relevant to you and follow the instructions on the respective page to download and extract the db snapshot on your node.
Now you can start your node with all the relevant parameters. For example,
polkadot --validator --database=RocksDb --unsafe-pruning --pruning=1000 -–name MyPolkadotNode
polkadot –-chain kusama --validator --database=RocksDb --unsafe-pruning --pruning=1000 -–name MyKusamaNode
- After you start the polkadot program, the node will continue syncing and should be done within 10-15 minutes. It will then show as fully synced (Idle) in the system log.