Added First Network Example From Hyperledger Fabric Samples, If everything works fine, and you will see an ‘End’ Message , that means Dev Environment set up correctly.
Follow this tutorial , Really Good !
Run your First Network
root@BlockChainHLF:~/work/hlf/fabric-samples/first-network# ./byfn.sh –help
Usage:
byfn.sh up|down|restart|generate|upgrade [-c ] [-t ] [-d ] [-f ] [-s ] [-i ]
byfn.sh -h|–help (print this message)
<mode> – one of ‘up’, ‘down’, ‘restart’ or ‘generate’
– ‘up’ – bring up the network with docker-compose up
– ‘down’ – clear the network with docker-compose down
– ‘restart’ – restart the network
– ‘generate’ – generate required certificates and genesis block
– ‘upgrade’ – upgrade the network from v1.0.x to v1.1
-c – channel name to use (defaults to “mychannel”)
-t <timeout> – CLI timeout duration in seconds (defaults to 10)
-d <delay> – delay duration in seconds (defaults to 3)
-f <docker-compose-file> – specify which docker-compose file use (defaults to docker-compose-cli.yaml)
-s – the database backend to use: goleveldb (default) or couchdb
-l – the chaincode language: golang (default) or node
-i – the tag to be used to launch the network (defaults to “latest”)
Typically, one would first generate the required certificates and
genesis block, then bring up the network. e.g.:
byfn.sh generate -c mychannel
byfn.sh up -c mychannel -s couchdb
byfn.sh up -c mychannel -s couchdb -i 1.1.0-alpha
byfn.sh up -l node
byfn.sh down -c mychannel
byfn.sh upgrade -c mychannel
Taking all defaults:
byfn.sh generate
byfn.sh up
byfn.sh down
root@BlockChainHLF:~/work/hlf/fabric-samples/first-network#
‘generate’ – generate required certificates and genesis block
root@BlockChainHLF:~/work/hlf/fabric-samples/first-network# ./byfn.sh -m generate
Generating certs and genesis block for with channel ‘mychannel’ and CLI timeout of ’10’ seconds and CLI delay of ‘3’ seconds
Continue? [Y/n] Y
proceeding …
/root/work/hlf/fabric-samples/first-network/../bin/cryptogen
##########################################################
##### Generate certificates using cryptogen tool #########
##########################################################
+ cryptogen generate –config=./crypto-config.yaml
org1.example.com
org2.example.com
+ res=0
+ set +x
/root/work/hlf/fabric-samples/first-network/../bin/configtxgen
##########################################################
######### Generating Orderer Genesis block ##############
##########################################################
+ configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block
2018-04-21 10:16:26.368 UTC [common/tools/configtxgen] main -> INFO 001 Loading configuration
2018-04-21 10:16:26.408 UTC [msp] getMspConfig -> INFO 002 Loading NodeOUs
2018-04-21 10:16:26.409 UTC [msp] getMspConfig -> INFO 003 Loading NodeOUs
2018-04-21 10:16:26.410 UTC [common/tools/configtxgen] doOutputBlock -> INFO 004 Generating genesis block
2018-04-21 10:16:26.411 UTC [common/tools/configtxgen] doOutputBlock -> INFO 005 Writing genesis block
+ res=0
+ set +x
#################################################################
### Generating channel configuration transaction ‘channel.tx’ ###
#################################################################
+ configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID mychannel
2018-04-21 10:16:26.452 UTC [common/tools/configtxgen] main -> INFO 001 Loading configuration
2018-04-21 10:16:26.479 UTC [common/tools/configtxgen] doOutputChannelCreateTx -> INFO 002 Generating new channel configtx
2018-04-21 10:16:26.481 UTC [msp] getMspConfig -> INFO 003 Loading NodeOUs
2018-04-21 10:16:26.482 UTC [msp] getMspConfig -> INFO 004 Loading NodeOUs
2018-04-21 10:16:26.528 UTC [common/tools/configtxgen] doOutputChannelCreateTx -> INFO 005 Writing new channel tx
+ res=0
+ set +x
#################################################################
####### Generating anchor peer update for Org1MSP ##########
#################################################################
+ configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors.tx -channelID mychannel -asOrg Org1MSP
2018-04-21 10:16:26.621 UTC [common/tools/configtxgen] main -> INFO 001 Loading configuration
2018-04-21 10:16:26.642 UTC [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update
2018-04-21 10:16:26.643 UTC [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 003 Writing anchor peer update
+ res=0
+ set +x
#################################################################
####### Generating anchor peer update for Org2MSP ##########
#################################################################
+ configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org2MSPanchors.tx -channelID mychannel -asOrg Org2MSP
2018-04-21 10:16:26.687 UTC [common/tools/configtxgen] main -> INFO 001 Loading configuration
2018-04-21 10:16:26.709 UTC [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update
2018-04-21 10:16:26.710 UTC [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 003 Writing anchor peer update
+ res=0
+ set +x
Up the Bring Your First Network (BYFN)
root@BlockChainHLF:~/work/hlf/fabric-samples/first-network# ./byfn.sh -m up
Starting with channel ‘mychannel’ and CLI timeout of ’10’ seconds and CLI delay of ‘3’ seconds
Continue? [Y/n] Y
proceeding …
2018-04-21 10:29:40.724 UTC [main] main -> INFO 001 Exiting…..
LOCAL_VERSION=1.1.0
DOCKER_IMAGE_VERSION=1.1.0
Creating network “net_byfn” with the default driver
Creating volume “net_peer0.org2.example.com” with default driver
Creating volume “net_peer1.org2.example.com” with default driver
Creating volume “net_peer1.org1.example.com” with default driver
Creating volume “net_peer0.org1.example.com” with default driver
Creating volume “net_orderer.example.com” with default driver
Creating peer0.org2.example.com
Creating peer1.org1.example.com
Creating peer0.org1.example.com
Creating orderer.example.com
Creating peer1.org2.example.com
Creating cli
____ _____ _ ____ _____
/ ___| |_ _| / \ | _ \ |_ _|
\___ \ | | / _ \ | |_) | | |
___) | | | / ___ \ | _ < | |
|____/ /_/ \_\
\_\
Build your first network (BYFN) end-to-end test
Channel name : mychannel
Creating channel…
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org1MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=INFO
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
+ peer channel create -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/channel.tx –tls true –cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
+ res=0
+ set +x
2018-04-21 10:29:48.146 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-04-21 10:29:48.238 UTC [channelCmd] InitCmdFactory -> INFO 002 Endorser and orderer connections initialized
2018-04-21 10:29:48.450 UTC [main] main -> INFO 003 Exiting…..
==Channel “mychannel” is created successfully ==
Having all peers join the channel…
+ peer channel join -b mychannel.block
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org1MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=INFO
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
+ res=0
+ set +x
2018-04-21 10:29:48.579 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-04-21 10:29:48.691 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
2018-04-21 10:29:48.691 UTC [main] main -> INFO 003 Exiting…..
= peer0.org1 joined on the channel “mychannel” =
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org1MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=INFO
CORE_PEER_ADDRESS=peer1.org1.example.com:7051
+ peer channel join -b mychannel.block
+ res=0
+ set +x
2018-04-21 10:29:51.830 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-04-21 10:29:51.970 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
2018-04-21 10:29:51.970 UTC [main] main -> INFO 003 Exiting…..
= peer1.org1 joined on the channel “mychannel” =
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org2MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=INFO
CORE_PEER_ADDRESS=peer0.org2.example.com:7051
+ peer channel join -b mychannel.block
+ res=0
+ set +x
2018-04-21 10:29:55.253 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-04-21 10:29:55.437 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
2018-04-21 10:29:55.437 UTC [main] main -> INFO 003 Exiting…..
=peer0.org2 joined on the channel “mychannel” =
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org2MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=INFO
CORE_PEER_ADDRESS=peer1.org2.example.com:7051
+ peer channel join -b mychannel.block
+ res=0
+ set +x
2018-04-21 10:29:58.688 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-04-21 10:29:58.931 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
2018-04-21 10:29:58.931 UTC [main] main -> INFO 003 Exiting…..
=peer1.org2 joined on the channel “mychannel” =
Updating anchor peers for org1…
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org1MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=INFO
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
+ peer channel update -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/Org1MSPanchors.tx –tls true –cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
+ res=0
+ set +x
2018-04-21 10:30:02.185 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-04-21 10:30:02.243 UTC [channelCmd] update -> INFO 002 Successfully submitted channel update
2018-04-21 10:30:02.243 UTC [main] main -> INFO 003 Exiting…..
= Anchor peers for org “Org1MSP” on “mychannel” is updated successfully =
Updating anchor peers for org2…
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org2MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=INFO
CORE_PEER_ADDRESS=peer0.org2.example.com:7051
+ peer channel update -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/Org2MSPanchors.tx –tls true –cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
+ res=0
+ set +x
2018-04-21 10:30:05.435 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-04-21 10:30:05.493 UTC [channelCmd] update -> INFO 002 Successfully submitted channel update
2018-04-21 10:30:05.493 UTC [main] main -> INFO 003 Exiting…..
= Anchor peers for org “Org2MSP” on “mychannel” is updated successfully =
Installing chaincode on peer0.org1…
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org1MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=INFO
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
+ peer chaincode install -n mycc -v 1.0 -l golang -p github.com/chaincode/chaincode_example02/go/
+ res=0
+ set +x
2018-04-21 10:30:08.654 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2018-04-21 10:30:08.654 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
2018-04-21 10:30:10.649 UTC [main] main -> INFO 003 Exiting…..
= Chaincode is installed on peer0.org1 =
Install chaincode on peer0.org2…
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org2MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=INFO
CORE_PEER_ADDRESS=peer0.org2.example.com:7051
+ peer chaincode install -n mycc -v 1.0 -l golang -p github.com/chaincode/chaincode_example02/go/
+ res=0
+ set +x
2018-04-21 10:30:11.043 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2018-04-21 10:30:11.043 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
2018-04-21 10:30:11.908 UTC [main] main -> INFO 003 Exiting…..
= Chaincode is installed on peer0.org2 =
Instantiating chaincode on peer0.org2…
+ peer chaincode instantiate -o orderer.example.com:7050 –tls true –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 mychannel -n mycc -l golang -v 1.0 -c ‘{“Args”:[“init”,”a”,”100″,”b”,”200″]}’ -P ‘OR (‘\”Org1MSP.peer’\”,’\”Org2MSP.peer’\”)’
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org2MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=INFO
CORE_PEER_ADDRESS=peer0.org2.example.com:7051
+ res=0
+ set +x
2018-04-21 10:30:12.134 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2018-04-21 10:30:12.134 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
2018-04-21 10:30:59.122 UTC [main] main -> INFO 003 Exiting…..
= Chaincode Instantiation on peer0.org2 on channel ‘mychannel’ is successful =
Querying chaincode on peer0.org1…
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org1MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=INFO
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
=Querying on peer0.org1 on channel ‘mychannel’… =
+ peer chaincode query -C mychannel -n mycc -c ‘{“Args”:[“query”,”a”]}’
Attempting to Query peer0.org1 …3 secs
+ res=0
+ set +x
2018-04-21 10:31:02.301 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2018-04-21 10:31:02.301 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
Query Result: 100
2018-04-21 10:31:44.396 UTC [main] main -> INFO 003 Exiting…..
=Query on peer0.org1 on channel ‘mychannel’ is successful =
Sending invoke transaction on peer0.org1…
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org1MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=INFO
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
+ peer chaincode invoke -o orderer.example.com:7050 –tls true –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 mychannel -n mycc -c ‘{“Args”:[“invoke”,”a”,”b”,”10″]}’
+ res=0
+ set +x
2018-04-21 10:31:44.604 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2018-04-21 10:31:44.605 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
2018-04-21 10:31:44.654 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 003 Chaincode invoke successful. result: status:200
2018-04-21 10:31:44.655 UTC [main] main -> INFO 004 Exiting…..
=Invoke transaction on peer0.org1 on channel ‘mychannel’ is successful =
Installing chaincode on peer1.org2…
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org2MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=INFO
CORE_PEER_ADDRESS=peer1.org2.example.com:7051
+ peer chaincode install -n mycc -v 1.0 -l golang -p github.com/chaincode/chaincode_example02/go/
+ res=0
+ set +x
2018-04-21 10:31:44.799 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2018-04-21 10:31:44.800 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
2018-04-21 10:31:45.357 UTC [main] main -> INFO 003 Exiting…..
= Chaincode is installed on peer1.org2 =
Querying chaincode on peer1.org2…
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org2MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=INFO
CORE_PEER_ADDRESS=peer1.org2.example.com:7051
=Querying on peer1.org2 on channel ‘mychannel’… =
+ peer chaincode query -C mychannel -n mycc -c ‘{“Args”:[“query”,”a”]}’
Attempting to Query peer1.org2 …3 secs
+ res=0
+ set +x
2018-04-21 10:31:48.567 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2018-04-21 10:31:48.567 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
Query Result: 90
2018-04-21 10:32:31.807 UTC [main] main -> INFO 003 Exiting…..
= Query on peer1.org2 on channel ‘mychannel’ is successful =
========= All GOOD, BYFN execution completed ===========
_____ _ _ ____
| ____| | \ | | | _ \
| _| | \| | | | | |
| |___ | |\ | | |
|_____| \_| |____/
root@BlockChainHLF:~/work/hlf/fabric-samples/first-network#
