WHAT IS BLOCKCHAIN!
Blockchain is what internet was in the 90s
Blockchain was created a decade ago by the unknown persons behind the online cash currency bitcoin, under the pseudonym of Satoshi Nakamoto.
Blockchain the record-keeping technology behind the Bitcoin network, Bitcoin’s ledger was the first blockchain which made possible to keep thousands of strangers honest and consistent, the technology has begun to spread across the global economy.
A blockchain, originally block chain, is a growing list of records, called blocks, that are linked using cryptography. It is "an open distributed ledger that can record transactions between two parties efficiently and in a verifiable and permanent way".
An open distributed ledger means every node in the network has the copy of the same ledger which makes it impossible for some to manipulate with the data, once a block has been added to the blockchain it is immutable.
So, if for instance a hacker tries to tamper with data, other nodes will quickly realise and flag the transaction invalid, this is what makes blockchain so secured.
So, blockchain is basically a democratic way of recording data in chains of blocks which are immutable and distributed among all the nodes in the network.
Now, what is a block
WHAT IS A BLOCK?
A block is the basis of the blockchain network, it is like a page of the ledger or record book. Each time a block is ‘completed’, it gives way to the next block in the blockchain. A block is thus a permanent store of records which, once written, cannot be altered or removed.
A single block on the Bitcoin blockchain can store around 1 MB of data. Depending on the size of the transactions, that means a single block can house a few thousand transactions under one roof.
It consists of 4 elements.
- Previous hash
- Transactional data
- NONCE
- Hash
- Hash function is what makes the blockchain immutable. Every block has 2 hash:-
- Hash value of previous block & hash value of current block.
- It takes input data and always returns an alphanumeric output of 64 characters(or 256 bits).
- Hash value is impossible to decode, which means it does not disclose the original message. It is a one way function, a slight change in data will result with a completely different hash value, so if someone manipulates a block in the blockchain, the hash value of that block will not match with the previous hash value of the following block making the transaction invalid.
- Some popular hashing algorithms are:-
- SHA-256 Encryption used in Bitcoin and
- ETHASH used in Ethereum.
- NONCE is a random value created by the system which is required to verify the block.
- NONCE value is always lesser than the target value. It used to verify the transactions by the miners, only after which a transaction can be added to the block.
- In order to determine the NONCE, the miners need to try about 20.6 Quadrillion NONCE value to get a valid hash.
- The first one to find the value adds the transaction to the block and is rewarded by the system. 12.5 BTC in case of bitcoin.
A block represents the ‘present’ and contains information about its past and future. Each time a block is completed it becomes part of the past and gives way to a new block in the blockchain. The completed block is a permanent record of transactions in the past and the new transactions are recorded in the current one.
This way, the whole system works in a cycle and data gets permanently stored. Each block comprises records of some or all recent transactions, and a reference to the block that preceded it which, along with Bitcoin's peer-to-peer verification system, makes it virtually impossible for a user to tamper with previously recorded transaction data.
“If we elevate ourselves, blockchain is not as much a technology as it is a philosophy.”
Blockchain Demo:-https://andersbrownworth.com/blockchain/block