4

On the below link, there is a paragraph that says:

http://www.coindesk.com/stellar-ripple-hyperledger-rivals-bitcoin-proof-work/

“Each node publishes a public key. Any message coming through the node is signed by the node to verify its format. Once enough responses that are identical are reached, then you can agree that is a valid transaction.”

My Understanding:

Once a transaction

Saurabh
  • 1,249
  • 2
  • 13
  • 14

3 Answers3

3

Consensus is a mechanism by which the nodes in the blockchain decide that a transaction block can be appended to the blockchain. There are many consensus mechanisms - for example, Bitcoin uses a consensus mechanism called Proof of work, ethereum uses a consensus mechanism called Proof of stake. The consensus can be at a ledger level (all nodes have to agree) or transaction level (only the transacting nodes have to agree) In case of Hyperledger, consensus is at transaction level, meaning not all nodes need to engage in the consensus mechanism. Only the two transacting parties can engage and arrive at a consensus. Detailed technical explanation of PBFT (practical byzantine fault tolerance) based Hyperledger Fabric consensus is explained in this link:

http://hyperledger-fabric.readthedocs.io/en/release/txflow.html

A less technical explanation can be found here: this also talks about the different roles the nodes take in Hyperledger Fabric

https://medium.com/@philippsandner/comparison-of-ethereum-hyperledger-fabric-and-corda-21c1bb9442f6

Rajbarath
  • 49
  • 4
3

Hyperledger is an umbralla project aims at creating a modulus approach for assembling the blockchain solutions. It has a layered architecture including a separate consensus layer. The goal is you should be able to switch in-and-out the consensus policy of your business need

This table from Hyperledger Architecture, Volume 1 gives you examples of its consensus approaches in various child projects.

enter image description here

xinbenlv
  • 893
  • 9
  • 15
  • 1
    Your answer is totally outdated. The paper you cited is pre-v1.0. Hyperledger fabric no longer uses smart contracts and the entire architecture has changed. – Chris Sharp Apr 03 '18 at 02:04
  • 3
    can you be a bit more detailed in your reply? Fabric *does* support smart contracts. see below from hyperledger site – DottoreM Apr 20 '18 at 14:32
  • 2
    Chaincode (Smart Contracts and Digital Assets) Does Hyperledger Fabric support smart contract logic? A. Yes. We call this feature Chaincode. It is our interpretation of the smart contract method/algorithm, with additional features. A chaincode is programmatic code deployed on the network, where it is executed and validated by chain validators together during the consensus process. Developers can use chaincodes to develop business contracts, asset definitions, and collectively-managed decentralized applications. – DottoreM Apr 20 '18 at 14:33
0

In this type of consensus:

  • A transaction is performed, i.e. someone buys something from someone else.
  • The person who desires for this transaction to become a legitimate block on the blockchain will send out a cryptographic hash.

  • The hash is a function which scrambles its inputs and creates an output.

  • There is no easy way to solve for the original inputs so peers will put random numbers into the function in an attempt to find the inputs that created the hash.

  • After enough of these peers have independently solved the problem then the transaction is considered legitimate and the transaction goes on the ledger.

In the bitcoin model, this means the bitcoins are immediately moved to the other party's account.

The number of peers needed to validate the transaction is often calculated by a Byzantine fault tolerance algorithm. You can read the full paper at the link below but it basically means that the system needs:

  n = 2f + 1 peers to agree where n is the total number of peers 
  and f is the number of failing peers. 

For example, if you have 4 peers then according to the algorithm three of them must agree before consensus can be achieved.

Here is the example with 4 peers:

 n = 4
 4 = 2f + 1 
 3 = 2f
 1.5 = f
 total failures can only be 1
 n - 1 = 4 - 1 = 3 peers must agree

Included with the paper on the algorithm are another slideshow that may be helpful to understand it and a link to a video that should be helpful about the bitcoin model in general.

http://pmg.csail.mit.edu/papers/osdi99.pdf

http://www.cs.utah.edu/~stutsman/cs6963/public/pbft.pdf

https://www.youtube.com/watch?v=GMKgB3zZ1so

Chris Sharp
  • 2,005
  • 1
  • 18
  • 32