-1

As I understand, consensus is the mechanism that will ensure the ledger is kept in sync across nodes. Is that correct? Also its nothing new and wasn't something that was invented with the advent of blockchain. It is an integral part of distributed databases and has been around for decades. Many algorithms exist to drive consensus - Paxos, Raft, (P)BFT etc.

I am trying to understand if Hyperledger Fabric really comes with consensus protocol/mechanism. The docs say the orderer establishes consensus and currently its implemented via Apache Kafka.

But when I think about it a little deeper, Apache Kafka is not something that provides consensus. It is a pub-sub service. I have never heard of Kafka in the context of consensus. When people talk of consensus they mention terms like BFT, Paxos, Raft etc. not Kafka. Kafka is powered by Zookeeper which indeed is a technology to provide consensus. But the consensus Zookeeper will provide is among the Kafka nodes, not the nodes of the blockchain!

Indeed quoting this paper p.3 Section 1:

An ordering service atomically broadcasts state updates to peers and establishes consensus on the order of transactions

I agree with this - consensus is established on the order of transactions. But where is the consensus to ensure the ledger is in sync across peer nodes? Is that not needed? And if so then why are Fabric developers working to implement Raft consensus [1] - what is the reason and motivation behind it?

  • Does Hyperledger use Kafka nodes as its blockchain nodes? If so, there's your consensus. Naturally, a better source for an authoritative answer to your question would be the Hyperledger folks, not us. – Robert Harvey Mar 14 at 17:09
  • As to the Raft consensus, it says why right in the page you linked: "If this were titled as a story it would be: As a Fabric ordering service operator/deployer, I wish to decrease my dependency on third-party binaries." – Robert Harvey Mar 14 at 17:09
  • @RobertHarvey I wanted to tag this post with hyperledger-fabric but that tag does not exist and I don't have sufficient reputation to create that tag. I like asking questions on stack exchange as they are searchable and I can filter by questions I have asked and thus get a personalized FAQ etc. Also this seemed more fit for softwareengineering than SO so asked it here. I am hoping the Hyperledger folks would answer the question. – morpheus Mar 14 at 17:13
  • @RobertHarvey 1. kafka nodes are not the blockchain nodes as has been pointed out in my question itself. 2. Raft will be implemented using etcd/raft library so how does that decrease dependency on third-party libraries? thank you. – morpheus Mar 14 at 17:16
  • It decreases dependency on third-party libraries by not requiring Kafka. You need to read the page you linked; that information is already there. – Robert Harvey Mar 14 at 17:16

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.