How to configure Endorsement policy in Hyperledger?

I am trying to implement Hyperledger Fabric on my system. I am not understanding how to configure the Endorsement policy for the Hyperledger Fabric. Can someone explain how to configure the endorsement policy?

Your comment on this question:

Email me at this address if a comment is added after mine:Email me if a comment is added after mine

Privacy: Your email address will only be used for sending these notifications.

2 answers to this question.

Your answer

Your name to display (optional):

Email me at this address if my answer is selected or commented on:Email me if my answer is selected or commented on

Privacy: Your email address will only be used for sending these notifications.

+1 vote

Best answer

The Hyperledger Fabric Endorsement policy is configured when the chaincode is instantiated. The Endorsement policies are configured as logical gate predicates. The rule for this logic gate is as follows:

EXPR(E[, E...]) where EXPR is AND or OR and E is either a principal (Org1.Admin, Org1.Member) or a nested expression EXPR(..)

Hi. I want to write a logic for the following case. I have two Organizations Org1 and Org2. I want either one of them to sign the transaction i.e., it is not necessary that both should sign the transaction. What is the logic for this?

You can also use nested logic. Suppose you want to request one signature from a member of the Org1 MSP or 1 signature from a member of the Org2 MSP and 1 signature from a member of the Org3 MSP. Then you can use the following logic:

Your comment on this answer:

Email me at this address if a comment is added after mine:Email me if a comment is added after mine

Privacy: Your email address will only be used for sending these notifications.

0 votes

Endorsement policy can be set by using the -P switch. When instantiating the chaincode, use the -P switch following by a Boolean logic representing which peer or organization has to sign the transaction.