How to change Endorsement policies

0 votes

I changed the endorsement policy from "OR" to "AND" with BYFN and instantiate the Chaincode. But, the data in the ledger is not changed even after the Invoke is executed. I confirmed "OR" condition is working.(data in the ledger is changed)

Kindly let me know how I can solve it.

peer chaincode instantiate -o orderer.example.com:7050 --tls $CORE_PEER_TLS_ENABLED --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.member','Org2MSP.member')"

==>

peer chaincode instantiate -o orderer.example.com:7050 --tls $CORE_PEER_TLS_ENABLED --cafile
Jul 18, 2018 in Blockchain by ariaholic
• 7,340 points
32 views

1 answer to this question.

0 votes

Well the good news is that it looks like the modified endorsement policy is actually working. The bad news is that it's not possible to use an endorsement policy with an AND condition in BYFN without creating your own client using one of the SDKs. The issue is that the BYFN script uses the peer CLI to run invoke (and query too) and the peer CLI does not have the ability to collect multiple endorsements. So when you change the endorsement policy to AND, the script is only collecting a single endorsement and therefore validation fails when trying to process the invoke

answered Jul 18, 2018 by charlie_brown
• 7,720 points

Related Questions In Blockchain

0 votes
1 answer

How can I change endorsement policies in hyperledger?

Well the good news is that it ...READ MORE

answered Jul 18, 2018 in Blockchain by Johnathon
• 9,080 points
189 views
0 votes
1 answer

How to change "gasLimit" on Azure private blockchain?

Before deploying your network on Azure you ...READ MORE

answered Jul 3, 2018 in Blockchain by Omkar
• 67,480 points
74 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
140 views
0 votes
1 answer
+1 vote
1 answer

Language in which cryptokitties is programmed?

Cryptokitties is built on the Ethereum network. The ...READ MORE

answered Mar 26, 2018 in Blockchain by Johnathon
• 9,080 points
22 views
0 votes
1 answer

How to store picture(s) in a hyperledger blockchain channel

You can hold images as encrypted characters ...READ MORE

answered Jun 16, 2018 in Blockchain by charlie_brown
• 7,720 points
145 views
0 votes
1 answer