Whenever you send a crypto transaction, hundreds of nodes of the blockchain start working immediately to process it. In Bitcoin, a full node initiates the payment, a mining node puts it into a block, and then thousands of full nodes must reach consensus to validate it.
This article is a blockchain node 101. We will see what nodes there are and how they work, what types of nodes exist, what they serve for, and their pros & cons. At the end of the piece, we will explain why you may need a blockchain node, and how you can access it today.
What are blockchain nodes?
A node is a computing device that is a full-fledged participant of the cryptocurrency’s network. This derives from the definition of blockchain – a distributed database. Nodes are the keepers of this database – each full node of any given cryptocurrency stores the full copy of a distributed ledger along with the others.
Transactions that crypto users send to each other don’t get simply inscribed into this ledger right away – firstly, the blockchain nodes need to collectively approve these transactions by reaching a consensus. Whenever a mining node proposes a block to the network, nodes vote on its validity, and if at least 51% agree on it, transactions are added to the blockchain on all nodes simultaneously.
What does a node do?
We will mostly consider Bitcoin nodes, but nodes’ functions are similar across various blockchains.
- Proposing blocks. As already discussed, transactions have to be put into a block and all nodes have to agree that it’s valid. In the Bitcoin network, this job is done by miners – they solve a complex mathematical problem and when one of them gets the right decision, it presents the solution to the others.
- Transaction validation. When a miner introduces its block to other nodes, it has to get their approval before adding it to databases stored on these nodes. In Bitcoin, nodes vote on the validity of blocks proposed by miners. If a block is marked as valid by most nodes, it gets added to the blockchain.
- Voting on improvement proposals. Bitcoin is governed by a distributed community of developers who make collective decisions on its future. Nodes as network participants can vote on these proposals and either agree or reject them.
Purpose of blockchain nodes
The purpose of work done by nodes derives from their functions described in the previous paragraph.
By proposing a variant of a block, a miner proves that it has done the complex computations correctly. Why is that necessary? Bitcoin network members have a common interest that only valid transactions get into the distributed database (so that a random individual doesn’t say they have received a million Bitcoins). The necessity for solving a difficult math problem guarantees that the miner has passed through tough competition and has invested a lot of money. To incentivize miners, the protocol rewards them with 6.25 BTC for each mined block.
The fact that miners’ work has to be validated by the whole network of nodes is the essence of decentralization. When thousands of independent actors confirm the validity of a block, everyone can rest assured that fake transactions haven’t been included there. The more validating nodes there are, the more secure the network is.
The consensus in a decentralized network
We’ve described how blocks are proposed, validated, and added to the blockchain. In different cryptocurrencies, the exact mechanisms of how this happens are different. Bitcoin runs on the Proof of Work consensus algorithm, meaning that a miner needs to solve the hashing task and present the proof of their work to the network of nodes for validation.
Over the years, it has become evident that PoW is a highly secure solution, but it’s cumbersome and doesn’t allow for high scalability and throughput. This is how Proof of Stake was created. In PoS, there is no competition in terms of computing power – the right to propose blocks is assigned based on the node’s stake size, its reputation, and the time during which the coins were locked in the network. There are many variations of the Proof of Stake consensus, and there are many algorithms that are completely different from PoW and PoS.
How do nodes work?
A node operates based on what features it has. Let’s consider a Bitcoin full node. Here are three modes in which it can work:
- The node can simply validate transactions proposed by miners. It receives a block hash found by the miner (their proof of work) and judges whether it meets the required criteria. If it does, the node votes for the validity of such a block.
- The node can do blockchain research. This includes collecting the network stats and sending them to block explorers – services that show what blocks have been on the network recently and earlier, what transactions are being approved at the moment, what the wallet balances are, etc.
- The full node can send transactions directly into the network without third parties such as wallets (moreover, the wallets use nodes to broadcast users’ payments themselves). When the “send” button is clicked, a yet-unvalidated transaction gets into a mempool – a waiting room for Bitcoin payments where they wait until a miner picks them up and adds them into a block.
Types of blockchain nodes
For readability purposes, we will consider Bitcoin nodes that work on the Proof of Work consensus; at the end of the list, we will also explore nodes from other cryptocurrencies.
The main type of a Bitcoin node is a full node – a computer that keeps a full copy of the Bitcoin blockchain database and updates it in real-time. This node doesn’t necessarily mine, but it participates in validating blocks proposed by miners. The block can’t be added to the blockchain before the consensus on its validity is reached by thousands of nodes (such a great number makes Bitcoin one of the most secure networks).
Full nodes also participate in voting on Bitcoin Improvement Proposals – at least 51% of network members have to approve one before it goes live. This is the reason why people trust Bitcoin – it’s nearly impossible to control so many nodes, and adding a wrong transaction or confirming a malicious network update is extremely unlikely.
Pros of a full node
- Participates in securing the network
- Can send a transaction without a third party
- Takes much disk space – almost 400 GB at the time of writing.
A light node doesn’t contain a full copy of the blockchain, that’s why it uploads much faster and takes very little disk space. The light node only includes block headers – a hash that contains compressed data from the block. Nodes of this type depend on full nodes and use the Simplified Payment Verification technology.
Many Bitcoin wallets operate via light nodes. If you use a full node to send a transaction, the process may be cumbersome – the wallet will sync with the blockchain longer. Also, it’s harder to create a multi-currency wallet with a full node – it will have to operate with dozens of full nodes which is an extremely difficult task. Light nodes facilitate this.
- It’s lightweight – takes little disk space
- Allows for verifying and sending transactions
- Doesn’t offer all features of a full node
Mining nodes pick transactions from a mempool, put them into blocks, and then hash them. In the Bitcoin blockchain, a hash has to have a few zeros in the beginning to be approved by the network. The chance to randomly find such a number is very low, so you need a lot of computing power to try billions of combinations.
To get a proper hash that serves as proof of work, miners need to operate a full node or receive data from other nodes – this is necessary to access the mempool and find transactions for validation.
- Allows you to mine and receive rewards
- Takes much disk space
- Consumes much electricity (which incurs great costs) and resources for maintenance (fans, etc.)
A pruned node is a full node that contains only recent transactions. Such a node downloads a full copy of blockchain first and then “prunes” old blocks – it starts from the beginning and goes before the node size fits into a set limit. For instance, it can be 250MB, and a pruned node will only keep transactions from recent weeks.
- Saves disk space
- Offers some features that the light node doesn’t
- Not a complete full node and has limitations
Lightning nodes can’t be called conventional nodes – they are not network members that keep a copy of the blockchain or mine blocks. Lightning nodes power the Lightning Network – a scaling solution for Bitcoin that allows making BTC transactions off-chain instantly and at very low fees.
The problem with Bitcoin is that it validates transactions very slowly, and the network’s throughput is limited while the demand for BTC payments is high. This is what Lightning Network was built for – a protocol that creates a payment gateway between two Bitcoin addresses and allows them to transact bypassing the usual validation procedure.
A Lightning node establishes a connection between two users where they can instantly send money to each other. While the connection is open, these payments aren’t added to the blockchain (and hence are not considered validated). When the users decide that they are ready to close the gateway, all transactions made through it are processed as one and mined. Such payments cost less than a penny.
- Instant super cheap transactions
- Transactions cannot be considered confirmed before they are mined like any other Bitcoin transfer.
Now that we’ve considered all types of nodes in the Bitcoin network, let’s take a look at nodes that operate in cryptocurrencies with other consensus mechanisms. Examples of such algorithms are Proof of Authority (like in VeChain) and Proof of Staked Authority (Binance Smart Chain). In these blockchains, transactions are validated by a small number of authority nodes rather than a full network of nodes.
In Bitcoin, any full node can participate in transaction validation, while an authority node must gain a certain reputation before it starts confirming blocks. Individuals running authority nodes have an interest in maintaining their reputation to uphold transactions. Authority nodes are handpicked and are usually run by companies that actively engage with the given blockchain.
The number of authority nodes that are active at a time is defined by developers or the community through voting. Cryptocurrencies that run on PoA or PoSA consensus are much more centralized but efficient – it’s easier to reach a consensus of 21 nodes rather than of 10,000.
- Easy to govern
- Less decentralized and hence more vulnerable to attacks and dishonest behavior
Another type of node that is not inherent to Bitcoin is a masternode. One of the cryptocurrencies that operate on masternodes is Dash. The coin was developed in 2014 as a version of Bitcoin that is better for daily payments. Back then, it was already evident that BTC doesn’t work well for everyday use: the cryptocurrency requires consensus of all nodes in the network (of which there are thousands) that take hundreds of GB of disk space and are hard to manage.
In Dash, there are masternodes instead of full nodes. They can’t add blocks to the blockchain but keep its full copy and validate transactions, have some special managing, regulatory, and governance roles, and can send private transactions. To install a Dash masternode, you’d have to pay 1,000 DASH ($95,000 at the time of writing), but this investment pays off – masternodes are rewarded for their work.
- Wide range of features
- Need substantial investment
What happens to the node after a fork?
If it’s a soft fork, the node can keep going as usual, but it will have to update to work with maximum effect. For instance, a Bitcoin node that hasn’t installed the SegWit update will still be able to transact, but the payments will be more expensive.
In the case of a hard fork, it works differently. If a coin gets split in two (like when Bitcoin forked to Bitcoin and Bitcoin Cash), the node will have to choose which protocol it will continue working with. If it’s a hard fork representing one of Ethereum upgrades, the node has to fully update before it can continue the operation.
How to set up and run nodes?
If you build on any blockchain, you need to access its node. It will help you operate in the network, test and deploy your app. However, setting up a node is a hard task – there are many hardware and software requirements, and tech skills to maintain the node are necessary. NOWNodes does this job for you. We allow you to access 48+ nodes that run 24/7 so that you can develop and run your service. In our docs, you can find a library of sample requests for different networks. Get a free API key and start using this infrastructure today – leave your email on our main page or contact us directly. Simply paste the API key into the query, and you’re good to go! 20,000 requests per day are yours for free.
A blockchain node is a computing device that keeps a full or a shortened version of a blockchain and participates in validating transactions. In the Bitcoin network, there are mining nodes that make up blocks and propose them to the network for confirmation, full nodes that validate blocks, pruned nodes that contain only the latest transactions, and light nodes that include only block headers and serve for facilitated interaction with full nodes.
There are other types of nodes in cryptocurrencies that run on different consensus algorithms. In Proof of Authority coins, there are authority nodes that get the right to validate blocks based on their reputation. In Dash, there are masternodes – full nodes with enriched functionality that reward their operators.Accessing any node is easy. Get a free API key on NOWNodes, see our library of request samples, and start using a blockchain node right away!