What is a Node in Blockchain & How Does it Work?
![what is a node](https://cdn.sanity.io/images/zu5719jl/production/c5584899dbe3b1faaf92891703cbeaec78b4939a-4602x3068.jpg?rect=0,238,4602,2592&w=728&h=410&fm=webp)
crypto basics
Blockchains are often referred to as “decentralized immutable ledgers,” but what really makes them tick? And what, other than the blocks themselves, makes up a blockchain? To answer these basic and yet very pressing questions, we need to ask the question: what is a node?
That’s a lot of technical words, but what lies beneath is actually quite simple. It’s important, too, if you want an idea of where the financial infrastructure of the world is going.
So let’s make sense of it all, starting with what a blockchain is and why it needs nodes.
What is a Blockchain?
A blockchain can be described as a database or ledger that is shared by multiple participants on a network. When a network user transacts on it, this transaction is recorded, stored, and encrypted into a block.
These blocks contain many such transactions and a cryptographic hash of the previous block’s contents. Thus, a block points precisely to its predecessor. Suppose you try to change one of the historical transactions in a block; the hash of the entire block changes. This makes a blockchain immutable.
The thing is, the blockchain doesn’t simply exist in the ether. It has to be stored and maintained somewhere, which is where nodes come in.
Why do Blockchains Need Nodes?
A node can simply be defined as a computer that operates the software of a blockchain. However, it may be more useful to pair both the hardware and the stakeholder who operates it, often known as the node operator.
These nodes are responsible for storing and validating the transaction data that makes up the blockchain. This is vital since they maintain a record of the blockchain’s entire history.
Imagine a situation where there was only one copy of the blockchain stored on a single computer. This node could then alter the blockchain’s history at their whim since there isn’t any other copy of the chain that can be produced in order to contest their claims.
This sounds an awful lot like a bank, doesn’t it?
So, to avoid becoming like the institutions they were created to replace, blockchains rely on having as large and as distributed a network of nodes as possible. The more nodes out there, the more different voices that have to agree on the correct record of transactions, and therefore the greater the security and resistance to manipulation.
![what is a node](https://cdn.sanity.io/images/zu5719jl/production/40e6e0c6d4c04542dfb5488262a4c6d6941e3774-512x348.png?fm=webp)
Ethereum, one of the most decentralized blockchains in the industry, has over 11,000 nodes that store and validate a copy of the blockchain. This level of decentralization makes it extremely secure, and a would-be attacker has many nodes to compromise if they want to alter the blockchain.
How do Blockchain Nodes Work?
Blockchain nodes store a copy of the entire ledger and update it in sync with all others when each block is produced and validated. This is generally accomplished by running the blockchain’s software and devoting a significant amount of hard drive space toward data storage.
Generally, blockchains have a technology stack that consists of five layers: hardware, data, network, consensus, and application layers. Nodes primarily come into play at the hardware layer, first by downloading and storing a copy of the blockchain, then by participating in verifying data signatures and validating new block transactions via mining or staking.
On blockchains like Ethereum that are smart contract capable, nodes record and transmit smart contract data along with transaction data. In Ethereum’s case, the Ethereum Virtual Machine reads the “bytecode” data and updates the ledger.
What is a Consensus Mechanism?
The validation of transactions is where consensus comes in. Not all blockchain nodes have to play a part in this, but it’s often a key part of their role and duties.
Blockchains are decentralized, and each individual node stores a copy of the ledger. A significant part of the recipe is the fact that all (or most) of these individual nodes get together and agree on what the right transactions and exact state of the network are.
This agreement and the means by which it’s accomplished are called the blockchain’s consensus mechanism. The two best-known consensus mechanisms are proof of work and proof of stake.
Proof of Work
Proof of work is the OG and was part of Bitcoin as well as practically every other blockchain launched in the first six or so years since Bitcoin’s release. It poses cryptographic puzzles that nodes called miners try to solve. These puzzles are hard to solve but easy to verify, so once a miner solves one, all of the others can check their work quickly.
This agreement among all nodes on the veracity of the winning miner’s solution represents consensus across the network. PoW mining is also incentivized, with the miner who solves the puzzle being rewarded with a block reward that can be very lucrative.
Proof of Stake
Proof of stake is a newer consensus model used by most modern blockchains but also adopted by Ethereum. It gets rid of mining and its inherent hardware requirement, instead charging nodes (or rather, their operators) with buying a certain amount of the blockchain’s coin.
These coins are then bonded to the protocol via smart contracts, and nodes (called validators) that bond more are given a greater chance of producing a block and winning the block reward.
Types of Blockchain Nodes
As mentioned, not all nodes have to actively take part in mining. So, what are the different types of nodes found in common blockchain architectures? Let’s dig in.
#1. Full Nodes
The main job of a full node is to maintain a complete copy of the blockchain ledger. Therefore, they have the data corresponding to every transaction ever made on the network and can verify its entire history. To store so much data, they require a considerable amount of storage space.
#2. Light Nodes
These nodes don’t download the entire copy of the blockchain but instead, a small portion of it called the “block header.” This allows them to aid in consensus, but they need to communicate with full nodes in order to verify their transactions.
These nodes are suitable for almost any crypto user since they don’t require much technical knowledge or storage space and can work even on mobile devices.
#3. Miner/Validator Nodes
These nodes are specifically responsible for verifying transactions and adding new blocks to the blockchain. Miners do this by directing their hardware at hashing cryptographic problems with significant difficulty. At the same time, validators take turns producing a block depending on how many coins they have staked.
Benefits of Nodes
Nodes play a major role in maintaining the security of every blockchain network. They validate transactions and blocks independently, making it extremely difficult for a single bad actor to compromise the network. When a node detects a discrepancy in a block or transaction, it flags the problem immediately.
Different blockchain architectures also introduce different types of nodes from the main trio introduced above. Bitcoin, for instance, also has archive nodes that record not only the full history of transactions but also the previous states of the network.
It’s possible to include archival nodes as full nodes and define another type of full node called a “pruned full node.” These can have a size limit and store the most recent blocks up to that size before deleting the old ones and storing only their headers and chain placement.
Other consensus mechanisms can also add node types. Authority nodes, for example, are used in proof of authority systems. These are often private blockchains that vet and empower certain nodes (especially their operators) to perform the tasks of block production and validation.
What is a Masternode?
Masternodes are used in some blockchain architectures and tend to be more powerful than other nodes on the system. While also validating, storing, and broadcasting transactions, they may also be responsible for events like voting, protocol execution, and rule enforcement on the blockchain.
Masternodes need to be available all the time and tend to have much more powerful hardware, especially RAM, than normal nodes. Given the stricter requirements of masternodes and their importance to the systems they’re found in, they also tend to receive significant compensation.
These nodes are similar to proof of stake validators in that they also tend to require a collateral deposit to run. On the Dash blockchain, for example, 1000 DASH is required as collateral from masternode operators.
Who Can Run a Node?
Who can run a blockchain node depends very much on the specifics of the blockchain in question. The only real blanket answer possible is that anyone can run a light node on a public blockchain—the reason for this being that your crypto wallet generally counts as a light node.
From then on, the main determining factor is whether the blockchain is permissionless. The best-known and truly decentralized blockchains are permissionless, meaning that you don’t have to ask anyone if you can run a node—you can just do it.
That doesn’t mean that there aren’t restrictions, though. If you want to run an Ethereum validator node, you must stake a minimum of 32 ETH to the protocol. As mentioned previously, a Dash masternode needs 1000 DASH. Polkadot nominator node? 300 or so DOT.
Private blockchains, or at least privately controlled ones, are tougher to crack. For example, becoming a validator or masternode on BNB Chain or VeChain requires you to go through the respective organizations and get vetted by them. And on top of that, you’ll need to stake a significant amount of BNB or VET.
How to Run a Blockchain Node
However, if you do decide that running a node is for you, we’ve got you covered. Let’s take a look at the general steps you need to take to run a blockchain node.
#1. Decide on a Blockchain
Picking out which blockchain you want to run a node on will dictate your next steps. Choose a realistic option—if you don’t want to invest much capital, there’s no point in becoming an Ethereum validator or setting up a Bitcoin mining farm. You can run a full node on both quite easily—there’s just no compensation for it.
#2. Investigate Requirements & Set Up Hardware
Once you’ve decided on a network, you’ll know what sort of hardware you’ll need to run a node. Some blockchains, such as Cardano, are very friendly to the average user. The Daedalus wallet, which can run on most PCs, counts as a full node, and you can even run a node off a Raspberry Pi.
Not every blockchain is quite as light, so you’ll have to check out the documentation of the blockchain you’re interested in for specifics. There’s also the possibility of using a cloud service provider rather than your own hardware. It’s a cheaper option, but do you really want your favorite blockchain to be dependent on the likes of Amazon’s AWS?
#3. Download and Run Node Software
After that, it’s just a matter of downloading the right client software. You may have heard of Bitcoin Core—that’s the most popular client for Bitcoin full node operators. Again, each blockchain will have its own software.
Remember that full nodes should be kept online as much as possible. Even though 24/7 running time is not a requirement, it could take ages to sync back up if you’ve been offline for a while.
Risks of Running a Blockchain Node
Generally, running a full node on a blockchain doesn’t carry too many risks. However, there are situations when the chain itself, including your node, may come under attack. These include:
- DDoS attacks. Short for distributed denial of service attacks, these are attempts to overload a node with traffic. By taking you offline, an attacker may attempt to compromise other nodes and gain control of the network. Sheer decentralization is a good thing since attackers will struggle to DDoS thousands of nodes at the same time.
- Malware attacks. If you’re not careful, you may get infected with malware. This is a very common way to try and compromise even light nodes or wallets to steal their funds.
Key Takeaways
A node can be regarded as critical infrastructure for any blockchain. Just as it’s impossible to have the Internet without servers and web hosts, you can’t have a blockchain without the nodes that store and update the ledger of transactions.
Miners and validators are also nodes, so it’s possible to earn an income by running a node. However, a full node doesn’t mean that it’s a miner. Rather, a full node stores an entire copy of the blockchain.
There are many different types of full nodes, and whether you can run one yourself depends on the blockchain itself. Most top blockchains, such as Bitcoin and Ethereum, are decentralized and permissionless, and by running a node, you’re contributing to the greater security and health of the blockchain.
Blockchain Node FAQs
What is a node?
A node is a computer that runs a software client for the blockchain and generally stores a full record of all transactions made on that network.
Are nodes necessary?
They are. Nodes keep a record of the blockchain’s transaction history. Without a large number of distributed nodes, a blockchain can’t claim to be immutable or secure.
Should I run a node?
If you believe in the ideals of blockchain and that financial systems should be fair and decentralized, you absolutely should run a node. Only critical nodes like miners, validators, and masternodes get paid for it, though.