Uploaded image for project: 'Fabric SDK Java'
  1. Fabric SDK Java
  2. FABJ-267

Java SDK - Pass private data collection definitions during chaincode instantiation

    XMLWordPrintable

Details

    • Story
    • Status: Closed
    • Medium
    • Resolution: Done
    • None
    • v1.2.0
    • None

    Description

      Gerrit CR https://gerrit.hyperledger.org/r/#/c/22091/

      Java SDK - Pass private data collection definitions during chaincode instantiation.

      When using CLI, this is done by passing a JSON file which includes collection definition:

      --collections-config collections.json

      Where a sample JSON file content is:

      [
       {
           "name": "collectionMarbles",
           "policy": "OR('Org1MSP.member', 'Org2MSP.member')",
           "requiredPeerCount": 1,
           "maxPeerCount": 2,
           "blockToLive":1000000
      },
       {
           "name": "collectionMarblePrivateDetails",
           "policy": "OR('Org1MSP.member')",
           "requiredPeerCount": 1,
           "maxPeerCount": 1,
           "blockToLive":3
       }
      ]

       
      CLI passes collection config upon chaincode instantiate, see: https://gerrit.hyperledger.org/r/#/c/14371/
       
      In CLI, collection JSON is converted to CollectionConfigPackage proto:
      https://github.com/hyperledger/fabric/blob/release-1.1/protos/common/collection.proto#L16-L50
      and then marshaled and passed to LSCC as an argument.
       
      LSCC accepts collection config as an argument and stores it, see: https://gerrit.hyperledger.org/r/#/c/14291/
       

      Attachments

        Issue Links

          Activity

            People

              rickr Rick Rine
              denyeart David Enyeart
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: