Blockchain is a chain of blocks containing information.
This technique was originally described in 1991 by a group of researchers and was originally intended to timestamp digital documents.
Therefore, it is not possible to update or change them.
However, it was mostly unused until it was adapted in 2009 by Satoshi Nakamoto to create the digital cryptocurrency Bitcoin.
A blockchain is a distributed ledger that is completely open to everyone.
They have an interesting property: once certain data has been recorded inside a blockchain, it becomes very difficult to modify it.
So how does Blockchain work? Let’s take a closer look at a block, each containing the data, the hash of the block, and the hash of the previous block.
The data stored in a block depends on the type of blockchain.
For example, the Bitcoin blockchain stores the details of a transaction here, such as like sender, receiver and number of pieces.
A block also has a hash, you can compare a hash with a fingerprint.
It identifies a block and all its contents and is always unique, like a fingerprint.
When a block is generated, its hash is calculated.
Changing something inside the block will cause the hash to change.
In other words, hash functions are useful when you want to detect changes to blocks.
If the fingerprint of a block changes, it is no longer the same block. The third element inside each block is the hash of the previous block.
This effectively creates a blockchain and this technique makes a blockchain secure.
Let’s take an example. Here we have a chain of 3 blocks, each with a hash and the hash of the previous block.
So block number 3 points to block number 2 and block number 2 points to block number 1.
Now the first block is a bit special, it can’t point to previous blocks because it is the first block.
We call this the starting block.
Now suppose you are faking the second block.
This also causes the block’s hash to change.
This in turn will make block 3 and all subsequent blocks invalid because they no longer store a valid hash of the previous block.
So changing a single block will make all subsequent blocks invalid, but using a hash is not enough to prevent tampering.
Today’s computers are very fast and can compute hundreds of thousands of hashes per second.
You can effectively shuffle one block and recalculate all the hashes of the other blocks to make your blockchain valid again.
So to mitigate that, blockchains have something called proof of work.
Proof-of-Work Mechanism
This is a mechanism that slows down the generation of new blocks.
For Bitcoin: it takes about 10 minutes to compute the required proof of work and add a new block to the chain.
This mechanism makes shuffling blocks very difficult, because if you shuffle 1 block, you will have to recalculate the proof of work for all subsequent blocks.
Thus, the security of a blockchain comes from the innovative use of hash functions and proof-of-work mechanisms.
But there is another way for blockchains to secure themselves and that is by distribution.
Instead of using a central entity to manage the chain, blockchains use a peer-to-peer network and anyone is allowed to join.
When someone joins this network, they get a full copy of the blockchain.
Node can use it to verify that everything is still in order.
Now let’s see what happens when someone creates a new block.
This new block is sent to everyone on the network.
Each node then checks the block to make sure it hasn’t been tampered with.
If everything is verified, each node will add this block to its own blockchain.
All nodes in this network are building consensus.
They agree on which blocks are valid and which are not.
Tampered blocks are discarded by other nodes in the network.
So to successfully forge a blockchain you will need to forge all the blocks in the chain, Redo the proof of work for each block and gain control over 50% of the peer-to-peer network.
Only then will your forged block be accepted by all others.
It’s almost impossible to do!
Blockchains are also constantly evolving.
Blockchains Evolution
One of the most recent developments is the creation of smart contracts.
These contracts are simple programs stored on the blockchain and can be used to automatically exchange coins based on certain conditions.
More on smart contracts in a future blog.
Now that you know what blockchain is, how it basically works, and what problems it solves.
You want to know more about this, so keep reading and send an email to us to [email protected] and contact us at +91-124 4294496
Add a Comment
You must be logged in to post a comment