What are Nodes and Blocks in the Blockchain?
A network of special computers…
Let’s go back in time a bit – to the 90ties. At this time having your own personal computer was too expensive for the most, and techies, geeks and gamers went to places where computers were available to use – computer clubs and libraries. The computers there were connected with each other, and with the rest of the world through the use of internet connection, thus forming a global network of all computers. This network-enabled communication between two and more computers (therefore people).
Similarly, the blockchain is a network of computers, connected over the internet. The difference is that the connected computers are a bit special.
Puzzle piece 1: A network of special computers
… that keep track of a ledger …
What makes these computers so special? You can think of one of them as an accountant.
Accountants’ job is to record the history of sending and receiving money (data) in an auditable way. They do this through the use of a huge book called ledger. The accountant has several rules of how she/he writes in the ledger.
First, your accountant is recording every time you send or receive money. One instance of sending or receiving money (or data in general) is called transaction. Starting from the beginning of time, your accountant can go through all transactions involving you and calculate your current holdings – your balance.
Second, the accountants can never remove transactions from the ledger. They can only append transactions to the end of the ledger. This way every movement can be traced back and audited.
This rule is very important for your accountant, otherwise, they would never be sure if they calculated your balance correctly.
In the blockchain world, you will likely find the accountants with their other name – blockchain node.
Puzzle piece 2: The event of sending/receiving money/data is known as a transaction in the blockchain. Your current holdings are known as your balance.
Puzzle piece 3: The special computers maintaining the ledger are called blockchain nodes
Having your own personal accountant is nice, but this accountant normally works with other people too. So does our special computer-accountant.
Actually our computer-accountant is everyone’s accountant. Everyone in the world. When one node receives information about a new transaction, they relay it to the other nodes in the network. More on the relaying later, for now, let’s focus on the accounting.
So, let this sink in – every computer-accountant is everyone’s accountant, receives everyone’s transactions and maintains the accounting ledger of everyone’s transactions. Quite a daunting task.
Transactions bundled in blocks
Well, if these accountants were only serving you, they would probably not have too much work. A couple of transactions and their work is done for the day. Now add everyone else in the world and the accountants are swamped with hundreds of transactions every second.
In order to maintain their sanity, the blockchain nodes have decided that they are going to do their work in batches. They’ve decided that they will gather all transactions in every X seconds (for example 15 seconds) and process them at once. A batch of transactions is known as block – hence the block in blockchain.
Puzzle piece 4: A batch of transactions is called blockchain blocks.
The nodes are your guardians
Once a blockchain block is processed, it is considered sealed – it can never be changed. This, however, means that any malicious transactions will always be there. In order to fight this, before processing and finalising a block, the blockchain nodes are also validating every transaction.
For example, they are making sure that no one can lie to you and spend money that they do not have.
Order is important
In order for the node to be able to successfully validate the balances, the chronological order of the transactions and blocks needs to be maintained. If someone is able to change the chronological order of the blocks, very weird things can happen.
For example, someone might be able to send money without having any or spend the same money twice. The blockchain nodes are so focused on preventing this problem that they have even given it a name – “The double spending problem”
In order to combat the double-spending problem, the nodes need to maintain the chronological order of the blocks. First of all, they give every blockchain block a unique identifier of the block. Second, every next block contains not only the transactions for the time frame but one additional piece of information, the unique identifier of the previous block.
This way every block is linked to the previous one by means of their unique identifier. If you think about the blocks and their links visually, they are now formed in a chronological chain. This is where the term chain in blockchain comes from.
In the blockchain world, you will likely hear the term block hash – this is the unique identifier of the blockchain block.
Puzzle piece 5: The double-spending problem – the problem if someone is able to spend the same money twice. The nodes are guarding against that.
Puzzle piece 6: Every next block is linked to the previous one through the unique identifier (block hash) of the previous one. This way they form a chain of blocks – blockchain.
If you already feel confident in knowing the main terms go-ahead and read what Wikipedia says about Blockchain.
Up next – “and synchronise with each other”
The story up until this point has been about the blockchain node on its own. However, the nodes have important network duties and the blockchain network has it’s specific due to a large number of nodes. We will discuss and explain these in the next part.
About the author
George Spasov – blockchain architect and a co-founder at LimeChain. Heading the technical team at Limechain, George has also experience leading teams to deliver successful software projects for everyone from startups like pCloud to international companies like IBM. During the past 2 years, he has consulted and designed the architecture of 30+ blockchain and DLT projects, while also remaining an active member of the public communities. He is now focused on transforming businesses and corporate processes using innovative solutions on Blockchain and DLT. Leading the innovation adoption at LimeChain, he is one of the well known and recognizable influencers in the blockchain domain.
[Part 2] What is Blockchain? Networks, Decentralisation & Relaying
[Part 3] What is Blockchain? Consensus, Cryptography and Crypto Economics
[Part 4] What is Blockchain? Consensus Algorithms
[Part 5] What is Blockchain? Coins
[Part 6] What is Blockchain? Smart Contracts