Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are blocks mined in HyperLedger Fabric?

I have been reading the documentation on how HyperLedger Fabric's project is implementing a open source BlockChain solution: https://github.com/hyperledger/fabric/blob/master/docs/protocol-spec.md

I have seen that PBFT consensus algorithm is used, but I do not understand how blocks are mined and shared among all Validating Peers in the BlockChain network.

like image 783
Marc Cayuela Avatar asked Apr 25 '16 15:04

Marc Cayuela


2 Answers

Hyperledger Validating Peers (VPs) do not mine blocks and do not share the blocks between them. Here is how it works:

  1. A transaction is send to one trusted VP.
  2. The VP broadcasts the transaction to all other VPs.
  3. All VPs reach consensus (using PBFT algorithm) on the order to follow to execute the transactions.
  4. All VPs execute the transactions "on their own" following the total order and build a block (calculating hashes mainly) with the executed transactions.

All the blocks will be the same because: the transaction execution is deterministic (should be) and the number of tx in a block is fixed.

like image 110
Marc Cayuela Avatar answered Sep 22 '22 04:09

Marc Cayuela


Hyperledger is an umbrella of blockchain technologies. Hyperledger Fabric, mentioned above, is one of them. Hyperledger Sawtooth also does not use mining and adds these consensus algorithms:

  • PoET Proof of Elapsed Time (optional Nakamoto-style consensus algorithm used for Sawtooth). PoET with SGX has BFT. PoET Simulator has CFT. Not CPU-intensive as with PoW-style algorithms, although it still can fork and have stale blocks . See PoET specification at https://sawtooth.hyperledger.org/docs/core/release s/latest/architecture/poet.html
  • RAFT Consensus algorithm that elects a leader for a term of arbitrary time. Leader replaced if it times-out. Raft is faster than PoET, but is not BFT (Raft is CFT). Also Raft does not fork.
  • With unpluggable consensus, another consensus algorithm can be changed without reinitializing the blockchain or even restarting the software.

For completeness, the original consensus algorithm with bitcoin (and does use mining) is:

  • PoW Proof of Work. Completing work (CPU-intensive Nakamoto-style consensus algorithm). Usually used in permissionless blockchains
like image 45
Dan Anderson Avatar answered Sep 23 '22 04:09

Dan Anderson