Re: Inconsistent Explicit Private Data Collection in Fabric 2.0 #fabric-sdk-node #fabric-chaincode #policies


David Enyeart
 

See the messages from yesterday:
https://lists.hyperledger.org/g/fabric/topic/77728065#9183

People hit this often enough that I think we should extend the error message with some more details and suggestions.


Dave Enyeart

sanjaysk9607---10/23/2020 03:55:17 PM---I started the network with an explicit collection-config file consisting of three collections as fol

From: sanjaysk9607@...
To: fabric@...
Date: 10/23/2020 03:55 PM
Subject: [EXTERNAL] [Hyperledger Fabric] Inconsistent Explicit Private Data Collection in Fabric 2.0 #fabric-sdk-node #fabric-chaincode #policies
Sent by: fabric@...





I started the network with an explicit collection-config file consisting of three collections as follows:

      [
      {
      "name": "collectionCommon",
      "policy": "OR('Org1MSP.member', 'Org2MSP.member')",
      "requiredPeerCount": 0,
      "maxPeerCount": 2,
      "blockToLive": 1000000,
      "memberOnlyRead": true,
      "memberOnlyWrite": true
      },
      {
      "name": "collectionOrg1",
      "policy": "OR('Org1MSP.member')",
      "requiredPeerCount": 1,
      "maxPeerCount": 2,
      "blockToLive": 0,
      "memberOnlyRead": true,
      "memberOnlyWrite": true
      },
      {
      "name": "collectionOrg2",
      "policy": "OR('Org2MSP.member')",
      "requiredPeerCount": 1,
      "maxPeerCount": 2,
      "blockToLive": 0,
      "memberOnlyRead": true,
      "memberOnlyWrite": true
      }
      ]

And I followed the tutorial as per the official documentation in terms of mentioning collection-config and signature policies while launching the network. When I try to invoke data using a rest API via Fabric-sdk-node client , the transaction becomes inconsistent sometimes with the error as follows:
      "No valid responses from any peers. Errors:\n peer=peer0.org2.example.com:9051, status=500, message=Failed to read. GET_STATE failed: transaction ID: ad38a04105ae889f614e74db9975c35d93b0d4ea13301d66e5fbdd7cd4077a19: private data matching public hash version is not available. Public hash version = {BlockNum: 73, TxNum: 0}, Private data version = <nil>"

Any suggestions on how to overcome this?






Join fabric@lists.hyperledger.org to automatically receive all group messages.