1

I am curious to know the main role of Orderer in Hyperledger Fabric. Some tutorial says it is a validator and some says it is used for consensus.

Akshay Sood
  • 6,366
  • 10
  • 36
  • 59

2 Answers2

4

The Orderer is responsible for packaging transactions into Blocks, and distribute them to Anchor Peers across the network.

The transaction flow of Fabric have the steps Proposal, Packaging and Validation. The orderer is responible for Packaging and involved in the Validation step for distribution of new blocks on the network.

As such the default production ready implementation of the Fabric Order is based on Apache Kafka, where 'Kafka is a messaging software that has high throughput fault tolerant feature'. The Orderer have no persistence, no database, no ledger of it's own.

Unfortunately, orderer beeing responsible for distribution of new blocks does not mean that it is the only node of the Fabric network that need to be aware of other peers (would have been too simple, no?). In the proposal step clients are expected to request endorsing peers to agree to (sign) the results of the proposed chaincode invocation. Endorsing peers are defined by the endorsing policy, and found by means of service discovery.

2

Ordering service provides a shared communication channel to clients and peers, offering a broadcast service for messages containing transactions. Clients connect to the channel and may broadcast messages on the channel which are then delivered to all peers. The channel supports atomic delivery of all messages, that is, message communication with total-order delivery and (implementation specific) reliability. In other words, the channel outputs the same messages to all connected peers and outputs them to all peers in the same logical order.

Taken from official documentation.

Ordering service is not capable of transaction validations, it's primary goal to provide total order for transactions published, cut blocks with ordered transactions.

Artem Barger
  • 40,769
  • 9
  • 59
  • 81
  • Ordering services also create channels, they then provide a means to share messages to peers subscribed to said channels – Ayodeji Agboola Mar 01 '18 at 13:28
  • Do Orderering Services make any validations like Client certification(application who submits the proposal) validation? Do it check endorsement policy too? – Shubham Chadokar Mar 26 '19 at 11:38