Skip to content

Commit 1fe931c

Browse files
author
Matthias Neugschwandtner
committed
[FAB-3321] Documentation for chaincode installation
One paragraph to describe the extra -i option for chaincode installation to add an instantiation policy. Change-Id: I2e60415f4603db48b0c91da579665ed6d820bbc0 Signed-off-by: Matthias Neugschwandtner <[email protected]>
1 parent efd9307 commit 1fe931c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docs/source/cc-packaging-and-signing.rst

+8-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The package is created and signed using the command
3737

3838
::
3939

40-
peer chaincode package -n mycc -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -v 0 -s -S ccpack.out
40+
peer chaincode package -n mycc -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -v 0 -s -S -i "AND('OrgA.admin')" ccpack.out
4141

4242
where ``-s`` specifies creating the package as opposed to generating raw
4343
ChaincodeDeploymentSpec ``-S`` specifies instructs to sign the package
@@ -48,6 +48,13 @@ The ``-S`` option is optional. However if a package is created without a
4848
signature, it cannot be signed by any other owner using the
4949
``signpackage`` command in the next section.
5050

51+
The ``-i`` option is optional. It allows specifying an instantiation policy
52+
for the chaincode. The instantiation policy has the same format as an
53+
endorsement policy and specifies who can instantiate the chaincode. In the
54+
example above, only the admin of OrgA is allowed to instantiate the chaincode.
55+
If no policy is provided, the default policy is used, which only allows the
56+
admin of the peer's MSP to instantiate chaincode.
57+
5158
Package signing
5259
---------------
5360

0 commit comments

Comments
 (0)