1

In Hyperledger Fabric, we have the endorsement policy specified at chain code instantiate time. For example,

peer chaincode instantiate -o orderer.example.com:7050 --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n mycc -v 1.0 -c '{"Args":["init","a", "100", "b","200"]}' -P "OR ('Org1MSP.peer','Org2MSP.peer')"

From above code, I understand, a peer in org1 or a peer in org2 can endorse the transactions those are defined in chain code, i.e., the endorsement policy is at chain code level.

Is there any way to specify endorsement policy at transaction level? For example, only 1 or 2 transactions defined in chain code, a peer in Org1 need to endorse.

Krupakar
  • 39
  • 5

1 Answers1

2

In Fabric v1.0 and v1.1, endorsement policy is scoped to the channel / chaincode level (meaning the same chaincode on two different channels can have different endorsement policies).

There is a new feature in development we call "state-based endorsement" which will allow you to set the endorsement policy for individual states (keys). It is currently targeted for the next release. For more details on the feature, you can take a look at the JIRA item.

Gari Singh
  • 11,418
  • 2
  • 18
  • 41