What is Blockchain?

What is Blockchain?

Just the basics ...

A blockchain is a chain of blocks that contain information. Its a distributed ledger that is completely open to anyone, once information is saved in a blockchain, it becomes extremally difficult to change it.

What's the anatomy of a block? Each block contains:

  • data of information.
  • hash of the data stored in the block
  • hash of the previous block, so if information cannot be tampered easily within a block.

The data stored within a block depends on the type of application running on that blockchain. e.g: BitCoin stores information such as

  • From: A;
  • To: B;
  • Amount: 100$;

A Hash basically is as unique as a fingerprint, it is usually a 32 character long string, irrespective of the length of the data. It changes only if value within the data changes. Once a block is created, so is its hash, therefore changing something within a block changes its hash!.

Since the next block records the hash value of the previous block, any tampering with a block changes its hash value. and if the hash values don't match with the surrounding blocks, we know the block has been altered.

Blockchain uses peer-to-peer where everyone is allowed to join. When someone joins the network he gets the full copy of the blockchain, Now suppose a new block is created, this new block is send to all its peers who have a copy of the blockchain in the network, these users calibrate the hash value of the new block along with the previous blocks hash!. if this hash matches with all the other peers blockchain we know that all the nodes in the blockchain are secure/not altered. if everything checks out, each peer adds block to its own blockchain.

Why blockchain

Block chain solves the double spending problem. Lets assume a picture has monetary value, if that picture is send from A to B, B has the option to replicate the picture multiple times and sell it to multiple people. therefore creating a "double spend problem". Since Block chain works on the principal of peer-to-peer network, each transaction is authenticated by vast network of peers, powered by their collective self-interests, "i.e. tokens received for validating each transaction", using this method the uncertainty regarding data security is reduced close to negligible.

Just how SMTP is a protocol that is used to transfer mails, blockchain is described as a soon to be value-exchanged protocol, thereby moving the internet to a new phase. pre blockchain can be considered as a information transfer era. While now we can consider ourself entering into a value transfer era.

Whats a block?.

Blocks hold batches of valid transactions, that are hashed and encoded into a Merkle tree, each holding a hash value of the previous block, linking the two. The linked blocks form a chain. This iterative process confirms the integrity of the previous block, all the way back to the first block called geneses block.

Lets think of a situation where 2 more more blocks are created and introduced in the network at the same time!. there could be a situation where some peers from the network get block A while some peers end up getting a block B there by creating two sperate chains. to prevent this from happening, blockchain runs an algorithm to assign random numbers to each created block. hence if the above mentioned situation arises, the block with a higher assigned number will be given higher priority.

Decentralization

By storing data across its peer-to-peer network, blockchain eliminates a number of risks that come with data being held centrally, e.g. assume I'm downloading an application from a central network; if the networks down, so is my downloading which is now stuck at 99.9%. if it was on a blockchain, all the network had to do is look for another peer on the network. since it works on the principle of peer-to-peer, the blockchain has no single source of point of failure.

Another e.g. would be if the main file on the server got corrupt, all the network has to do now is check if the file is consistent with the other copy on its distributed network, if it isn't, download it from the node that's perfectly fine.

Now the question arises, how do you know which node has the right information? Every node in a decentralized system has a copy of the blockchain. Data quality is maintained by massive database replication and computational trust, that basically means no user is trusted more than the other, and if more nodes trust information A over information B, then we assume information A is accurate.

based on what we just read, it strikes us that if one entity controls more than 50% of the blockchain, they can dictate what is right and what is wrong!, this is what's called the 51% attack. if this single entity gains control of the network, they can manipulate the records stored on the blockchain at will.

Types

Currently there are atleast 4 types of blockchain networks- public blockchains, private blockchains, consortium blockchain and hybrid blockchains.

Public Blockchain.

Anyone with an internet connection can send transitions to it as well as become a validator, usually such networks provide some sort of economic incentives for those who validate these transactions.

Validators are chosen by either Proof-Of-Work and Proof-Of-Stake,

Private Blockchain.

A Private blockchain is permissioned. one cannot join it unless invited by the network administrators. So in a way its semi-decentralized, Its also much faster due to less number of people.

Validators are most likely chosen by Voting.

Hope you liked my Article.. Cheers :)