Tuesday 6 November 2018

Trust Trail in blockchain

  1. Validate Transaction -->
  2. Verify Gas and Resources -->
  3. Select set of transactions to create a block -->
  4. Execute transaction to get a new state -->
  5. Form a new block -->
  6. Work toward consensus -->
  7. New block added to chain and confirmed (finalize the block by the winner)


Consensus Protocol
At step 5 i.e. forming a new block, A PoW is computed. PoW stands for Proof of Work, and it uses hashing as well.
PoW is a puzzle to be solved by the miners.
PoW is used as consensus protocol by Bitcoin and Ethereum Byzantium Metropolis Blockchain.




Exceptions in the blockchain:
  1. More than one miner solves the consensus puzzle - Fork
They are asked to form further blocks. It is a very low probability that both will form another block at the same time. So this breaks the tie and the chain of new blocks are added to the original chain.
Ethereum gives runner-up incentives to the miners who built the block. Runners-up are called Ommers.

  1. More than one transaction references as input, the same digital asset - Double Spending.
In Bitcoin, the transaction referring to the asset first is considered valid transaction and rest of the transactions referencing the asset are rejected.
In Ethereum, a combination of account number and global nonce is used to address the double spending issue.
Every time a transaction is initiated by the account, a global nonce is included in the transaction. After that nonce is incremented. Timestamp and nonce in the transaction should be unique and verified to prevent the double spending problem.

Fork

Well managed forks help build credibility in the blockchain by providing approaches to manage unexpected faults and planned improvements.

Soft fork is like the release of software patches to existing software
Hard fork is like the release of a new version of the operating systems

Recent hard fork in Ethereum which was a change from Homestead to Metropolis Byzantium version. Oct 17, 2017.
PoW protocol still stays, except that, every 100 blocks, PoS consensus protocol is applied for evaluating the latter.
And Miner incentive was reduced from 5 Ethers to 3 Ethers for block creation.

After a hard fork, the emerging two chains are incompatible with each other.

Unplanned hard fork in Ethereum protocol -  Ethereum Core and Ethereum Classic split to address critical software issue in DAO application that resulted in a 150 Million dollar heist.



No comments:

Post a Comment