What is a Blockchain? - part 2

How does it work?

Let us first consider the characteristics of a block in the blockchain. Each block in the blockchain contains 3 pieces of information.

  • Hash of the block
  • Hash of the previous block
  • Data

The very first block in the blockchain stores only its hash and it’s data. It is also called the genesis block. The information stored as data in a block depends on the type of the blockchain (ex: blocks in Bitcoin’s blockchain store transaction information containing the sender the receiver and the amount that was sent). A single block can be uniquely identified using it’s hash. The process of storing the hash of the previous block creates the chronological order.

Once information is recorded inside a block it becomes very hard to change that data. There are 3 main reasons for that.

One reason is the hash of each block. Changing any of the data inside a particular block will cause the hash of that block to also change, making the rest of the blocks in that chain also invalid.

The second reason is the process of calculating the proof of work. Blockchains utilize something called the proof of work that is a certain mechanism that slows down the creation of new blocks. It is a calculation that needs to be done in order to add a new block to the chain (ex: It takes 10 minutes to calculate the proof of work and add a new block to Bitcoin’s blockchain).

The third reason is the fact that the blockchain is decentralized and distributed. Due to this reason, more than 50% of the nodes in the peer to peer network must come into a general agreement on which blocks have been tempered with, thus proving to be invalid and which ones are not. If a particular block has been tampered with, that block will be rejected by the other nodes in the network.

If an individual really wanted to tamper with a block he would have to re-calculate all the hashes of the other blocks in the network, calculate the proof of work of each of the blocks and also take over more than 50% of the network. Doing all of this is highly impossible, which makes the blockchain secure.

When a new member joins the blockchain network, a full copy of the chain as of that moment will get downloaded to his personal computer. This network is open to anyone, so anyone who wants to join can join in to this peer to peer network. When a new block is created it will be sent to all the people in the network and they will come to a common agreement on if this block has been altered or not. If more than 50% of the participants in the network acknowledges that a block is valid, each node in the network will add that new block to it’s chain. If more than 50% of the network thinks that the block has been altered that block will get rejected by all the nodes.

This is the basic concept of how the blockchain works. Bitcoin’s blockchain is rather similar to this but it has more concepts like mining. I hope you were able to get a basic understanding of the blockchain by reading this article.

Sorce: www.medium.com

انصراف از نظر