peer endorsement policy not working hyperledger fabric

情到浓时终转凉″ 提交于 2019-12-24 15:09:10

问题


I am trying to enforce simple endorsement policy for 2 org network. Here is my crypto-config.yaml

OrdererOrgs:
  - Name: Orderer
    Domain: example.com
    Specs:
      - Hostname: orderer
PeerOrgs:
  - Name: Org1
    Domain: org1.example.com
    EnableNodeOUs: true
    # CA:
    #   OrganizationalUnit: peer
    Template:
      Count: 1
    Users:
      Count: 1
  - Name: Org2
    Domain: org2.example.com
    EnableNodeOUs: true
    # CA:
    #   OrganizationalUnit: peer
    Template:
      Count: 1
    Users:
      Count: 1

And i can see OU as peer in both peers.

peer0.org2.example.com  
Identity: peer0.org2.example.com  
Verified by: ca.org2.example.com  
Expires: Saturday 23 December 2028 

Subject Name

C (Country):    US  
ST (State): California  
L (Locality):   San Francisco  
OU (Organizational Unit):   peer  
CN (Common Name):   peer0.org2.example.com 

endorsement policy for member check works

peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -n chaincode -l node -v v0 -c '{"args":["init"]}' -P "AND('Org1MSP.member', 'Org2MSP.member')"  

but endorsement policy for peer check not working

peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -n chaincode -l node -v v0 -c '{"args":["init"]}' -P "AND('Org1MSP.peer', 'Org2MSP.peer')"  

When i invoke any function.

Transaction failed to be committed to the ledger due to ::ENDORSEMENT_POLICY_FAILURE

even "OR('Org1MSP.peer', 'Org2MSP.peer')" not working

来源:https://stackoverflow.com/questions/53928135/peer-endorsement-policy-not-working-hyperledger-fabric

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!