Faster bringup of a Polkadot validator with Polkashots.io

Compressed database snapshots

Substrate has an export-blocks and import-blocks function. These are native commands to package blocks into a file. However, this format has several limitations. We have chosen instead to provide compressed snapshots of the underlying database files.

  • ParityDb is the new experimental database format that provides very good performance, and is expected to become the default soon,
  • RocksDb is a mature database format, currently the default for Polkadot and all substrate chains, and is less performant than ParityDb.

Don’t trust, verify

As a validator, you must take good custody of the network. Do not just blindly download a snapshot from the Internet.

How to use

Install and start the polkadot program. It will create the necessary folder structure in ~/.local . In this example, we will be using the ParityDb format:

polkadot --db=paritydb
wget https://dot.polkashots.io/snapshot -O polkadot.ParityDb.7z
7z x polkadot.ParityDb.7z -o~/.local/share/polkadot/chains/polkadot
polkadot --name "My node" --db=paritydb
polkadot --name "My node" --validator --unsafe-pruning --pruning=1000

How it works

The snapshot generator is hosted on Google Kubernetes Engine and uses several cutting-edge features to get the job done:

  • volume snapshotting to run the compression job on a “frozen” filesystem state while the node is still running,
  • workload identity to regularly start the aforementioned volume snapshotting and compression job with a Kubernetes CronJob

Who we are

We are MIDL.dev, a staking-as-a-service company. We can help you validate your DOT, and develop custom cloud infrastructure solutions for your parachain project. Get in touch.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store