Blockchain Nodes

Sean
Apla
Published in
6 min readDec 24, 2018

Without the humble node, networks would not exist. If networks did not exist, blockchains would not exist. Let us pay our respects to the humble nodes on a blockchain network by understanding what they are, the various types and their purpose, and how to set one up.

What is a node?

In a computer network, each computer that forms part of the network is referred to as a node. These nodes come in different flavours and perform different tasks. Depending on the requirements of the network, nodes can be small Raspberry Pi devices, regular computers, or large powerful servers.

To provide stability to a blockchain network, nodes should be consistently connected to the network with a fast and stable internet connection. These types of nodes generally form the backbone of the network. For professional node operators, redundancy is often incorporated where two internet cables from two different providers are used and Uninterruptible Power Supplies (UPS) and generators are used in case of power outages.

Different types of nodes?

Back when Bitcoin first started, there was just one type of node storing the entire blockchain. Nowadays, nodes come in all different flavours.

Full node

Everything started out with what we now refer to as a full node. Full nodes stores every single transaction since the genesis block and help by verifying blocks that are broadcasted onto the network. That is, they ensure that the transactions contained in blocks (and the blocks themselves) follow the rules defined in the protocol of the blockchain specification. In Bitcoin, for example, the nodes check about 20 criteria such as the size is less than MAX_BLOCK_SIZE, ensure that the output value is within the legal money range and rejects the transaction if the output is greater than the input (preventing someone from spending more than they had).

Over time though, people questioned the need for this. Why does every transaction since the beginning of the genesis block need to be stored?

Pruned nodes

This is where the concept of pruning came about where in Bitcoin, for instance, a parameter called a prune can be set to at least a minimum of 550 which represents 550Mb. As soon as the blockchain size reaches this limit, older blocks are deleted. 550Mb was chosen so that Bitcoin will be able to maintain at least 288 blocks on disk (two days-worth of blocks at 10 minutes per block).

Lightweight nodes

Light or lightweight nodes do not download the entire blockchain. Instead, they download just the block headers to validate the authenticity of the transactions. Because of this reason, light nodes are easy to maintain and run. Lightweight nodes use a method called Simрlifiеd Pауmеnt Vеrifiсаtiоn (SPV) to verify that a transaction is included in the Bitcoin blockchain, without downloading the entire blockchain. The SPV client only needs to download the block headers, which are much smaller than the full blocks. In addition to this, lightweight nodes are actually served by full nodes. They are effectively dependent on the full nodes to function.

Lightweight wallets do not validate the rules of bitcoin. If somebody pays a lightweight wallet user with fake or invalid bitcoins, the wallet will happily accept them and the user will be left out of pocket.

Mining node

Mining nodes are full nodes that store the entire blockchain but in addition to that, they validate each transaction, create a candidate block and then in the case of Bitcoin or Ethereum, via the Proof of Work consensus algorithm, use computing power in a race to find a solution to a meaningless mathematical puzzle. The winner of the puzzle gets their version of the block accepted as the next block in the blockchain and receives a reward which at the time of writing is 12.5 BTC for the Bitcoin blockchain.

Masternode

Here is where it can get a bit confusing. Just when you thought you were getting the hang of things, the concept of masternode appears. Masternodes are actually full nodes with a twist. Masternode owners need to purchase the coin of the blockchain network and stake or “lock” them into the network. This is actually done by sending a certain amount to a wallet. These masternodes then receive rewards in the form of further coins as income. The concept of masternodes is relevant to blockchains such as Dash (formerly “Darkcoin”), PVIX, Zcoin, and Colossus.

The purpose of nodes

The purpose of nodes is to preserve and maintain the integrity of the blockchain network for a particular cryptocurrency. The more nodes a network has, the more secure it is because it will be much harder to take down or attack thousands of nodes distributed all over the world than five nodes located in one area.

Full nodes maintaining the entire blockchain history provide redundancy as well because the same information is stored at multiple locations. This is similar to what large companies such as Amazon and Google do with their data as well. The difference of course being that Amazon and Google have access to your data where in the decentralised blockchain world you control your own data.

Permissioned nodes

Special mention should be made of nodes in a permissioned network where coins are not required as rewards because the network is controlled and managed by a consortium of participants so no public incentive structure is required. For instance in Hyperledger there is no native coin. In Quorum, there is a concept of a sealer (synonymous to a miner) and these sealers are predetermined in the network to verify and validate transactions.

Setting up a node

Setting up a node in a blockchain network use to be very difficult in the early days because firstly: the technology was very new so not a lot of instructions were available and if they were, it would be very complex. Secondly: the tools and interfaces where immature mostly relying on command lines and sometimes having to build the code from source.

It is definitely a lot easier nowadays where setting up a node usually requires downloading a client and running it. This would allow a node participant in a network at the simplest level: verifying transactions.

Setting up nodes on the Apla Blockchain: video tutorial

To be a miner, specialised hardware is required such as a dedicated mining computer, as is the case with Bitcoin, or Graphical Processor Units (GPUs) for the case of other coins. The mining software is usually readily available online.

Setting up a Masternode requires a bit more technical skill as knowledge of acquisition, transfer and management of coins is required. Some blockchains provide client software for running on lightweight devices such as Raspberry Pi’s. Ethereum is one such example where there are docker images and a Raspberry Pi specific image that can be used.

Summary

Nodes form the backbone of a blockchain network where users contribute computing resources with the aim of helping to advance the development of a decentralised web. Instead of having the information stored in centralised servers, information is stored in a distributed and decentralised manner where you, the user, have complete control. This is fundamentally achieved through this network of nodes.

Different types of nodes were covered in this article: full nodes, light nodes, miner nodes and even masternodes. Setting up a node to contribute to a blockchain network used to be hard but now it is as easy as downloading a client and running it on a spare computer. Setting up a miner node is a completely different story though.

With this new found knowledge, anyone can go and decide which blockchain network to support and what kind of node to be. Happy noding!

Sean is a blockchain trainer, researcher and author and spends his free time building proof of concepts such as Ubering Energy on the blockchain or placing his land title on the blockchain. Sean also contributes his time as an organiser of the Wellington Blockchain meetup, organizer of the Wellington Smart Contract meetup, Blockchain Association of NZ committee member and ISO/TC307 Blockchain & DLT NZ committee member.

Blockchain Business Review from Apla provides high-quality educational material from the world of blockchain to inform the business community of the competitive advantage that can be gained by integrating distributed ledger data storage within organizations. Our mission is to promote knowledge about blockchain and its uses in both the private and public sector and demonstrate the value of blockchain integration.

--

--