Nano 101: Lazy Bootstrapping

An in-depth look at the upcoming feature

With the Boulton release on the horizon, the focus turns to one of the more anticipated features to hit the network in some time, lazy bootstrapping! Lazy bootstrapping improves the current bootstrapping process, or the mechanism used by nodes to bulk update their ledger. Let’s take a look at the current bootstrapping method and how it will be improved with the introduction of lazy bootstrapping.

The Current Bootstrapping Method

There are currently two types of networks for Nano, a real-time network where transactions occur and a bootstrapping network. Every five minutes, nodes on the Nano network check to see if they need to initiate bootstrapping in order to bulk update its ledger. When a node determines it needs to bootstrap, it begins by finding peers on the real-time network, remembers them, and connects to them on the bootstrapping network.

The bootstrapping node then picks a random peer and requests a list of frontiers before connecting to other nodes on the bootstrapping network and requesting account data for the frontier list it was given. This is how a node’s unchecked table, or list of blocks it does not know are confirmed, is populated.

The node searches for a block which references a block already in its ledger, before querying the real-time network to validate that the most recent send on that blocks account-chain has been confirmed, resulting in additional traffic on the network. Upon receiving confirmation, all previous blocks on the account-chain are inserted into the ledger. This process then repeats until the whole ledger is populated.

How Lazy Bootstrapping is Different

With lazy bootstrapping, the node instead monitors the real-time network and waits for blocks to be confirmed. Because each account-chain is a blockchain, when a block is confirmed, all of the previous blocks on its account-chain are also accepted by the network

Because a node accepts that the whole account-chain is then valid, every send block received by the chain is valid. Therefore, the node can trace the send block to its account-chain and confirm that every previous block on that account-chain is valid as well. The node then traces these blocks all the way down until it connects to our ledger and then inserts those transactions.

To fill out the remaining blocks in its ledger, a node will continue to use a process similar to the current method, although instead of every five minutes, it will run the bootstrapping check every hour.

Advantages of Lazy Bootstrapping

Because the bootstrapping network scales as more nodes are added to the network, by moving traffic off of the real-time network, lazy bootstrapping presents a more efficient method of adding blocks to a ledger in bulk. Upon implementation onto the network, there will be a reduction in voting, which in turn decreases the bandwidth and CPU usage of nodes.

Another feature introduced by lazy bootstrapping is support for pulling information about your account over the bootstrapping network. Nodes can request information about their accounts and retrieve a list of pending blocks, their hashes, and transaction amounts.