Correct the private data collection information

For the asset transfer example (https://hyperledger-fabric.readthedocs.io/en/release-2.5/private_data_tutorial.html#pd-use-case)
the are three private data collections, one per org and one shared between the orgs.

The shared collection didn't have an endorsement policy so inheritted the chaincodes; this was specifically set away from the default
to be OR(Org1MSP,Org2MSP).   The documentation says this is to ensure that either organization can create and asset.

However this isn't really necassary, the endorsement policy should be lowest level; so this PR moves the endorsement policy to
the collection.  The documentation does I believe lead to a false understanding

Signed-off-by: Matthew B White <whitemat@uk.ibm.com>
This commit is contained in:
Matthew B White 2023-01-31 09:32:20 +00:00 committed by Dave Enyeart
parent 75b8419113
commit 67ae2c9d02
3 changed files with 9 additions and 3 deletions

View file

@ -6,7 +6,10 @@
"maxPeerCount": 1,
"blockToLive":1000000,
"memberOnlyRead": true,
"memberOnlyWrite": true
"memberOnlyWrite": true,
"endorsementPolicy": {
"signaturePolicy":"OR('Org1MSP.member','Org2MSP.member')"
}
},
{
"name": "Org1MSPPrivateCollection",

View file

@ -6,7 +6,10 @@
"maxPeerCount": 1,
"blockToLive":1000000,
"memberOnlyRead": true,
"memberOnlyWrite": true
"memberOnlyWrite": true,
"endorsementPolicy": {
"signaturePolicy":"OR('Org1MSP.member','Org2MSP.member')"
}
},
{
"name": "Org1MSPPrivateCollection",

View file

@ -15,7 +15,7 @@ function createNetwork() {
print "Creating network"
./network.sh up createChannel -ca -s couchdb
print "Deploying ${CHAINCODE_NAME} chaincode"
./network.sh deployCC -ccn "${CHAINCODE_NAME}" -ccp "${CHAINCODE_PATH}/chaincode-${CHAINCODE_LANGUAGE}" -ccv 1 -ccs 1 -ccl "${CHAINCODE_LANGUAGE}" -ccep "OR('Org1MSP.peer','Org2MSP.peer')" -cccg ../asset-transfer-private-data/chaincode-go/collections_config.json
./network.sh deployCC -ccn "${CHAINCODE_NAME}" -ccp "${CHAINCODE_PATH}/chaincode-${CHAINCODE_LANGUAGE}" -ccv 1 -ccs 1 -ccl "${CHAINCODE_LANGUAGE}" -cccg ../asset-transfer-private-data/chaincode-go/collections_config.json
}
function stopNetwork() {