About Polkashots

What is this ?

polkadot and kusama are proof-of-stake blockchain protocols.

This website helps people operating polkadot and kusama nodes to synchronize new nodes, so they are operational faster.

This project was sponsored by a grant from the Web 3 Foundation and is currently funded by the Polkadot and Kusama councils.

How to use

When starting a polkadot node for the first time, you must wait for it to sync. The process can take hours or days. Alternatively, if you want a fully synced node faster, you may import a fully synced database.

We provide snapshots of pre-synced Polkadot and Kusama databases updated regularly - twice a day on average.

They are compressed using the lz4 compression algorithm.

In order to fully automate your recovery mechanism, we provide permalinks: URLs that never change and reliably point to a recent snapshot.

In the instructions below, we assume that the user is polkadot and the home directory is /home/polkadot.

To download a recent snapshot of polkadot database, simply do:

wget https://dot.polkashots.io/snapshot

This link redirects, so if using curl, make sure to pass the -L parameter to follow http redirects.

You must the uncompress this snapshot with the lz4 utility. As polkadot user, run:

lz4 -c -d <file> | tar -x -C /home/polkadot/.local/share/polkadot/chains/polkadot

This will create a folder /home/polkadot/.local/share/polkadot/chains/polkadot/paritydb.

For Kusama, decompress command is:

lz4 -c -d <file> | tar -x -C /home/polkadot/.local/share/polkadot/chains/ksmcc3

Video instructions

These intstructional videos explain how to restore from a snapshot:

Database formats

Like any Substrate chain, Polkadot supports two database backends:

  • RocksDb is the default option,
  • ParityDb is more efficient but also more experimental.

We provide Polkadot and Kusama snapshots in both RocksDb and ParityDb formats.

Pruning

These snapshots are not archive snapshots. They only contain the most recent 1000 blocks and associated data to validate future blocks. This is sufficient to run a validator node.

Substrate has an export-blocks and import-blocks option, but these snapshots do not make use of it. The import-blocks function verifies every block, which is as slow as an initial sync. Instead, we provide raw database backend files because setup is faster than with the block import function.

How does it work ?

The snapshot generation engine is deployed on Google Kubernetes Engine.

All source code is open source so anyone can deploy a separate snapshot generator setup in the cloud.

Brought to you by MIDL.dev

We are MIDL.dev, a blockchain infrastructure company.

We maintain a suite of open-source software projects to deploy secure bakers and nodes.

Contact us if you need help with:

  • becoming a validator
  • deploying a polkadot parachain in the cloud
  • generating snapshots for your parachain

Disclaimers

Users are solely responsible for any risks associated with usage of the polkadot network. Users should do their own research to determine if polkadot is the appropriate platform for their needs and should apply judgement and care in their network interactions.

Unless required by applicable law or agreed to in writing, MIDL.dev provides a service on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using our services.