The word blockchain is on everyone’s lips right now. Although you might not really understand what “blockchain” means, chances are you’ve heard people talk about it (a lot).
Some people believe it will change our world for the better, and it will replace the banks that we currently know – or similar extravagant things.
Although the blockchain came to the general public’s attention when the crypto market absolutely exploded, the majority of the people still don’t understand how it works, what it’s used for or what all the fuss is about.
In this guide, I’ll answer all of your questions in regards to the blockchain, nodes, the ledger(s) and the security of the blockchain. The goal is to explain the blockchain in plain English, so anyone can understand it.
Note: In this guide, I’ll be explaining how the concept of the blockchain works – I won’t be explaining how the blockchain technology is implemented in detail, as that’s beyond the scope of this article.
Let’s get started.
What Is the Concept of Blockchain?
First, it’s important to understand two different, basic terms.
- Bitcoin (a digital currency)
It’s important to understand that Bitcoin is not a blockchain. This is something that has many people confused. Bitcoin is merely a digital currency based on the blockchain technology.
Blockchain is the technology that enables the movement of digital assets – Bitcoin, for example – from one individual person to another individual.
So, what is the concept of the blockchain, exactly?
To get a better understanding, let’s look at an example of an existing problem that the blockchain attempts to solve. I’m talking about transferring money.
Imagine I (Bill) want to send money to my friend Jenny. Traditionally, this is done through a trusted third party (bank or credit card company) between us.
For the sake of the example, let’s say that I live in New York, while Jenny lives in London.
When I want to send some money to Jenny, I ask the third party to send it to her. In return, the third party will identify Jenny and her bank account.
When that’s completed, the third party will transfer the money to Jenny’s personal account, while also taking a small transaction fee.
This process typically takes 3-5 days. Some banks process such requests faster than others, but it takes some time.
Now, the entire concept behind the blockchain technology focuses on the elimination of that trusted third party, the middle man.
In addition, the blockchain aims to complete this process much faster than the current system – almost instantly!
Finally, the blockchain attempts to do this process at a much lower rate (very low transaction fees).
Let’s take a look at how the blockchain technology addresses this money transfer problem. There are various different principles/concepts involved.
On Investopedia, a ledger is defined as:
“A company’s set of numbered accounts for its accounting records. The ledger provides a complete record of financial transactions over the life of the company.
The ledger holds account information that is needed to prepare financial statements and includes accounts for assets, liabilities, owners’ equity, revenues and expenses.”
Simply put, the ledger is where a “chain” of transactions are linked to one another, creating a record of financial transactions.
The term “Open Ledger” means that anyone can join the network of the ledger, and all transactions are stored in one ledger. The network saves all the transaction data in one centralized ledger (storage).
A “Distributed Ledger” is essentially the same as an “Open Ledger” in that both are accessible to anyone. The main difference here is that a distributed ledger is decentralized, meaning that everyone in the network owns a “copy” of the ledger on a node.
A “node” is another word for a device that every participant in the network possesses, which contains a copy of the open ledger.
You can use the term “node” as shorthand for a participant in the chain of the distributed ledger. So, the examples below contain 4 “nodes.”
In order to give you a crystal-clear understanding of this concept, I’ll first illustrate it with an example.
For instance, imagine that there’s a network of 4 individuals: Bill, Jenny, Mark and Justin. Every individual in this network wants to send and receive money to/from one another.
At the original formation of this network, I (Bill) have $20. The concept of an open ledger and how it’s implemented in this situation works like the following.
Imagine that there are a couple of transactions made between these 4 individuals.
- Bill transfers $10 to Jenny
- Jenny transfers $5 to Justin
- Justin transfers $3 to Mark
Every transaction is registered and linked to the already-existing transactions in the open ledger. That means that, in this example, there are 4 transaction links in the chain of the open ledger, which tells which transaction is made and to whom.
The chain of transactions in a open ledger are open to the public and for anyone to access and see. That means that everyone in the network can identify where the money is and how much money every individual has.
In addition, every individual in the network of the open ledger can decide whether a transaction in the chain is valid or invalid.
Let’s go back to the example above, where I owned $20 at the genesis of the network (the start of the chain) and I transferred $10 to Jenny (so, I have $10 left). But now, I attempt to send another $15 to Mark.
As a result, everyone on the network is able to identify this transaction as an invalid transaction, since I’m short $5. Therefore, this transaction won’t be added to the chain of transactions in the open ledger.
One of the most important goals of the blockchain technology is to create a decentralized solution. The concept of a decentralized chain of connections is called the “distributed ledger.”
In other words, every individual (node) in the network will receive a copy of the ledger. That means that I will hold a copy of the ledger in my node, as will Jenny, Justin and Mark.
When the ledger is distributed across the network, every person in the network holds the chain of events (transactions) in their node, which means that the centralized “open” ledger is replaced by the decentralized solution.
At this point, the goal to eliminate the previously-mentioned centralized “trusted third party” has been accomplished.
However, by doing so, a new problem was created, because we now have 4 different copies of the ledger in the network of transactions. It’s crucial that every individual (participant) in the network owns a properly synchronized version, so every node contains the same copy of the ledger.
To solve this issue, let’s continue by looking at another principle of blockchain technology.
So, you now know that the distributed ledger is an open network which is accessible to everyone. The copy of the ledger is distributed across all the nodes (participants) within the network of the ledger.
But how are new transactions validated within a network?
For the sake of the example, let’s pretend that I want to move $10 to Jenny. When I make this transaction, I will automatically share and publish my “intended” transaction to the network.
As a result, every participant in the network will be notified of this intended transaction and will see that I want to move $10 to Jenny. Because my transaction has not been validated yet, it’s still an unvalidated transaction, which means that it’s not recorded in the ledger yet.
In order to get a transaction validated so that it’s recorded in the ledger, another principle is needed: “mining.” The principle of mining means solving calculations.
Miners (who do the mining) in, for example, Bitcoins, are special nodes. The node of every miner is able to hold the ledger (because it’s public).
For instance, imagine that both Mark and Justin are miners in this particular ledger. Miners execute a very important task. All the miners in a ledger compete with each other, so Mark and Justin will be miner competitors here.
Mark and Justin (the miners) will compete to become the first to take my unvalidated transaction to Jenny, validate the transaction and then add it into the chain of the ledger.
The miner that does this the fastest (first) receives a financial reward, like a prize. In this case, because it was an example of Bitcoin miners, the financial reward will be Bitcoin.
The concept of how bitcoins are generated is extremely complex, and beyond the scope of this article. All that you need to know is that, very simply, the financial reward of bitcoins is generated through the computational process of validating the transaction, not through Jenny or Bill paying the miners bitcoins.
For more information about the generation of bitcoins, visit AnythingCrypto’s website.
So, what are the rules for Mark and Justin to beat the competition and get a financial reward?
The miner has to do 2 things in order to take the intended transaction and put it into the ledger.
Step #1 – Validate the new transaction
Validating the new transaction is relatively simple because the information in the ledger is openly accessible, so the miner can instantly calculate whether I have sufficient funds in order to complete the transfer to Jenny.
Step #2 – Find a special “key”
In order to lock the new transaction in the chain of the ledger, the miner has to find a special key that will enable this process. The key itself is random.
Therefore, Mark and Justin need to use computational power in order to search for this random key, which takes time. By doing so, the miner will use the mathematical abilities of a computer to repeatedly guess new keys until the computer finds the first key that matches the random puzzle.
Again, if Mark is able to do that first, he will get the financial reward.
When this process is completed, Mark has to synchronize the distributed ledger across the entire network.
How Are “Ledgers” Synchronized Across the Network?
So, let’s continue with the example that we created in the previous section.
The question you might have now is:
How could each node be synchronized to have the same record of transactions?
This is an essential principle of the blockchain technology, because this will solve the problem of how to have the same copy of the ledger on every node in the network.
Mark was able to solve the puzzle first and was therefore able to add the transaction to the chain in his ledger. Now, Mark has to publish the solution that he found to the entire network.
That means that he’s telling Justin, Jenny and I that he solved the puzzle and validated the transaction (the transaction that I wanted to send to Jenny).
When Mark updates us about that, he will also provide the lock (a key) that will enable the rest of us (participants on this network) to take the transaction and add it into our own ledgers.
So, Justin (miner) will add this transaction to his ledger, because there’s no point anymore in trying to resolve this transaction, since it has been solved by Mark already, who got the financial reward. Justin will search for another transaction to work on (and solve) in order to get a financial reward for that.
As a result, the transaction will also be added the chain of transactions in Jenny’s and my ledger. Jenny will receive the $10 that I initially proposed to transfer to her in the network, too, because everyone in the network has agreed that this transaction is valid.
At this point, all of the distributed ledgers in the network are updated and contain the exact same chain of transactions.
The “Blocks” in the “Chain”
Since you now have a better understanding of the basic concept of the blockchain, it’s time to dive a little deeper in order to get a better understanding of the “blocks” in the “chain.”
The blockchain is – you guessed it – a chain of blocks.
Each block in the chain contains some specific data.
The type of data stored in a block depends on the type of blockchain. For example, a block in the Bitcoin blockchain stores information such as the number of bitcoins in the block, who sent the bitcoins and who received them.
If the blockchain belongs to another cryptocurrency like Ethereum, the block contains information about Ethereum instead of Bitcoin.
A hash could look this this:
A hash is always unique – it contains a string of random letters and numbers. The unique string basically holds the information of what content is stored in the block.
When a block is created, the unique hash that belongs to the block is then calculated. When something in the block changes – for example, if the number of bitcoins goes down by 2 – the hash will also change.
That means that when the hash changes, it’s no longer part of the same block. So, a new block is created.
Hash of the Previous Block
Every newly-created block also contains the unique hash string of the previous block. That way, all the blocks are connected to each other.
As you can see in the example, every block is connected to the previous block by stating the hash of that block.
The first block doesn’t contain a previous hash, simply because there wasn’t a block before that. The name of the first block in the chain is also called the “Genesis block.”
Security & Blockchain
If someone tries to interfere with an already-existing block or change something in the block, the hash will change. That means that all of the following blocks will become invalid because they contained a different hash than the newly-generated hash, because a change was made.
In order to solve the issue of the other blocks becoming invalid, all the other block hashes must be calculated again.
To counter that vulnerability, there’s a piece of data involved called “proof of work,” which basically slows down the creation of new blocks. The difficulty for miners to create new blocks is controlled so that the time required to solve a calculation and to create a new block is possible only every 10 minutes.
That means that if you were to interfere with or change one block in the chain, you would need to recalculate all the following blocks in the chain, 1 per 10 minutes – which is way too time-consuming and expensive.
Another layer of security is a “Peer-to-peer (P2P) network.” The existence of a P2P network ensures that the blockchain is distributed across a large network, instead of being stored in one single entity.
As you learned before, this is an open and public network that anyone can join. When you enter a network, you’ll receive a copy of the blockchain.
When a new block is created (see image below), it will be sent to the node of all the participants in the network.
Then, each node of every participant in the network will check the new block and identify whether it’s a valid block. If it checks out, each node will add the new block to its own blockchain.
If all the different nodes of the participants in the network contain the exact same blockchain, it means there’s a general agreement that this is the official blockchain, and invalid blocks will be denied from being added to the blockchain.
When it comes to security, if you wanted to tamper with the blockchain, you would need to change all the blocks within the blockchain, recalculate all of the hashes, alter the proof of work, and on top of that, you’d need to take control of more than 50% of the P2P network.
If not, your modifications on the blockchain wouldn’t be accepted by everyone else in the network.
Obviously, this would be pretty much impossible to execute, which means that the security of blockchains is incredibly good.
Simplified Summary of the Blockchain Technology
The first thing that we learned is that blockchain and Bitcoin are two different things. Additionally, we’ve learned that blockchain technology is based on a few basic principles.
- The distributed ledger is an open network that is public to everyone.
- Every participant in the network can validate transactions.
- The ledger is distributed and exists in many different nodes on the network (this removes the involvement of a trusted third party).
- The concept of miners and the role of miners are to validate transactions within the ledger by solving calculations.
Miners are special nodes in a network. The task of the miner is to validate “intended” transactions, solve the puzzle and publish/share it to the network so everyone can add the new transaction to the chain in their ledger.
Miners try to solve these mathematical puzzles. This ensures that everyone in the network collectively agrees that this is the next chain in the official ledger that everyone in the network should use.
We’ve also learned that every block in a blockchain contains 3 types of data.
- Hash of the previous block
Of course, what’s stored in every block depends on the blockchain, but a simple example would be that in the Bitcoin blockchain, every block stores information about bitcoins.
We also learned that every block contains a unique string of random letters and numbers which is called a “hash.” The hash holds information about the block, so once a piece of information in a block changes, so does the hash.
In order connect the blocks with each other, every block holds the hash string of the previous block. Only the first block, at the “genesis” of the chain, does not contain the hash of a previous block, simply because it was the first block in the chain.
In sum, the implementation of blockchain is incredibly detailed and complex, but my explanation of the concepts and ideas – in plain english – should already answer a lot of your questions.