Cryptocurrencies have become an integral part of our existence. Many people use them for trading, investments, payments, remittances, passive income, and other purposes, but not many understand how the underlying technology of cryptocurrencies — the blockchain — functions. In this article, we will analyze the key component of any blockchain network — nodes, what role they perform, and what they are.
How Does Blockchain Work?
In fact, the blockchain is a distributed database organized in the form of a chain of blocks. Blockchain data is stored simultaneously on multiple nodes, which allows it to protect the network from unauthorized interference. All transactions occurring within the blockchain network are recorded and verified by nodes that add transactions to the block and the block to the blockchain. Since copies of transactions are stored on thousands of nodes worldwide, the network is decentralized and not subject to financial manipulation.
What Is a Node?
A node is any computer connected to a blockchain network. To connect a computer to the blockchain network, you need to install special software on it and download the database of a specific network, that is, synchronize the computer with the network. As members of the blockchain network, nodes exchange information about blocks and transactions.
Communication between nodes takes place via the P2P protocol. A P2P network is a decentralized network based on the equality of its participants. Any blockchain network is built based on the P2P protocol. Therefore, the more nodes there are in the network, the more decentralized and secure it is.
What Do Nodes Do?
From the point of view of the blockchain, a node is a basic unit. Some decentralized networks do not provide for the minting of new coins (there are no miners) or use alternative data protection methods. However, the presence of a node is a mandatory attribute of any cryptocurrency system. Depending on the particular blockchain, nodes perform the following functions:
- They check compliance with the rules (consensus);
- Exchange information (about transactions and the number of funds);
- Save a copy of the confirmed transfers;
- Detect invalid transactions;
- Protect the integrity of the peer-to-peer network;
- Create new blocks.
What Are the Types of Nodes?
Since the tasks performed by nodes in the cryptocurrency network are different, the nodes themselves are also different. They differ in size and functions in the blockchain they belong to. Sometimes in different articles, the same types of nodes are called differently. There is also information about particular cases of nodes specific to specific blockchain projects.
Each node is considered equal. However, some play a more critical role in network maintenance. For example, some nodes cannot store a full copy of the chain or verify transactions. And others operate outside their network.
If 100% of the current distributed registry database is stored on a device connected to the cryptocurrency network, then such a node is called full. The reliability of the entire system, its scalability, and the speed of transaction confirmation depends on the number of such elements. The more of them there are in the system, the more stable it is. The full node must be connected to the blockchain network 24/7/365; then, it is considered an active full node.
Theoretically, as long as at least one device retains a complete copy of the blockchain, the cryptocurrency network can be restored. Thanks to the many independent computers and servers in different countries, a distributed registry is maintained and constantly updated.
Information about the number of active full nodes is publicly available. Full nodes are a guarantee of security. Because for the blockchain network to collapse, all nodes must be destroyed.
The full node independently checks and decides on the compliance of new blocks or individual transactions with the rules of the network. If a full node detects an error, a violation of the rules when creating a block or a separate transaction, it will reject them, even if other nodes do not see violations. It is the full nodes that vote on making all decisions about the future of the blockchain network. If more than 51% disagree with the proposed change, it is ignored or sometimes may lead to a hard fork of the network.
The full node performs the following functions:
- controls the rules of transactions and verifies digital signatures;
- checks the created blocks for the absence of violations of consensus rules;
- adds new blocks to the blockchain.
Not all blockchain network users can deploy a full node on their computer. One of the reasons is the large size of the blockchain network. Since the chain stores information about all transactions and coins issued, its size increases over time.
If there is not enough space, you can use a pruned node. It is considered complete and participates in the protocol confirming the validity of transactions and voting.
The main feature of a pruned node is that its size is set by the user himself. For example, if you set the size limit on the hard disk to 5 GB, then the pruned node will store the headers of all network blocks and only the last blocks that fit into this hard disk space.
But to come to this, you first need to go all the way to synchronize the blockchain — download and check all the previous blocks from the beginning. When the volume of downloaded blocks reaches 5 GB, the oldest blocks will begin to be deleted, and as a result, only the headers will remain from them. Only the last (new) blocks that fit into the specified space will be stored intact.
Pruned nodes also participate in the control of transaction rules, but simultaneously, they are entirely dependent on full nodes.
When people use the term “full node” without clarifications, they mean a node that contains a complete copy of the blockchain (starting from the first genesis block) with all transactions carried out.
It is active 24/7 and is completely independent and self-sufficient. It is called archival. The only difference from the pruned one is the amount of space on the hard drive.
If we classify further, the archive nodes are divided into those that mine new coins and are deprived of this opportunity.
Mining nodes work in cryptocurrencies, where new blocks are created and confirmed according to the PoW consensus algorithm.
The main task of the mining node is to create new blocks for the blockchain network. The owners of mining nodes are called miners, and the process of creating new blocks is called mining.
The miner creates a new block from a group of confirmed transactions. For a group of transactions to turn into a ready-made block, the miner must calculate a random number. The miner who first picks up a random number creates a new ready-made block, writes it to the copy of the database, and sends it to the full nodes of the network for verification. After confirming the block’s accuracy, full nodes write it to their copies of the database, and the miner receives a reward from the network.
Staking nodes exist in cryptocurrencies that use the PoS algorithm or a combination of PoW and PoS algorithms to create new blocks.
Like any full node, the main task of the staking node, like any full node, is to ensure the network’s security. For its execution, the node checks and confirms transactions and new blocks. It also creates new blocks if the network is built only on the PoS algorithm.
Earning money with the help of such a node is called staking. Unlike mining, in staking, equipment performance takes a back seat. The number of coins owned by the staking node is crucial in determining the creator of a new block.
To run a staking node, users must install special software and synchronize it with the cryptocurrency blockchain. After that, deposit the coins of this cryptocurrency into the wallet and keep the node constantly (24/7) connected to the network. The amount of remuneration depends on the staked amount and the staking period.
The masternode is a full node operating in cryptocurrencies, where, along with the PoS and PoW consensus algorithms, the PoSe algorithm (Proof of Service) is also used. There are no cryptocurrencies that work only on masternodes. PoSe is an additional layer to another algorithm. For example, Dash cryptocurrency works on a combination of PoW and PoSe algorithms.
Masternodes do not add new blocks to the chain but only check them. They have unique management and regulation functions depending on the blockchain protocol in which they participate.
For the first time, the idea of masternodes was implemented in the Dash cryptocurrency (March 2014). There they have more powers than ordinary ones:
- Conducting instant transactions (InstantSend);
- Sending private transactions (PrivateSend);
- Assigning usernames to network users instead of cryptocurrency addresses.
Masternodes are based on collateral. It acts as a PoS protocol. Operators need to own a significant amount of cryptocurrency to run the masternode. In turn, holders receive an annual interest for their services.
Thus, it is guaranteed that the most important nodes will be financially stimulated. And as a result, stability and loyalty will increase. The main advantages of masternodes are:
- the right of the masternode owner to vote in making decisions concerning the entire cryptocurrency network;
- an easy way to earn money – you don’t need a powerful computer or an expensive ASIC miner for masternodes;
- the principles by which the masternode works and earnings from it can be compared with a deposit in a bank — you keep a certain amount in your account and receive interest (reward).
They are better known as light wallets or clients of Simplified Payment Verification (SPV). Lightweight nodes are the most compact type of cryptocurrency node operating in a blockchain environment. They are special applications that do not contain the entire version of the decentralized registry. Instead, they use block headers to confirm the validity of transactions. Therefore, lightweight nodes are not full-fledged elements of the blockchain and depend on full nodes.
This article considers the main types of nodes, their purpose, and their features. Running a node is one of the most popular passive income methods because, in this case, users are not only full members of the network but also have complete control over their funds.
Starting the node is reduced to installing the client on a PC with the appropriate technical characteristics and system settings. The profitability of the node directly depends on the exchange rate of cryptocurrencies and is quite challenging to predict.