Blockchain is a digital ledger that permanently records financial transactions in an immutable way using cryptography and a distributed network. It has a number of uses, but the most important for businesses is the ability to create transparency into financial transactions without sacrificing privacy.
Most blockchains are not designed to address regulatory challenges around identity, compliance, confidentiality, and governance through principles built into the base layer of the chain rather than as external add-ons.
Polymesh is the first blockchain designed specifically for institutions that need regulated assets. It streamlines outdated processes and opens up new financial instruments by solving regulatory challenges around identity, compliance, confidentiality & governance through key principles built into this base layer of the chain rather than as external add-ons
In essence: Polymesh brings transparency to opaque markets while also ensuring privacy in sensitive transactions - all without sacrificing either element!
What is a Blockchain Snapshot?
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 validator node needs. They are fast, minimal and provide instant backups. In essence snapshots are pruned to contain just enough data to validate the chain. 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.
Snapshot services are critical for rapid recovery of PoS blockchain nodes. Without a reliable method for bootstrapping nodes, node operators have to wait a long while to participate in the network and validate transactions. RadiumBlock believes that the future of blockchain technology is one in which we all have access to a snapshot of the entire blockchain.
As a provider of enterprise-grade software and support for PoS blockchains like Polymesh, RadiumBlock has been working on snapshot storage to apply its enhanced delivery capabilities to customers. The RadiumBlock snapshot service is designed to provide a reliable method for bootstrapping Polymesh validators. We provide daily snapshots in RocksDB format 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 from several days to hours or minutes.
Snapshots for Polymesh 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. Snapshot storage is an area that RadiumBlock has focused on over the past several months. Snapshots are pruned to contain just enough data to validate the chain. The compressed RocksDb of the Polymesh snapshot is 2Gb and it is not an archive snapshot. Instead, it is pruned to contain the last one thousand blocks, making it much more efficient to download and validate.
How to Use Snapshots to Set Up Polymesh Nodes
Let us now walk through the steps of creating a Polymesh validator (operator) node from RadiumBlock snapshots.
To begin, install the Polymesh program.
You can obtain the binary from https://github.com/PolymathNetwork/Polymesh/releases or use the Docker image they provide.
We will be using RocksDb and Polymesh binary to explain the steps –
At the outset, create a user named polymesh and download the binary to the home folder /home/polymesh.
- Create a service file for Polymesh:
ExecStart=/home/polymesh/polymesh --chain mainnet --wasm-execution compiled --unsafe-pruning --pruning 1000 --operator --name MyPolymeshNode --db-cache 4096
Note: Ensure that the binary is renamed as polymesh. Change the node name in the service file to the one you wish to use. You can view more information about all parameters at the Polymesh github operator doc
- Enable and start the service.
systemctl daemon-reload && systemctl enable polymesh.service
systemctl start polymesh.service
This will create the required folder structure in
- Stop the service
systemctl stop polymesh.service
- Remove the db folder:
rm -rf /home/polymesh/.local/share/polymesh/chains/mainnet/db
- Now, navigate to the link below and follow the instructions to download and extract the db snapshot onto your node-
- Once that is completed, you can restart your node:
systemctl start polymesh.service
- After you launch the polymesh service, the node will continue syncing, which should take 5-10 minutes. In the system log, it will then be marked as fully synced (Idle).