Nowadays, blockchains are extremely popular.
But, first and foremost, what is a blockchain? What are their working principles, what problems do they tackle, and how may they be applied? A blockchain is a series of blocks that carry data, as the name suggests. This technology was first described by a group of researchers in 1991, and it was designed to timestamp digital documents so that they could not be backdated or tampered with.
However, it went mostly unnoticed until Satoshi Nakamoto altered it in 2009 to create the cryptocurrency Bitcoin. A blockchain is a decentralized ledger that everyone may access. They have an intriguing property: once data is recorded in a blockchain, changing it becomes extremely difficult. So, how does that work?
Let's take a closer look at one of the blocks.
Each block contains some data, as well as the block's hash and the previous block's hash. The type of blockchain determines the data that is contained within a block.
The Bitcoin blockchain, for example, keeps track of the sender, receiver, and amount of coins in a transaction.
There is also a hash in a block. A hash is kind of like a fingerprint. It identifies a block and all of its contents, just like a fingerprint, and it is always unique. After a block is made, its hash is figured out. If you change something in the block, the hash will also change.
In other words, hashes are a great way to find out if a block has changed. When a block's fingerprint changes, it is no longer the same block. The hash of the block before it is the third part of each block.
This creates a chain of blocks, which is one of the things that makes a blockchain so safe.
Let's take an example.
There is a chain of three blocks, each of which has a hash and the hash of the block before it. This means that block 3 points to block 2, and block 2 points to block 1. Now, the first block is a little different. Since it's the first one, it can't point to blocks that came before it. This is called the "genesis block." Now imagine that you change the second block. The hash of the block also changes because of this.
In turn, this will make block 3 and all blocks after it invalid because they no longer contain a valid hash of the previous block. So if you change just one block, all of the blocks after it will no longer work. But hashes alone aren't enough to stop tampering.
Today's computers are very fast and can do tens of thousands of hashes per second. You could change a block and then recalculate the hashes of all the other blocks to fix your blockchain. So, blockchains have something called "proof-of-work" to make sure this doesn't happen. It's a way to slow down the process of making new blocks.
In the case of Bitcoin, it takes about 10 minutes to figure out the required proof-of-work and add a new block to the chain. With this system, it is very hard to change the blocks because if you change one block, you have to recalculate the proof-of-work for all the other blocks. So, a blockchain is safe because it uses hashing and the proof-of-work mechanism in a creative way. But there is one more way that blockchains keep themselves safe: they are spread out. Blockchains don't use a central organisation to run the chain. Instead, they use a peer-to-peer network that anyone can join. When someone joins this network, he gets a full copy of the blockchain. This can be used by the node to make sure that everything is still fine.
Now let's look at what happens when a new block is made. Everyone on the network gets that new block. Then, each node checks the block to make sure it has not been changed. Each node adds this block to its own blockchain if everything checks out. In this network, all the nodes come to an agreement. They agree on which blocks can be used and which ones can't. Other nodes in the network will not accept blocks that have been changed. So, to change a blockchain, you'd have to change all of the blocks on the chain, redo the proof-of-work for each block, and take over more than half of the peer-to-peer network. Only then will everyone else start to accept your changed block.
Blockchains are always changing, too. A lot of people were interested when blockchain technology was developed. Soon, other people saw that the technology could be used for other things, like storing medical records, making a digital notary, or even collecting taxes. Now you know what a blockchain is, how it works on a basic level, and what problems it solves.
No comments:
Post a Comment