How Do New Blocks Are Added to a Blockchain, Explained

0
3428
when to add a new block to the blockchain?

Blockchain might be commonly associated with cryptocurrencies, but it has numerous applications in all domains. Nowadays, people use blockchains for real-time governance, asset management, healthcare, real estate, art (NFTs), and education.

In all of these applications, blockchain acts as a shared digital record that stores all transactions in basic units called blocks to blockchain. In this article, we take a look at blocks and ways to determine when to add a new block to a blockchain. Let’s get started.

What is a Blockchain?

A blockchain is a distributed ledger or database shared among participants called nodes spread over a computer network. The blockchain is the database that stores all information in digital format. They are best known for their role in keeping a secure, decentralized record of transactions. 

Blockchain guarantees that data is safe and not tampered with by any means. It generates trust without the need for a third party to overlook proceedings. In other words, it is a trustless, permissionless network.

Blockchain is different from conventional databases in that the former collects and stores data in sets called blocks. Blocks have a specific data storage capacity. When they are filled, the block is closed and the next block is started and linked to the previous block. Blocks form a chain in this way and the whole network is called a blockchain.

Note that databases use tables to store data but blockchains are simply chains of blocks connected to each other and growing all the time. Such structure makes blockchains irreversible, ruling out the possibility of someone going back and editing the blocks of the past. Once a block is filled, it is permanent and each one has a timestamp that further cements its position on the chain.

Authentication of Blockchain

Blockchains are designed to function without the need for a central authority to pull the strings. That said, transactions still have to be approved or authenticated by a fair means.

This is where cryptographic keys are used. It consists of a string of data that is used as an identifying factor that gives access to users. 

Besides, every user has a unique private key and a public key open to everyone. The combination of the two allows the network to authenticate the identity and approve transactions when needed.

Authorization 

Once the users agree to a transaction, it needs approval prior to entering it into the blockchain. On public blockchains, the decision to include a transaction is done through consensus. It means that a majority of nodes should agree to the validity of a transaction. And those who participate in this process get rewards for their efforts. This consensus mechanism is called proof of work. There are other consensus mechanisms too such as proof of stake. For instance, Ethereum after the recent merge, uses proof of stake, whereas Bitcoin uses proof of work.

When to add blocks to blockchain?

As mentioned above, proof of work and proof of stake are the two most common consensus mechanisms used across blockchains.

Bitcoin uses a proof of work mechanism to generate new blocks and to add new bitcoins into supply. The network verifies transactions through mining and people who verify the transactions are called miners.

Since there are no central authorities calling the cards, the network takes collective responsibility to issue and manage coins.

Let’s understand the process through an example.

  • User X wants to transfer 1 bitcoin to User Y. 
  • As X starts a transaction, the information about the sender and receiver is combined and stamped on a block and it is sent to a pool for a queue to get added to the blockchain.
  • Miners who discovered the blocks will take up transactions in batches and verify them. They will check the messages, digital signatures, public keys, and messages.
  • Once verified, the block will be shared with other nodes who should all agree to the authenticity of the block before adding it to the blockchain. For bitcoin, the average time for authenticating a transaction is 10 minutes.
  • Once the above processes are finished, Y will get the 1 bitcoin from X. 
  • Besides, all nodes in the network would have agreed to the transaction with the help of the consensus model.
  • Bitcoin miners will earn a reward for authenticating a transaction
  • The new block will become a permanent part of the blockchain

Conclusion

As you saw, blocks are the fundamental structure of blockchains that offer fast, permissionless, and trustless ways to authenticate transactions. New applications of blockchains are being explored every day and mass adoption is also underway. It won’t be long before we see blockchain technology spill over to all areas of our lives.