HyperLedger Run Your First Network BYFN

This post has shown detailed output logs which comes on Run Your First Network BYFN (Bring your first network) HyperLedger Fabric, Its objective to have a serious view, read of steps shown to bring the first blockchain network.

 

esumits-MacBook-Pro:first-network esumit$ ./byfn.sh up -s couchdb -c myc

Starting with channel ‘myc’ and CLI timeout of ’10’ seconds and CLI delay of ‘3’ seconds and using database ‘couchdb’

Continue? [Y/n] Y

proceeding …

2018-06-10 07:34:31.371 UTC [main] main -> INFO 001 Exiting…..

LOCAL_VERSION=1.1.0

DOCKER_IMAGE_VERSION=1.1.0

/Users/esumit/go/src/github.com/hyperledger/fabric-samples/first-network/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

/Users/esumit/go/src/github.com/hyperledger/fabric-samples/first-network/fabric-samples/first-network/../bin/configtxgen

##########################################################

#########  Generating Orderer Genesis block ##############

##########################################################

+ configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block

2018-06-10 17:33:59.844 AEST [common/tools/configtxgen] main -> INFO 001 Loading configuration

2018-06-10 17:33:59.854 AEST [msp] getMspConfig -> INFO 002 Loading NodeOUs

2018-06-10 17:33:59.855 AEST [msp] getMspConfig -> INFO 003 Loading NodeOUs

2018-06-10 17:33:59.856 AEST [common/tools/configtxgen] doOutputBlock -> INFO 004 Generating genesis block

2018-06-10 17:33:59.856 AEST [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 myc

2018-06-10 17:33:59.877 AEST [common/tools/configtxgen] main -> INFO 001 Loading configuration

2018-06-10 17:33:59.885 AEST [common/tools/configtxgen] doOutputChannelCreateTx -> INFO 002 Generating new channel configtx

2018-06-10 17:33:59.886 AEST [msp] getMspConfig -> INFO 003 Loading NodeOUs

2018-06-10 17:33:59.887 AEST [msp] getMspConfig -> INFO 004 Loading NodeOUs

2018-06-10 17:33:59.910 AEST [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 myc -asOrg Org1MSP

2018-06-10 17:33:59.928 AEST [common/tools/configtxgen] main -> INFO 001 Loading configuration

2018-06-10 17:33:59.938 AEST [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update

2018-06-10 17:33:59.939 AEST [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 myc -asOrg Org2MSP

2018-06-10 17:33:59.957 AEST [common/tools/configtxgen] main -> INFO 001 Loading configuration

2018-06-10 17:33:59.964 AEST [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update

2018-06-10 17:33:59.964 AEST [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 003 Writing anchor peer update

+ res=0

+ set +x

Creating network “net_byfn” with the default driver

Creating volume “net_orderer.example.com” with default driver

Creating volume “net_peer0.org1.example.com” with default driver

Creating volume “net_peer1.org1.example.com” with default driver

Creating volume “net_peer0.org2.example.com” with default driver

Creating volume “net_peer1.org2.example.com” with default driver

Creating couchdb1            done

Creating couchdb2               done

Creating couchdb0               done

Creating orderer.example.com    done

Creating couchdb3               done

Creating peer1.org1.example.com … done

Creating peer0.org2.example.com … done

Creating peer0.org1.example.com … done

Creating peer1.org2.example.com … done

Creating cli                    done

____    _____      _      ____    _____

/ ___|  |_   _|    / \    |  _ \  |_   _|

\___ \    | |     / _ \   | |_) |   | | 

___) |   | |    / ___ \  |  _ <    | | 

|____/    |_|   /_/   \_\ |_| \_\   |_| 

Build your first network (BYFN) end-to-end test

Channel name : myc

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 myc -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-06-10 07:34:38.139 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized

2018-06-10 07:34:38.230 UTC [channelCmd] InitCmdFactory -> INFO 002 Endorser and orderer connections initialized

2018-06-10 07:34:38.435 UTC [main] main -> INFO 003 Exiting…..

===================== Channel “myc” is created successfully =====================

Having all peers join the 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 join -b myc.block

+ res=0

+ set +x

2018-06-10 07:34:39.673 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized

2018-06-10 07:34:39.782 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel

2018-06-10 07:34:39.782 UTC [main] main -> INFO 003 Exiting…..

===================== peer0.org1 joined on the channel “myc” =====================

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 myc.block

+ res=0

+ set +x

2018-06-10 07:34:42.896 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized

2018-06-10 07:34:43.036 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel

2018-06-10 07:34:43.036 UTC [main] main -> INFO 003 Exiting…..

===================== peer1.org1 joined on the channel “myc” =====================

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 myc.block

+ res=0

+ set +x

2018-06-10 07:34:46.129 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized

2018-06-10 07:34:46.245 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel

2018-06-10 07:34:46.245 UTC [main] main -> INFO 003 Exiting…..

===================== peer0.org2 joined on the channel “myc” =====================

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 myc.block

+ res=0

+ set +x

2018-06-10 07:34:49.374 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized

2018-06-10 07:34:49.534 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel

2018-06-10 07:34:49.534 UTC [main] main -> INFO 003 Exiting…..

===================== peer1.org2 joined on the channel “myc” =====================

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 myc -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-06-10 07:34:52.609 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized

2018-06-10 07:34:52.626 UTC [channelCmd] update -> INFO 002 Successfully submitted channel update

2018-06-10 07:34:52.626 UTC [main] main -> INFO 003 Exiting…..

===================== Anchor peers for org “Org1MSP” on “myc” 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 myc -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-06-10 07:34:55.718 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized

2018-06-10 07:34:55.733 UTC [channelCmd] update -> INFO 002 Successfully submitted channel update

2018-06-10 07:34:55.733 UTC [main] main -> INFO 003 Exiting…..

===================== Anchor peers for org “Org2MSP” on “myc” 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-06-10 07:34:58.832 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc

2018-06-10 07:34:58.832 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc

2018-06-10 07:34:59.459 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-06-10 07:34:59.604 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc

2018-06-10 07:34:59.604 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc

2018-06-10 07:34:59.851 UTC [main] main -> INFO 003 Exiting…..

===================== Chaincode is installed on peer0.org2 =====================

Instantiating 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 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 myc -n mycc -l golang -v 1.0 -c ‘{“Args”:[“init”,”a”,”100″,”b”,”200″]}’ -P ‘OR (‘\”Org1MSP.peer’\”,’\”Org2MSP.peer’\”)’

+ res=0

+ set +x

2018-06-10 07:34:59.948 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc

2018-06-10 07:34:59.948 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc

2018-06-10 07:35:20.903 UTC [main] main -> INFO 003 Exiting…..

===================== Chaincode Instantiation on peer0.org2 on channel ‘myc’ 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 ‘myc’… =====================

Attempting to Query peer0.org1 …3 secs

+ peer chaincode query -C myc -n mycc -c ‘{“Args”:[“query”,”a”]}’

+ res=0

+ set +x

2018-06-10 07:35:24.016 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc

2018-06-10 07:35:24.016 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc

Query Result: 100

2018-06-10 07:35:37.164 UTC [main] main -> INFO 003 Exiting…..

===================== Query on peer0.org1 on channel ‘myc’ 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 myc -n mycc -c ‘{“Args”:[“invoke”,”a”,”b”,”10″]}’

+ res=0

+ set +x

2018-06-10 07:35:37.278 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc

2018-06-10 07:35:37.278 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc

2018-06-10 07:35:37.292 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 003 Chaincode invoke successful. result: status:200

2018-06-10 07:35:37.293 UTC [main] main -> INFO 004 Exiting…..

===================== Invoke transaction on peer0.org1 on channel ‘myc’ 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-06-10 07:35:37.383 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc

2018-06-10 07:35:37.383 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc

2018-06-10 07:35:37.583 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 ‘myc’… =====================

+ peer chaincode query -C myc -n mycc -c ‘{“Args”:[“query”,”a”]}’

Attempting to Query peer1.org2 …3 secs

+ res=0

+ set +x

2018-06-10 07:35:40.677 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc

2018-06-10 07:35:40.677 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc

Query Result: 90

2018-06-10 07:35:54.207 UTC [main] main -> INFO 003 Exiting…..

===================== Query on peer1.org2 on channel ‘myc’ is successful =====================

========= All GOOD, BYFN execution completed ===========

_____   _   _   ____   

| ____| | \ | | |  _ \ 

|  _|   |  \| | | | | |

| |___  | |\  | | |_| |

|_____| |_| \_| |____/ 

esumits-MacBook-Pro:first-network esumit$ docker ps

CONTAINER ID        IMAGE                                                                                                  COMMAND                  CREATED             STATUS              PORTS                                              NAMES

3ab03c45733f        dev-peer1.org2.example.com-mycc-1.0-26c2ef32838554aac4f7ad6f100aca865e87959c9a126e86d764c8d01f8346ab   “chaincode -peer.add…”   2 minutes ago       Up 2 minutes                                                           dev-peer1.org2.example.com-mycc-1.0

047d58d0c277        dev-peer0.org1.example.com-mycc-1.0-384f11f484b9302df90b453200cfb25174305fce8f53f4e94d45ee3b6cab0ce9   “chaincode -peer.add…”   2 minutes ago       Up 2 minutes                                                           dev-peer0.org1.example.com-mycc-1.0

9072a4295643        dev-peer0.org2.example.com-mycc-1.0-15b571b3ce849066b7ec74497da3b27e54e0df1345daff3951b94245ce09c42b   “chaincode -peer.add…”   2 minutes ago       Up 3 minutes                                                           dev-peer0.org2.example.com-mycc-1.0

93eb4ea76d92        hyperledger/fabric-tools:latest                                                                        “/bin/bash”              3 minutes ago       Up 3 minutes                                                           cli

401113e0b1cb        hyperledger/fabric-peer:latest                                                                         “peer node start”        3 minutes ago       Up 3 minutes        0.0.0.0:10051->7051/tcp, 0.0.0.0:10053->7053/tcp   peer1.org2.example.com

aa2f7ebae486        hyperledger/fabric-peer:latest                                                                         “peer node start”        3 minutes ago       Up 3 minutes        0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp     peer0.org1.example.com

2325083b6d76        hyperledger/fabric-peer:latest                                                                         “peer node start”        3 minutes ago       Up 3 minutes        0.0.0.0:9051->7051/tcp, 0.0.0.0:9053->7053/tcp     peer0.org2.example.com

c9bcefc29043        hyperledger/fabric-peer:latest                                                                         “peer node start”        3 minutes ago       Up 3 minutes        0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp     peer1.org1.example.com

1fadca5d9930        hyperledger/fabric-couchdb                                                                             “tini — /docker-ent…”   3 minutes ago       Up 3 minutes        4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp         couchdb0

6f65872d178b        hyperledger/fabric-couchdb                                                                             “tini — /docker-ent…”   3 minutes ago       Up 3 minutes        4369/tcp, 9100/tcp, 0.0.0.0:8984->5984/tcp         couchdb3

bf80826be8f6        hyperledger/fabric-couchdb                                                                             “tini — /docker-ent…”   3 minutes ago       Up 3 minutes        4369/tcp, 9100/tcp, 0.0.0.0:7984->5984/tcp         couchdb2

40c53bf905f2        hyperledger/fabric-orderer:latest                                                                      “orderer”                3 minutes ago       Up 3 minutes        0.0.0.0:7050->7050/tcp                             orderer.example.com

34fe96a419aa        hyperledger/fabric-couchdb                                                                             “tini — /docker-ent…”   3 minutes ago       Up 4 minutes        4369/tcp, 9100/tcp, 0.0.0.0:6984->5984/tcp         couchdb1

esumits-MacBook-Pro:first-network esumit$

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s