Types of nodes in Blockchain
By: Verified On Chain
Tags: Nodes In Blockchain, Full Nodes, Fast Sync Nodes, Lightweight Nodes

We wrote about Blockchain’s peer-to-peer model and how Blockchain works earlier. Let’s now talk about nodes in Blockchain. Nodes are the most important part of the Blockchain, as they are entrusted with maintaining the data of the Blockchain.

Nodes are the systems or computers that connect to a Blockchain network. A node can really be any system that has storage capacity and internet connectivity.

There are several types of nodes in a Blockchain.

1) Full node

Technically, a full node is a type of node which follows all rules of the consensus algorithm and downloads the entire Blockchain. Every block in the Blockchain is verified and then stored.

Here are some of the checks that a full node performs:

o Checks that only the permitted amount of Bitcoins are produced when each block is mined

o Validates sender’s signatures in each transaction: While synchronizing blocks a full nodes checks the digital signature in each transaction. The sender signs each transaction with his private key. The full node checks the signature to authenticate that the real ‘owner’ of the address is in fact initiating the transaction.

o Checks for double-spending: Double spending is an issue where the same asset is spent twice.

There are several other checks and responsibilities of a full node. It is not necessary for a full node to be a miner. You can just store blocks relayed by the miners. You won’t get any rewards for running a full node.

Why should you run a full node?

Here are some reasons why:

o Security: Running a full node is the most secure way of being on Blockchain. When you run a full node, you don’t have to depend on someone else for the correctness of your data. In a nutshell, it is the only way you can use Blockchain in a trustless manner.

o Privacy: All apps for lightweight nodes leak information as these nodes have to query a third party server. For example, Electrum will know which addresses does a user has.

o Full nodes reduce the network latency: Lightweight nodes connect to full nodes for block synchronization. Lightweight nodes are dependent on full nodes for the correctness of Blockchain. If there are more number of full nodes then there will be more copies of the Blockchain, resulting in more options for lightweight nodes and other full nodes to connect to. This way, the load on a full node will be lesser and the network won’t clog.

2) Lightweight node

Lightweight nodes do not download the complete Blockchain, just the block headers. In Bitcoin Blockchain, it is called Simplified Payment Verification nodes (SPV nodes). Lightweight nodes do not verify and store all transactions. Thus, the size of lightweight nodes is much lesser than the size of full nodes. However, running lightweight nodes comes at a cost. Lightweight nodes do not replicate the complete consensus algorithm. Thus, if a miner mines a block which contains an erroneous transaction, a lightweight node will not be able to find out. Lightweight nodes are fully dependent on full nodes and cannot exist without a full node. In Bitcoin Blockchain, a lightweight node needs to query a full node even to get to know its own balance.

Why should you run a lightweight node?

Requires less space: A lightweight node requires lesser space than the full node. The size of Bitcoin is over 175 GB and that of Ethereum is over 800GB. That’s how much space running a full node will cost. On the other hand, a lightweight node size is around 42GB for Bitcoin.

3) Fast-sync node

Ethereum Blockchain has a third option too- that of fast-sync nodes. These nodes download the block header of all the blocks in the Blockchain. These nodes also download and store the transaction receipt for every transaction in the Blockchain ledger. To ensure consistency of data being downloaded and to not have total blind faith in the full nodes, fast-sync nodes, verify the transactions for at least a few blocks.

While downloading the Blockchain ledger, one can simply use the fast-sync option. This enables these nodes to handle historical queries too, something lightweight nodes are not capable of. Essentially, a fast-sync node verifies only one block among a set of k-blocks. This makes security a much lesser concern for fast-sync nodes than lightweight nodes. One can predict the validity of the chain with a negligible probability of error by verifying only every K-th header instead of each one. This is why fast-sync nodes need to download and verify completely only a few blocks, not all blocks. If it is so secure, why even bother running a full node? That’s because fast-sync nodes do have some weaknesses, eg., susceptibility to the Sybil Attack.

Performance of fast-sync nodes:

Case 1: If 357677 blocks, 42.4K states of Frontier testnet is to be synced then a normal sync by full node will take around 12: 21 mins and it will have to download 1.6 GB of data. On the other hand, if fast-sync is used then it would take only 2.29 mins and will have to download only 235.2 MB of data.

Case 2: if 837869 blocks, 10.2M states of Olympic testnet is to be synced then a normal sync by full node will take around 4:07:55 hours and it will have to download 21 GB of data. On the other hand, if fast-sync is used then it would take only 31:32 mins and will have to download only 3.8 GB of data.