Skip to content

Commit

Permalink
[FAB-9572] Fix README to match new version of BYFN
Browse files Browse the repository at this point in the history
Changed README.md to instruct user to edit byfn.sh instead
of docker-compose-cli file since this is where the standard
BFYN script is now run.
Also added missing Copyright notices.

Change-Id: Ib18afe8a23cc3874729031a82480aac5b0a2b555
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
  • Loading branch information
lehors committed Apr 24, 2018
1 parent 010fcb5 commit 146f7bc
Show file tree
Hide file tree
Showing 15 changed files with 91 additions and 3 deletions.
12 changes: 9 additions & 3 deletions high-throughput/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
Copyright IBM Corp All Rights Reserved
SPDX-License-Identifier: Apache-2.0
-->

# High-Throughput Network

## Purpose
Expand Down Expand Up @@ -106,9 +112,9 @@ and run some invocations are provided below.
`./scripts:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/` -->
`./../high-throughput/scripts/:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/`

* Finally, comment out the `command` section by placing a `#` before it, e.g.
`#command: /bin/bash -c './scripts/script.sh ${CHANNEL_NAME}; sleep $TIMEOUT'`
* Finally, comment out the `docker exec cli scripts/script.sh` command from the `byfn.sh` script by placing a `#` before it so that the standard BYFN end to end script doesn't run, e.g.

`# docker exec cli scripts/script.sh $CHANNEL_NAME $CLI_DELAY $LANGUAGE $CLI_TIMEOUT $VERBOSE`

3. We can now bring our network up by typing in `./byfn.sh -m up -c mychannel`
4. Open a new terminal window and enter the CLI container using `docker exec -it cli bash`, all operations on the network will happen within
Expand Down
4 changes: 4 additions & 0 deletions high-throughput/chaincode/high-throughput.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/*
* Copyright IBM Corp All Rights Reserved
*
* SPDX-License-Identifier: Apache-2.0
*
* Demonstrates how to handle data in an application with a high transaction volume where the transactions
* all attempt to change the same key-value pair in the ledger. Such an application will have trouble
* as multiple transactions may read a value at a certain version, which will then be invalid when the first
Expand Down
6 changes: 6 additions & 0 deletions high-throughput/scripts/channel-setup.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#
# Copyright IBM Corp All Rights Reserved
#
# SPDX-License-Identifier: Apache-2.0
#

ORDERER_CA=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem

# Channel creation
Expand Down
6 changes: 6 additions & 0 deletions high-throughput/scripts/delete-invoke.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
#
# Copyright IBM Corp All Rights Reserved
#
# SPDX-License-Identifier: Apache-2.0
#

peer chaincode invoke -o orderer.example.com:7050 --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n $CC_NAME -c '{"Args":["delete","'$1'"]}'

6 changes: 6 additions & 0 deletions high-throughput/scripts/get-invoke.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
#
# Copyright IBM Corp All Rights Reserved
#
# SPDX-License-Identifier: Apache-2.0
#

peer chaincode invoke -o orderer.example.com:7050 --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n $CC_NAME -c '{"Args":["get","'$1'"]}'

6 changes: 6 additions & 0 deletions high-throughput/scripts/get-traditional.sh
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
#
# Copyright IBM Corp All Rights Reserved
#
# SPDX-License-Identifier: Apache-2.0
#

peer chaincode invoke -o orderer.example.com:7050 --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n $CC_NAME -c '{"Args":["getstandard","'$1'"]}'
6 changes: 6 additions & 0 deletions high-throughput/scripts/install-chaincode.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#
# Copyright IBM Corp All Rights Reserved
#
# SPDX-License-Identifier: Apache-2.0
#

echo "========== Installing chaincode on peer0.org1 =========="
export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
export CORE_PEER_ADDRESS=peer0.org1.example.com:7051
Expand Down
6 changes: 6 additions & 0 deletions high-throughput/scripts/instantiate-chaincode.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#
# Copyright IBM Corp All Rights Reserved
#
# SPDX-License-Identifier: Apache-2.0
#

echo "========== Instantiating chaincode v$1 =========="
peer chaincode instantiate -o orderer.example.com:7050 --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n $CC_NAME -c '{"Args": []}' -v $1 -P "OR ('Org1MSP.member','Org2MSP.member')"

6 changes: 6 additions & 0 deletions high-throughput/scripts/many-updates-traditional.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#
# Copyright IBM Corp All Rights Reserved
#
# SPDX-License-Identifier: Apache-2.0
#

for (( i = 0; i < 1000; ++i ))
do
peer chaincode invoke -o orderer.example.com:7050 --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n $CC_NAME -c '{"Args":["putstandard","'$1'","'$i'"]}'
Expand Down
6 changes: 6 additions & 0 deletions high-throughput/scripts/many-updates.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#
# Copyright IBM Corp All Rights Reserved
#
# SPDX-License-Identifier: Apache-2.0
#

for (( i = 0; i < 1000; ++i ))
do
peer chaincode invoke -o orderer.example.com:7050 --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n $CC_NAME -c '{"Args":["update","'$1'","'$2'","'$3'"]}' &
Expand Down
6 changes: 6 additions & 0 deletions high-throughput/scripts/prunefast-invoke.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
#
# Copyright IBM Corp All Rights Reserved
#
# SPDX-License-Identifier: Apache-2.0
#

peer chaincode invoke -o orderer.example.com:7050 --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n $CC_NAME -c '{"Args":["prunefast","'$1'"]}'

6 changes: 6 additions & 0 deletions high-throughput/scripts/prunesafe-invoke.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
#
# Copyright IBM Corp All Rights Reserved
#
# SPDX-License-Identifier: Apache-2.0
#

peer chaincode invoke -o orderer.example.com:7050 --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n $CC_NAME -c '{"Args":["prunesafe","'$1'"]}'

6 changes: 6 additions & 0 deletions high-throughput/scripts/setclienv.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
#
# Copyright IBM Corp All Rights Reserved
#
# SPDX-License-Identifier: Apache-2.0
#

export CHANNEL_NAME=mychannel
export CC_NAME=bigdatacc
6 changes: 6 additions & 0 deletions high-throughput/scripts/update-invoke.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
#
# Copyright IBM Corp All Rights Reserved
#
# SPDX-License-Identifier: Apache-2.0
#

peer chaincode invoke -o orderer.example.com:7050 --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n $CC_NAME -c '{"Args":["update","'$1'","'$2'","'$3'"]}'

6 changes: 6 additions & 0 deletions high-throughput/scripts/upgrade-chaincode.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#
# Copyright IBM Corp All Rights Reserved
#
# SPDX-License-Identifier: Apache-2.0
#

echo "========== Upgrade chaincode to version $1 =========="
peer chaincode upgrade -o orderer.example.com:7050 --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n $CC_NAME -c '{"Args": []}' -v $1 -P "OR ('Org1MSP.member','Org2MSP.member')"

0 comments on commit 146f7bc

Please sign in to comment.