My Experience Using Node Snapshots by Public Node

· Harshil Jani


Managing blockchain nodes isn’t easy. It feels like there’s always something that needs attention, and it’s about dealing with long sync times when you initialize any blockchain for the very first time. Syncing the initial block with the current block will keep everything up to date and will then start your blockchain node. Over the years, I’ve tried all sorts of tools to make this process smoother. Some have been helpful, but many ended up adding more complexity than I required.

A few days ago, while looking for something new, I stumbled upon a feature called Node Snapshots on Public Node, which is a part of the Allnodes platform. There’s always that small chance of finding something that genuinely helps. I wanted to see if Node Snapshots could be that tool, something that would actually make my work with setting up blockchain nodes a bit easier, without the usual headaches.

My Blockchain Node Setup #

Setting up a blockchain node is a process that requires a mix of patience and precision. When you initialize a blockchain for the first time, the task at hand is to sync the node with the entire history of the blockchain, from the very first block called the genesis block to the most recent one. This syncing process is crucial because it ensures that your node is fully up-to-date and is in sync with the rest of the network. But this is very time-consuming, especially when dealing with large blockchains that consist of thousands or even millions of blocks.

In my experience, the initial setup of a blockchain node can take days or sometimes even weeks, depending on the size of the blockchain and the speed and bandwidth of your internet connection. During this time, my system is often under heavy load as it continuously downloads and verifies blocks.

At times, it’s not just about waiting, there’s also a level of uncertainty involved. Is the sync going to be complete without any errors? Will I encounter unexpected issues that require troubleshooting? These are questions that often linger in the back of my mind during the setup process.

The ideal node setup, in my view, is one where the node can be up and running with minimal intervention and that should allow me to focus on other decision-making tasks rather than babysitting the sync process. This involves not just choosing the right hardware, but also selecting software solutions that are optimized for performance and reliability. I’ve learned that every step matters, from the initial configuration of the node to the ongoing maintenance and updates that keep it running smoothly.

There are various node sync methods and tools available. Most of them come with a range of costs, depending upon the features and performance they offer. I have been using multiple node snapshot providers in the past for different blockchain nodes. When I saw an X announcement by Allnodes about their new free Public Node service that offers Node Snapshots for multiple blockchains, I thought let’s give it a try. Medium-Image

Exploring the Node Snapshot service of Public Node #

Here you can find all the snapshots for any blockchain from Public Node: https://www.publicnode.com/snapshots Medium-Image

What I really appreciate is that in the ‘Networks’ column, you can find snapshots not only for mainnets but also for testnets. Next to this, there’s the ‘Client’ field, which shows the version of the blockchain software. For all the blockchain nodes I’m running, the snapshots have always been for the latest version, which is wonderful and important to avoid vulnerabilities later on. You can also see details like the snapshot type, size, and timestamp of when the snapshot was taken, as well as when the next one will be uploaded. They consistently keep these snapshots up-to-date, which is very good. It also shows the block height, which you can verify against the current block height of the chain

Setting up a node snapshot for running Avail Blockchain #

I was thinking of setting up a node for the Avail Blockchain and decided to do a proof of concept (PoC) using Node Snapshots from Public Node. To start, I will download the snapshot for the following specifications:

Go to the entry and click on the link. Medium-Image Medium-Image

After copying the link, paste the copied URL into your web browser, and it will start downloading a tar-compressed file. Medium-Image

Once the file is downloaded, It will be a tar.lz4 file, You can extract the tar file using the following command. Medium-Image

It will have achains/ directory inside it. For this blockchain particularly, we have avail_da_mainnet folder inside of chains and this is the actual snapshot of the avail blockchain up to 191134 blocks.

To follow the instructions to set up and run the Avail node, you can follow the documentation here

https://docs.availproject.org/docs/operate-a-node/run-a-full-node/full-node

I already have set up a binary for running the Avail node and I will first decompress the snapshot that we downloaded using Public Node, then move it into the blockchain_setup/ directory. We will dump the data directory for the Avail node into the same directory, and it will find the snapshot data and quickly spin up our mainnet. Medium-Image

If you observe, the node started syncing from block #204825 which was the block number after the snapshot data was captured. So all the initial blocks were synced up right using the snapshot.

Impact on my Workflow #

It has seriously improved my workflow in several ways. Trying out the Node Snapshots from Public Node was an eye-opener for me. The first thing I noticed was how much time it saved. Getting a Node Snapshot and deploying it was much faster than the years-long tradition of syncing from zero. With quicker setup times, I can efficiently toy with different DApps. This way, I am able to explore more innovations.

I also found that using Allnodes’ Node Snapshots put a lot less strain on my system compared to the usual method of continuous downloading and verification. This allows me to run multiple nodes at the same time without compromising system performance.

Even though it was my first time using this service, the fact that the snapshot was up-to-date made a big difference. I didn’t have to stress about any potential security issues from outdated data, which gave me peace of mind as I went through the process.

But what I appreciated most was how it took the pain out of node management. I didn’t need to keep an eye on the sync or troubleshoot any problems, it just worked. This makes the management of nodes easier to do while giving me time for other things involved with blockchain development.

Public Node is not the only provider offering node snapshots. Nevertheless, their free service, 100+ supported blockchains, and user-friendly interface make them a good choice for me.