How does blockchain technology work?
As mentioned earlier, blockchain technology is a decentralized, open ledger that helps to move assets or information from one party to another without the presence of an intermediary.
Open Ledger means that the blockchain or the ledger is open for everyone to see. Anyone can see the transactions that took place between various parties in a particular blockchain. All the changes being made to the blockchain can be
Distributed Ledger means that all the nodes on the network can have a copy of the blockchain. The key question here is – How do the nodes get to know that a new block has been added so that they can also add it to their copy of the ledger?
This is where miners come in. Miners have to validate a transaction and solve a cryptographic puzzle to add the block to the chain. The miner who is the first one to do this gets a financial reward for his efforts. Thus hundreds of miners compete for validating a block.
Once a miner validates the block, the other miners who were competing, get to know that the block has been validated and there is no use in solving the cryptographic puzzle again. Thus they simply add the validated block to their copy of the ledger and try to validate the next block. This is how the copy of the ledger with all the miners stays updated.
Now let us come to the details of each block in the blockchain.
There are three components of every block on the blockchain. Which are:
- Hash of the block
- Hash of the previous block
The data contains any information that people want to store in the blockchain. For example, in the case of Bitcoin, the data contains the address of the sender, the address of the receiver, and the amount transferred.
What is #Hashgraph that’s described as a continuation or successor to the #blockchain technology? How does it work? @Manisha3005 explains@WazirXIndia #crypto #cryptocurrency #cryptonews pic.twitter.com/XPoc3PFk4Q
— CNBC-TV18 (@CNBCTV18News) September 7, 2021
Hash is the output of a hash function. A hash function takes in an input and returns an output of a fixed size. For example, bitcoin uses the SHA-256 Cryptographic Hash Algorithm. A hash essentially looks like this – 27878E76C24573C020EF44DBD9CA541344A95994F17138A4F859B3436962CF71
The main feature of hashes is that they are unique. Every set of data has a different hash and changing the data (the input) will inevitably change the hash (the output). Moreover, it is impossible to derive the input from the output.
Also, read – Blockchain in Algorithmic Trading
Due to this uniqueness, the blockchain prevents anyone from changing the data inside a particular block.
When the data of a particular block changes, the hash of the block also changes. As the previous hash of this block was also contained in the next block, the hash of the current lock no longer matches the hash stored in the next block.
However, computers nowadays have the capacity to generate hundreds of thousands of hashes per second and they can then change the hash of the block ahead of the current block and continue this process until the block is validated.
However, these efforts of a hacker can be combated by a Proof-of-Work mechanism which is popularly used in Bitcoin. Due to this system, it takes 10 minutes to validate a block and add it to the blockchain.
Hence, this gives a lot of time to the other nodes in the network to identify that the data of a block has been tampered with.