Shirish khairnar
Shirish khairnar

Reputation: 11

How to implement commiting peer in hyperledger fabric network?

I am new to hyperledger fabric and I am currently studying it for one of my project. Project needs implementation of both endorsing peer as well as commiting peer. Till now I am able to run test network and add a new endorsing peer to running network. But I don't know how implement( in Java) commiting peer in hyperledger fabric network. Can somebody please help me with this?

Upvotes: 0

Views: 315

Answers (1)

myeongkil kim
myeongkil kim

Reputation: 2576

committing peer is a peer that maintains the ledger and chaincode, and basically all peers are committing peers.

See the official documentation below

  • fabric/v2.2/Types of peers Every peer node in a channel is a committing peer. It receives blocks of generated transactions, which are subsequently validated before they are committed to the peer node’s copy of the ledger as an append operation.

In other words, peer, whether endorsing or not, plays the role of a committing peer.

enter image description here

If you want to use a specific peer as a committing peer, set it in the connection-profile configure of fabric-sdk. (In this case peer used only as a committing peer, the peer has an endorsing function, but simply does not request endorsing.)

...
82:       peer3.magnetocorp.example.com:
83:         endorsingPeer: false
84:         chaincodeQuery: false
85:         ledgerQuery: true
86:         eventSource: true
...

  • [P.S] the peer type (committer, endorser) and role (leader, anchor) are different, so don't get confused.

Upvotes: 3

Related Questions