What The Hell Is Blockchain And How Does It Works? (Simplified)
“On the Internet, nobody knows that you’re a dog” — Peter Steiner
Unless you have been living under a rock, you might probably have heard of the word “Blockchain” being thrown around recently. It seems to be one of the buzzwords of the year. But many people seem to know what blockchain is or how does it work.
Imagine you and your friend are transacting/transferring money from one account to another. You would first reach the bank and ask them to transfer the money to the account address of your friend.
On transferring the money from your account to your friend’s account, the bank keeps an entry on the register of transactions. The entry needs to be updated on both, receiver and sender, accounts. But there is one problem:
It is Tamper-able. Entries of transactions can be manipulated easily or change.
People who know how the banking system works are trying to avoid them because of this problem. This is where Blockchain comes in.
What is Blockchain?
Let’s take an example of a Google spreadsheet or MS Excel (Windows). This spreadsheet is shared among different networks of computers, where everyone has a copy of it. The spreadsheet contains information about the transactions committed by real people.
Anyone can access that spreadsheet but no one can edit it.
This is Blockchain.
It works with Blocks, whereas the spreadsheet works with “rows” and “columns”.
A block in a blockchain is a collection of data. The data is added to the block in the blockchain, by connecting it with other blocks in chronological others creating a chain of blocks linked together. The first block in the Blockchain is called Genesis Block.
Blockchain is a distributed ledger, which simply means that a ledger is spread across the network among all peers in the network, and each peer holds a copy of the complete ledger.
Some key attributes of Blockchain are which proves that blockchain is better than traditional systems of ledger information keeping:
- Peer-To-Peer: No central authority to control or manipulate it. All participant talks to each other directly. This allows for data exchange to be made directly with third-parties involvement.
- Distributed: The ledger is spread across the whole network which makes tampering not so easy.
- Cryptographically Secured: Cryptography is used for the security services to make the ledger tamper-proof.
- Add-Only: Data can only be added in the blockchain with time-sequential order. This property implies that once data is added to the blockchain, it is almost impossible to change that data and can be considered practically immutable. We can say it has:
“The right to be forgotten or right to erasure” defined here.
- Consensus: This is the most critical attribute of all. This gives blockchain the ability to update the ledger via consensus. This is what gives it the power of decentralization. No central authority is in control of updating the ledger. Instead, any update made to the blockchain is validated against strict criteria defined by the blockchain protocol and added to the blockchain only after a consensus has been reached among all participating peers/nodes on the network.
How Does It Work?
- A node starts a transaction by first creating and then digitally signing it with its private key (created via cryptography). A transaction can represent various actions in a blockchain. Most commonly this is a data structure that represents the transfer of value between users on the blockchain network. Transaction data structure usually consists of some logic of transfer of value, relevant rules, source and destination addresses, and other validation information.
- A transaction is propagated (flooded) by using a flooding protocol, called Gossip protocol, to peers that validate the transaction based on preset criteria. Usually, more than one node is required to verify the transaction.
- Once the transaction is validated, it is included in a block, which is then propagated onto the network. At this point, the transaction is considered confirmed.
- The newly-created block now becomes part of the ledger, and the next block links itself cryptographically back to this block. This link is a hash pointer. At this stage, the transaction gets its second confirmation and the block gets its first confirmation.
- Transactions are then reconfirmed every time a new block is created. Usually, six confirmations in a network are required to consider the transaction final.
Transactions are then reconfirmed every time a new block is created. Usually, six confirmations in the Bitcoin network are required to consider the transaction final.