Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My local branch #2222

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source/channel_update_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ use the ``test-network`` script to deploy the Basic chaincode:
.. code:: bash

cd fabric-samples/test-network
./network.sh deployCC -ccn basic -ccl go
./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-go/ -ccl go

The script will install the Basic chaincode on the Org1 and Org2 peers, approve
the chaincode definition for Org1 and Org2, and then commit the chaincode
Expand Down
2 changes: 1 addition & 1 deletion docs/source/couchdb_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ Run the following command to deploy the smart contract to `mychannel`:

.. code:: bash

./network.sh deployCC -ccn ledger -ccep "OR('Org1MSP.peer','Org2MSP.peer')"
./network.sh deployCC -ccn ledger -ccp ../asset-transfer-ledger-queries/chaincode-go/ -ccep "OR('Org1MSP.peer','Org2MSP.peer')"

Note that we are using the `-ccep` flag to deploy the smart contract with an endorsement policy of
`"OR('Org1MSP.peer','Org2MSP.peer')"`. This allows either organization to create an asset without
Expand Down
2 changes: 1 addition & 1 deletion docs/source/create_channel/create_channel.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ Blockchain info: {"height":3,"currentBlockHash":"eBpwWKTNUgnXGpaY2ojF4xeP3bWdjlP

We can confirm that the channel was created successfully by deploying a chaincode to the channel. We can use the `network.sh` script to deploy the Basic asset transfer chaincode to any test network channel. Deploy a chaincode to our new channel using the following command:
```
./network.sh deployCC --ccn basic -c channel1 --cci InitLedger
./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-go/ -c channel1 --cci InitLedger
```

After you run the command, you should see the chaincode being deployed to the channel in your logs. The chaincode is invoked to add data to the channel ledger.
Expand Down
1 change: 1 addition & 0 deletions docs/source/private_data_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ to package the marbles chaincode.

The test network includes two organizations, Org1 and Org2, with one peer each.
Therefore, the chaincode package has to be installed on two peers:
./network.sh deployCC -ccn private -ccp ../asset-transfer-private-data/chaincode-go/ -ccep "OR('Org1MSP.peer','Org2MSP.peer')" -cccg ../asset-transfer-private-data/chaincode-go/collections_config.json

- peer0.org1.example.com
- peer0.org2.example.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ The script will deploy the nodes of the network and create a single channel name

You can use the test network script to deploy the secured asset transfer smart contract to the channel. Run the following command to deploy the smart contract to `mychannel`:
```
./network.sh deployCC -ccn secured -ccep "OR('Org1MSP.peer','Org2MSP.peer')"
./network.sh deployCC -ccn secured -ccp ../asset-transfer-secured-agreement/chaincode-go/ -ccep "OR('Org1MSP.peer','Org2MSP.peer')"
```

Note that we are using the `-ccep` flag to deploy the smart contract with an endorsement policy of `"OR('Org1MSP.peer','Org2MSP.peer')"`. This allows either organization to create an asset without receiving an endorsement from the other organization.
Expand Down
31 changes: 19 additions & 12 deletions docs/source/test_network.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,23 @@ Usage:
-c <channel name> - channel name to use (defaults to "mychannel")
-s <dbtype> - the database backend to use: goleveldb (default) or couchdb
-r <max retry> - CLI times out after certain number of attempts (defaults to 5)
-d <delay> - delay duration in seconds (defaults to 3)
-ccn <name> - the short name of the chaincode to deploy: basic (default),ledger, private, secured
-ccl <language> - the programming language of the chaincode to deploy: go (default), java, javascript, typescript
-ccv <version> - chaincode version. 1.0 (default)
-ccs <sequence> - chaincode definition sequence. Must be an integer, 1 (default), 2, 3, etc
-ccp <path> - Optional, chaincode path. Path to the chaincode. When provided the -ccn will be used as the deployed name and not the short name of the known chaincodes.
-cci <fcn name> - Optional, chaincode init required function to invoke. When provided this function will be invoked after deployment of the chaincode and will define the chaincode as initialization required.
-i <imagetag> - the tag to be used to launch the network (defaults to "latest")
-cai <ca_imagetag> - the image tag to be used for CA (defaults to "latest")
-verbose - verbose mode
-h - print this message
-d <delay> - CLI delays for a certain number of seconds (defaults to 3)
-i <imagetag> - Docker image tag of Fabric to deploy (defaults to "latest")
-cai <ca_imagetag> - Docker image tag of Fabric CA to deploy (defaults to "latest")
-verbose - Verbose mode

Used with network.sh deployCC
-c <channel name> - Name of channel to deploy chaincode to
-ccn <name> - Chaincode name.
-ccl <language> - Programming language of the chaincode to deploy: go (default), java, javascript, typescript
-ccv <version> - Chaincode version. 1.0 (default), v2, version3.x, etc
-ccs <sequence> - Chaincode definition sequence. Must be an integer, 1 (default), 2, 3, etc
-ccp <path> - File path to the chaincode.
-ccep <policy> - (Optional) Chaincode endorsement policy using signature policy syntax. The default policy requires an endorsement from Org1 and Org2
-cccg <collection-config> - (Optional) File path to private data collections configuration file
-cci <fcn name> - (Optional) Name of chaincode initialization function. When a function is provided, the execution of init will be requested and the function will be invoked.

-h - Print this message

Possible Mode and flag combinations
up -ca -c -r -d -s -i -verbose
Expand All @@ -77,7 +83,8 @@ Usage:
Examples:
network.sh up createChannel -ca -c mychannel -s couchdb -i 2.0.0
network.sh createChannel -c channelName
network.sh deployCC -ccn basic -ccl javascript
network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-javascript/ -ccl javascript
network.sh deployCC -ccn mychaincode -ccp ./user/mychaincode -ccv 1 -ccl javascript
```

From inside the `test-network` directory, run the following command to remove
Expand Down
2 changes: 1 addition & 1 deletion docs/source/write_first_app.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Next, let's deploy the chaincode by calling the ``./network.sh`` script with the

.. code:: bash

./network.sh deployCC -ccn basic -ccl javascript
./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-javascript/ -ccl javascript

.. note:: Behind the scenes, this script uses the chaincode lifecycle to package, install,
query installed chaincode, approve chaincode for both Org1 and Org2, and finally commit the chaincode.
Expand Down