mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
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>
38 lines
892 B
JSON
38 lines
892 B
JSON
[
|
|
{
|
|
"name": "assetCollection",
|
|
"policy": "OR('Org1MSP.member', 'Org2MSP.member')",
|
|
"requiredPeerCount": 1,
|
|
"maxPeerCount": 1,
|
|
"blockToLive":1000000,
|
|
"memberOnlyRead": true,
|
|
"memberOnlyWrite": true,
|
|
"endorsementPolicy": {
|
|
"signaturePolicy":"OR('Org1MSP.member','Org2MSP.member')"
|
|
}
|
|
},
|
|
{
|
|
"name": "Org1MSPPrivateCollection",
|
|
"policy": "OR('Org1MSP.member')",
|
|
"requiredPeerCount": 0,
|
|
"maxPeerCount": 1,
|
|
"blockToLive":3,
|
|
"memberOnlyRead": true,
|
|
"memberOnlyWrite": false,
|
|
"endorsementPolicy": {
|
|
"signaturePolicy": "OR('Org1MSP.member')"
|
|
}
|
|
},
|
|
{
|
|
"name": "Org2MSPPrivateCollection",
|
|
"policy": "OR('Org2MSP.member')",
|
|
"requiredPeerCount": 0,
|
|
"maxPeerCount": 1,
|
|
"blockToLive":3,
|
|
"memberOnlyRead": true,
|
|
"memberOnlyWrite": false,
|
|
"endorsementPolicy": {
|
|
"signaturePolicy": "OR('Org2MSP.member')"
|
|
}
|
|
}
|
|
]
|