0

I've created a network with 2orgs each one with 1peer and 1ca

After setting the EnableNodeOUs:true, I instantiate the contract with "AND ('Org1MSP.peer','Org2MSP.peer')" which works fine. Same for "AND ('Org1MSP.member','Org2MSP.member')".

But after setting the policy to "AND ('Org1MSP.client','Org2MSP.client')" these errors occurs:

peer0.org2.example.com|2020-01-30 07:21:49.745 UTC [vscc] Validate -> ERRO 07c VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for chaincode mycc in tx 9:0 failed: signature set did not satisfy policy
peer0.org2.example.com|2020-01-30 07:21:49.745 UTC [committer.txvalidator] validateTx -> ERRO 07d VSCCValidateTx for transaction txId = fd5124b081e92586f091f54e517030ebaeb28fddc71428df32c82cce636a94cd returned error: validation of endorsement policy for chaincode mycc in tx 9:0 failed: signature set did not satisfy policy
peer0.org1.example.com|2020-01-30 07:21:49.745 UTC [vscc] Validate -> ERRO 086 VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for chaincode mycc in tx 9:0 failed: signature set did not satisfy policy
peer0.org1.example.com|2020-01-30 07:21:49.745 UTC [committer.txvalidator] validateTx -> ERRO 087 VSCCValidateTx for transaction txId = fd5124b081e92586f091f54e517030ebaeb28fddc71428df32c82cce636a94cd returned error: validation of endorsement policy for chaincode mycc in tx 9:0 failed: signature set did not satisfy policy

That's my config.yml file for the NodeOUs

NodeOUs:
  Enable: true
  ClientOUIdentifier:
    Certificate: cacerts/ca.org1.example.com-cert.pem
    OrganizationalUnitIdentifier: client
  PeerOUIdentifier:
    Certificate: cacerts/ca.org1.example.com-cert.pem
    OrganizationalUnitIdentifier: peer
  AdminOUIdentifier:
    Certificate: cacerts/ca.org1.example.com-cert.pem
    OrganizationalUnitIdentifier: admin
  OrdererOUIdentifier:
    Certificate: cacerts/ca.org1.example.com-cert.pem
    OrganizationalUnitIdentifier: orderer

Thanks in advance

1 Answers1

0

The identity type with which you are submitting the initiation transaction is 'admin', as mentioned in the comment. However, your policy requires the identity type to be 'client'. Thus, the error.

To resolve, you'll need to create identity with identity type as 'client' and use that identity's msp to submit the initiation transaction.

Mrudav Shukla
  • 708
  • 1
  • 7
  • 25
  • after enabling the NodeOUs aren't all the identities the same according to the config.yml in the msp file of the admin. I will edit it in my question so you can take a look – Giorgos Niotis Feb 01 '20 at 23:32
  • that's what I got from the answer on this post:https://stackoverflow.com/questions/58113015/hyperledger-fabric-cryptgen-tool-not-creating-the-admincerts – Giorgos Niotis Feb 01 '20 at 23:45
  • if I got it wrong how do i generate a client identity using the cryptogen tool? – Giorgos Niotis Feb 01 '20 at 23:46