超级账本搭建流程fabric-sample first-network

2

超级账本搭建流程(全)

参考:

http://hyperledger-fabric.rea...
https://blog.csdn.net/m0_3801...

环境准备

安装必要程序

此安装流程仅介绍MAC系统,其他系统略有差别,请自行查看参考链接超级账本教程。

1.安装golang 官方网站:https://golang.org/dl/

- 执行如下命令:
1. cd ~
2. vi .bashrc
3. 添加如下语句
```
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
```
4. source .bashrc

2.安装docker 、docker compose 官方网站:https://www.docker.com/get-do...

- 对于Mac版本,docker compose会随docker一起安装,不必单独安装
- docker安装之后需要添加镜像路径,添加两个国内镜像地址,否则很慢。
- 在performanceS->Daemon->Registry mirrors,添加如下地址:
https://docker.mirrors.ustc.edu.cn
https://hub-mirror.c.163.com

3.安装homebrew 官方网站:https://brew.sh/index_zh-cn.html

- 此软件包安装目的是为了能让mac安装软件像linux等系统一样可以使用类似apt-get命令

4.安装curl 官方网站:https://curl.haxx.se/download...

- 超级账本教程中会用到此命令,在安装之前可以查看自己电脑是否已经安装,可能随xcode一起安装了

5.安装nodejs与npm

- brew install node
- node版本不支持7.x, Node.js 6.9.x 或者更高版本

下载镜像以及工具包

  • 正常情况下执行如下命令可以完成,下载镜像以及下载工具包的工作,但是笔者尝试多次都失败,所以未采用如下方式下载。
官方方式:curl -sSL https://goo.gl/6wtTN5 | bash -s 1.1.0-alpha

1.下载需要的镜像文件

- 获取 https://github.com/hyperledger/fabric/blob/master/scripts/bootstrap.sh 内容
- 复制bootstrap.sh文件内容,创建一个目录位置,新建一个bootstrap.sh文件,copy到bootstrap.sh中。
- 执行如下命令:
    chmod +x bootstrap.sh
    sed -i '' 's/curl/#curl/g' bootstrap.sh (目的:先不下载二进制包文件,因为下载也不一定能成功)
    ./bootstrap.sh (执行脚本,需要一段时间,会下载fabric需要的image文件)

2.下载工具包

  • 查看bootstrap.sh内容就会发现里边除了下载镜像以外,还有两条命令是下载工具包的如下:
    curl https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/${ARCH}-${VERSION}/hyperledger-fabric-${ARCH}-${VERSION}.tar.gz | tar xz
    curl https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric-ca/hyperledger-fabric-ca/${ARCH}-${VERSION}/hyperledger-fabric-ca-${ARCH}-${VERSION}.tar.gz | tar xz
  • 这两条命令就是刚才注释掉的,我们需要通过迅雷下载两个文件,但需要搞清楚自己系统对应的$ARCH和$VERSION变量,
  • 通过执行如下命令获取:
    ARCH=$(echo "$(uname -s|tr '[:upper:]' '[:lower:]'|sed 's/mingw64_nt.*/windows/')-$(uname -m | sed 's/x86_64/amd64/g')" | awk '{print tolower($0)}')
    echo ${ARCH}
    VERSION=${1:-1.0.4}`
    echo ${VERSION}
    
    最终路径名称:
    https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/darwin-amd64-1.0.4/hyperledger-fabric-darwin-amd64-1.0.4.tar.gz
    https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric-ca/hyperledger-fabric-ca/darwin-amd64-1.0.4/hyperledger-fabric-ca-darwin-amd64-1.0.4.tar.gz
  • 解压hyperledger-fabric-darwin-amd64-1.0.4.tar.gz,查看获取到的工具文件
configtxgen        configtxlator        cryptogen        get-byfn.sh        get-docker-images.sh    orderer            peer
  • 导出工具的路径到PATH中
export PATH=<path to download location>/bin:$PATH

3.下载需要运行的sample git版本

git clone -b master https://github.com/hyperledger/fabric-samples.git
cd fabric-samples

运行第一个fabric网络

  1. 生成证书与创世区块
lydeiMac:first-network ly$ ./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 ...
/Users/ly/go/src/github.com/hyperledger/fabric-binary/bin/cryptogen

##########################################################
##### Generate certificates using cryptogen tool #########
##########################################################
+ cryptogen generate --config=./crypto-config.yaml
org1.example.com
org2.example.com
+ res=0
+ set +x

/Users/ly/go/src/github.com/hyperledger/fabric-binary/bin/configtxgen
##########################################################
#########  Generating Orderer Genesis block ##############
##########################################################
+ configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block
2018-04-02 06:45:34.580 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2018-04-02 06:45:34.612 CST [common/configtx/tool] doOutputBlock -> INFO 002 Generating genesis block
2018-04-02 06:45:34.614 CST [common/configtx/tool] doOutputBlock -> INFO 003 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-02 06:45:34.643 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2018-04-02 06:45:34.646 CST [common/configtx/tool] doOutputChannelCreateTx -> INFO 002 Generating new channel configtx
2018-04-02 06:45:34.646 CST [common/configtx/tool] doOutputChannelCreateTx -> INFO 003 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-02 06:45:34.671 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2018-04-02 06:45:34.675 CST [common/configtx/tool] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update
2018-04-02 06:45:34.675 CST [common/configtx/tool] 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-02 06:45:34.699 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2018-04-02 06:45:34.703 CST [common/configtx/tool] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update
2018-04-02 06:45:34.704 CST [common/configtx/tool] doOutputAnchorPeersUpdate -> INFO 003 Writing anchor peer update
+ res=0
+ set +x
  • 由于笔者之前下载的fabric-sample为最新版本1.1.0,运行命令会出现如下错误,所以将fabric-sample切换成1.0版本。
  • 通过查看byfn.sh脚本发现1.1.0新增了capabilities,这是1.1.0特有的,可能是之前下载的工具版本镜像版本与fabric—sample中的版本不匹配。
lydeiMac:first-network ly$ ./byfn.sh 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 ...
/Users/ly/go/src/github.com/hyperledger/fabric-binary/bin/cryptogen

##########################################################
##### Generate certificates using cryptogen tool #########
##########################################################
+ cryptogen generate --config=./crypto-config.yaml
org1.example.com
org2.example.com
+ res=0
+ set +x

/Users/ly/go/src/github.com/hyperledger/fabric-binary/bin/configtxgen
##########################################################
#########  Generating Orderer Genesis block ##############
##########################################################
+ configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block
2018-04-02 06:43:04.370 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2018-04-02 06:43:04.374 CST [common/configtx/tool/localconfig] Load -> CRIT 002 Error unmarshaling config into struct:  4 error(s) decoding:

* '' has invalid keys: capabilities
* 'Profiles[TwoOrgsChannel].Application' has invalid keys: Capabilities
* 'Profiles[TwoOrgsOrdererGenesis]' has invalid keys: Capabilities
* 'Profiles[TwoOrgsOrdererGenesis].Orderer' has invalid keys: Capabilities
+ res=1
+ set +x
Failed to generate orderer genesis block...
  1. 启动部署在docker容器中的fabric网络
lydeiMac:first-network ly$ ./byfn.sh -m up

Starting with channel 'mychannel' and CLI timeout of '10'
Continue (y/n)? y
proceeding ...
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 peer1.org2.example.com ... done
Recreating orderer.example.com ... 
Recreating peer0.org1.example.com ... 
Creating peer1.org2.example.com ... 
Creating peer1.org1.example.com ... 
Recreating orderer.example.com ... done
Recreating cli ... done

 ____    _____      _      ____    _____ 
/ ___|  |_   _|    / \    |  _ \  |_   _|
\___ \    | |     / _ \   | |_) |   | |  
 ___) |   | |    / ___ \  |  _ <    | |  
|____/    |_|   /_/   \_\ |_| \_\   |_|  

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=DEBUG
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
2018-04-01 23:14:00.166 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2018-04-01 23:14:00.166 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2018-04-01 23:14:00.173 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2018-04-01 23:14:00.197 UTC [msp] GetLocalMSP -> DEBU 004 Returning existing local MSP
2018-04-01 23:14:00.197 UTC [msp] GetDefaultSigningIdentity -> DEBU 005 Obtaining default signing identity
2018-04-01 23:14:00.197 UTC [msp] GetLocalMSP -> DEBU 006 Returning existing local MSP
2018-04-01 23:14:00.197 UTC [msp] GetDefaultSigningIdentity -> DEBU 007 Obtaining default signing identity
2018-04-01 23:14:00.197 UTC [msp/identity] Sign -> DEBU 008 Sign: plaintext: 0A9E060A074F7267314D53501292062D...53616D706C65436F6E736F727469756D 
2018-04-01 23:14:00.197 UTC [msp/identity] Sign -> DEBU 009 Sign: digest: D8BCCB1C46D4A71F86C4613C897B24DC29241392CC6B1705DD98D913BEF785BF 
2018-04-01 23:14:00.198 UTC [msp] GetLocalMSP -> DEBU 00a Returning existing local MSP
2018-04-01 23:14:00.198 UTC [msp] GetDefaultSigningIdentity -> DEBU 00b Obtaining default signing identity
2018-04-01 23:14:00.198 UTC [msp] GetLocalMSP -> DEBU 00c Returning existing local MSP
2018-04-01 23:14:00.198 UTC [msp] GetDefaultSigningIdentity -> DEBU 00d Obtaining default signing identity
2018-04-01 23:14:00.198 UTC [msp/identity] Sign -> DEBU 00e Sign: plaintext: 0AD5060A1508021A0608B8CF85D60522...A1F5A466934DDC184ABB535B76C1DD53 
2018-04-01 23:14:00.198 UTC [msp/identity] Sign -> DEBU 00f Sign: digest: 78384187606AC8AA120EAE4AB0F6D4DDB4B48165A694DC89DADC6C4D1C0E302D 
2018-04-01 23:14:00.261 UTC [msp] GetLocalMSP -> DEBU 010 Returning existing local MSP
2018-04-01 23:14:00.261 UTC [msp] GetDefaultSigningIdentity -> DEBU 011 Obtaining default signing identity
2018-04-01 23:14:00.261 UTC [msp] GetLocalMSP -> DEBU 012 Returning existing local MSP
2018-04-01 23:14:00.261 UTC [msp] GetDefaultSigningIdentity -> DEBU 013 Obtaining default signing identity
2018-04-01 23:14:00.261 UTC [msp/identity] Sign -> DEBU 014 Sign: plaintext: 0AD5060A1508021A0608B8CF85D60522...0216C77625A412080A021A0012021A00 
2018-04-01 23:14:00.261 UTC [msp/identity] Sign -> DEBU 015 Sign: digest: 8DA2D41317DE5585A7C7A34A97D6008EF936A50F39AF11737572DC4DA8BFC859 
2018-04-01 23:14:00.263 UTC [channelCmd] readBlock -> DEBU 016 Got status: &{NOT_FOUND}
2018-04-01 23:14:00.264 UTC [msp] GetLocalMSP -> DEBU 017 Returning existing local MSP
2018-04-01 23:14:00.264 UTC [msp] GetDefaultSigningIdentity -> DEBU 018 Obtaining default signing identity
2018-04-01 23:14:00.272 UTC [channelCmd] InitCmdFactory -> INFO 019 Endorser and orderer connections initialized
2018-04-01 23:14:00.473 UTC [msp] GetLocalMSP -> DEBU 01a Returning existing local MSP
2018-04-01 23:14:00.474 UTC [msp] GetDefaultSigningIdentity -> DEBU 01b Obtaining default signing identity
2018-04-01 23:14:00.474 UTC [msp] GetLocalMSP -> DEBU 01c Returning existing local MSP
2018-04-01 23:14:00.474 UTC [msp] GetDefaultSigningIdentity -> DEBU 01d Obtaining default signing identity
2018-04-01 23:14:00.474 UTC [msp/identity] Sign -> DEBU 01e Sign: plaintext: 0AD5060A1508021A0608B8CF85D60522...66AA96322E7B12080A021A0012021A00 
2018-04-01 23:14:00.474 UTC [msp/identity] Sign -> DEBU 01f Sign: digest: F6A190E459BA417300F3751042E5AEE88AA67CF49C4632C82111301A4AFCA0FC 
2018-04-01 23:14:00.478 UTC [channelCmd] readBlock -> DEBU 020 Received block: 0
2018-04-01 23:14:00.479 UTC [main] main -> INFO 021 Exiting.....
===================== Channel "mychannel" 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=DEBUG
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
2018-04-01 23:14:00.615 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2018-04-01 23:14:00.615 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2018-04-01 23:14:00.621 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2018-04-01 23:14:00.621 UTC [msp/identity] Sign -> DEBU 004 Sign: plaintext: 0A9C070A5C08011A0C08B8CF85D60510...A42F397D05231A080A000A000A000A00 
2018-04-01 23:14:00.621 UTC [msp/identity] Sign -> DEBU 005 Sign: digest: E516CC192ABCC212CEC19BE1CE9AD28C25C43CCA8B39EEAABFF90AC83C7BA3F5 
2018-04-01 23:14:00.701 UTC [channelCmd] executeJoin -> INFO 006 Successfully submitted proposal to join channel
2018-04-01 23:14:00.701 UTC [main] main -> INFO 007 Exiting.....
===================== PEER0 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=DEBUG
CORE_PEER_ADDRESS=peer1.org1.example.com:7051
2018-04-01 23:14:03.809 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2018-04-01 23:14:03.809 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2018-04-01 23:14:03.815 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2018-04-01 23:14:03.815 UTC [msp/identity] Sign -> DEBU 004 Sign: plaintext: 0A9C070A5C08011A0C08BBCF85D60510...A42F397D05231A080A000A000A000A00 
2018-04-01 23:14:03.815 UTC [msp/identity] Sign -> DEBU 005 Sign: digest: 318A2E84D5F8C77FAEFAE6323FB02C023DCFC2483AB2BD627BEDA48A70ABE2EF 
2018-04-01 23:14:03.906 UTC [channelCmd] executeJoin -> INFO 006 Successfully submitted proposal to join channel
2018-04-01 23:14:03.906 UTC [main] main -> INFO 007 Exiting.....
===================== PEER1 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=DEBUG
CORE_PEER_ADDRESS=peer0.org2.example.com:7051
2018-04-01 23:14:07.058 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2018-04-01 23:14:07.058 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2018-04-01 23:14:07.063 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2018-04-01 23:14:07.063 UTC [msp/identity] Sign -> DEBU 004 Sign: plaintext: 0A9F070A5B08011A0B08BFCF85D60510...A42F397D05231A080A000A000A000A00 
2018-04-01 23:14:07.063 UTC [msp/identity] Sign -> DEBU 005 Sign: digest: D07751B76067854976B1783431802E3F8793CEDE5B3B2E1522225EFF3E75A44C 
2018-04-01 23:14:07.133 UTC [channelCmd] executeJoin -> INFO 006 Successfully submitted proposal to join channel
2018-04-01 23:14:07.133 UTC [main] main -> INFO 007 Exiting.....
===================== PEER2 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=DEBUG
CORE_PEER_ADDRESS=peer1.org2.example.com:7051
2018-04-01 23:14:10.221 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2018-04-01 23:14:10.222 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2018-04-01 23:14:10.230 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2018-04-01 23:14:10.231 UTC [msp/identity] Sign -> DEBU 004 Sign: plaintext: 0A9F070A5B08011A0B08C2CF85D60510...A42F397D05231A080A000A000A000A00 
2018-04-01 23:14:10.231 UTC [msp/identity] Sign -> DEBU 005 Sign: digest: 489C92DDC475904265D23EC43226DA86CC051B1B8A6C0B6318D5FB7FEA96DED8 
2018-04-01 23:14:10.314 UTC [channelCmd] executeJoin -> INFO 006 Successfully submitted proposal to join channel
2018-04-01 23:14:10.314 UTC [main] main -> INFO 007 Exiting.....
===================== PEER3 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=DEBUG
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
2018-04-01 23:14:13.428 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2018-04-01 23:14:13.429 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2018-04-01 23:14:13.435 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2018-04-01 23:14:13.476 UTC [msp] GetLocalMSP -> DEBU 004 Returning existing local MSP
2018-04-01 23:14:13.476 UTC [msp] GetDefaultSigningIdentity -> DEBU 005 Obtaining default signing identity
2018-04-01 23:14:13.476 UTC [msp] GetLocalMSP -> DEBU 006 Returning existing local MSP
2018-04-01 23:14:13.476 UTC [msp] GetDefaultSigningIdentity -> DEBU 007 Obtaining default signing identity
2018-04-01 23:14:13.476 UTC [msp/identity] Sign -> DEBU 008 Sign: plaintext: 0A9E060A074F7267314D53501292062D...2A0641646D696E732A0641646D696E73 
2018-04-01 23:14:13.476 UTC [msp/identity] Sign -> DEBU 009 Sign: digest: C01DF70344B0640BC500105E0739DD3905A40CEDE0D16553FA075F1175F81E60 
2018-04-01 23:14:13.476 UTC [msp] GetLocalMSP -> DEBU 00a Returning existing local MSP
2018-04-01 23:14:13.476 UTC [msp] GetDefaultSigningIdentity -> DEBU 00b Obtaining default signing identity
2018-04-01 23:14:13.476 UTC [msp] GetLocalMSP -> DEBU 00c Returning existing local MSP
2018-04-01 23:14:13.476 UTC [msp] GetDefaultSigningIdentity -> DEBU 00d Obtaining default signing identity
2018-04-01 23:14:13.476 UTC [msp/identity] Sign -> DEBU 00e Sign: plaintext: 0AD5060A1508021A0608C5CF85D60522...CE4DABAF6EFAC916317C164602799497 
2018-04-01 23:14:13.476 UTC [msp/identity] Sign -> DEBU 00f Sign: digest: D31F5C9139BF9564181D0B900944AC6596A886A3413C2999650B72A432FFEC21 
2018-04-01 23:14:13.532 UTC [channelCmd] update -> INFO 010 Successfully submitted channel update
2018-04-01 23:14:13.532 UTC [main] main -> INFO 011 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=DEBUG
CORE_PEER_ADDRESS=peer0.org2.example.com:7051
2018-04-01 23:14:16.662 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2018-04-01 23:14:16.662 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2018-04-01 23:14:16.680 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2018-04-01 23:14:16.728 UTC [msp] GetLocalMSP -> DEBU 004 Returning existing local MSP
2018-04-01 23:14:16.728 UTC [msp] GetDefaultSigningIdentity -> DEBU 005 Obtaining default signing identity
2018-04-01 23:14:16.728 UTC [msp] GetLocalMSP -> DEBU 006 Returning existing local MSP
2018-04-01 23:14:16.728 UTC [msp] GetDefaultSigningIdentity -> DEBU 007 Obtaining default signing identity
2018-04-01 23:14:16.728 UTC [msp/identity] Sign -> DEBU 008 Sign: plaintext: 0AA2060A074F7267324D53501296062D...2A0641646D696E732A0641646D696E73 
2018-04-01 23:14:16.728 UTC [msp/identity] Sign -> DEBU 009 Sign: digest: 264C8A60DD60478250B944D95D7C5DDE787778BFA734BC190BC17D4D6D98D3E5 
2018-04-01 23:14:16.728 UTC [msp] GetLocalMSP -> DEBU 00a Returning existing local MSP
2018-04-01 23:14:16.728 UTC [msp] GetDefaultSigningIdentity -> DEBU 00b Obtaining default signing identity
2018-04-01 23:14:16.728 UTC [msp] GetLocalMSP -> DEBU 00c Returning existing local MSP
2018-04-01 23:14:16.728 UTC [msp] GetDefaultSigningIdentity -> DEBU 00d Obtaining default signing identity
2018-04-01 23:14:16.728 UTC [msp/identity] Sign -> DEBU 00e Sign: plaintext: 0AD9060A1508021A0608C8CF85D60522...320E949C085FD9C952A3B6904400E217 
2018-04-01 23:14:16.728 UTC [msp/identity] Sign -> DEBU 00f Sign: digest: C0E6F8233061BFB47B799E9A586F12D20B78691DCC66ED3A9D59C034E0CA259E 
2018-04-01 23:14:16.751 UTC [channelCmd] update -> INFO 010 Successfully submitted channel update
2018-04-01 23:14:16.752 UTC [main] main -> INFO 011 Exiting.....
===================== Anchor peers for org "Org2MSP" on "mychannel" is updated successfully ===================== 

Installing chaincode on org1/peer0...
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=DEBUG
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
2018-04-01 23:14:19.847 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2018-04-01 23:14:19.847 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2018-04-01 23:14:19.847 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2018-04-01 23:14:19.847 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2018-04-01 23:14:19.847 UTC [chaincodeCmd] getChaincodeSpec -> DEBU 005 java chaincode disabled
2018-04-01 23:14:20.417 UTC [golang-platform] getCodeFromFS -> DEBU 006 getCodeFromFS github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02
2018-04-01 23:14:20.956 UTC [golang-platform] func1 -> DEBU 007 Discarding GOROOT package fmt
2018-04-01 23:14:20.956 UTC [golang-platform] func1 -> DEBU 008 Discarding provided package github.com/hyperledger/fabric/core/chaincode/shim
2018-04-01 23:14:20.956 UTC [golang-platform] func1 -> DEBU 009 Discarding provided package github.com/hyperledger/fabric/protos/peer
2018-04-01 23:14:20.956 UTC [golang-platform] func1 -> DEBU 00a Discarding GOROOT package strconv
2018-04-01 23:14:20.960 UTC [golang-platform] GetDeploymentPayload -> DEBU 00b done
2018-04-01 23:14:20.960 UTC [container] WriteFileToPackage -> DEBU 00c Writing file to tarball: src/github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02/chaincode_example02.go
2018-04-01 23:14:20.965 UTC [container] WriteFileToPackage -> DEBU 00d Writing file to tarball: src/github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02/chaincode_example02_test.go
2018-04-01 23:14:20.967 UTC [msp/identity] Sign -> DEBU 00e Sign: plaintext: 0A9C070A5C08031A0C08CCCF85D60510...1B7DFE1B0000FFFFF19919A700300000 
2018-04-01 23:14:20.967 UTC [msp/identity] Sign -> DEBU 00f Sign: digest: 18389993D2050590DA120052C1B0C9610FC6FB0B968C595F996E9DBC305D365A 
2018-04-01 23:14:20.972 UTC [chaincodeCmd] install -> DEBU 010 Installed remotely response:<status:200 payload:"OK" > 
2018-04-01 23:14:20.972 UTC [main] main -> INFO 011 Exiting.....
===================== Chaincode is installed on remote peer PEER0 ===================== 

Install chaincode on org2/peer2...
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=DEBUG
CORE_PEER_ADDRESS=peer0.org2.example.com:7051
2018-04-01 23:14:21.079 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2018-04-01 23:14:21.079 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2018-04-01 23:14:21.079 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2018-04-01 23:14:21.079 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2018-04-01 23:14:21.079 UTC [chaincodeCmd] getChaincodeSpec -> DEBU 005 java chaincode disabled
2018-04-01 23:14:21.117 UTC [golang-platform] getCodeFromFS -> DEBU 006 getCodeFromFS github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02
2018-04-01 23:14:21.240 UTC [golang-platform] func1 -> DEBU 007 Discarding GOROOT package fmt
2018-04-01 23:14:21.240 UTC [golang-platform] func1 -> DEBU 008 Discarding provided package github.com/hyperledger/fabric/core/chaincode/shim
2018-04-01 23:14:21.240 UTC [golang-platform] func1 -> DEBU 009 Discarding provided package github.com/hyperledger/fabric/protos/peer
2018-04-01 23:14:21.240 UTC [golang-platform] func1 -> DEBU 00a Discarding GOROOT package strconv
2018-04-01 23:14:21.244 UTC [golang-platform] GetDeploymentPayload -> DEBU 00b done
2018-04-01 23:14:21.244 UTC [container] WriteFileToPackage -> DEBU 00c Writing file to tarball: src/github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02/chaincode_example02.go
2018-04-01 23:14:21.247 UTC [container] WriteFileToPackage -> DEBU 00d Writing file to tarball: src/github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02/chaincode_example02_test.go
2018-04-01 23:14:21.250 UTC [msp/identity] Sign -> DEBU 00e Sign: plaintext: 0A9F070A5B08031A0B08CDCF85D60510...1B7DFE1B0000FFFFF19919A700300000 
2018-04-01 23:14:21.250 UTC [msp/identity] Sign -> DEBU 00f Sign: digest: 23096B0C7F31C8B06D4010F5EE010FD6A7133CA39340ADAA405E140BD8DAB3B9 
2018-04-01 23:14:21.257 UTC [chaincodeCmd] install -> DEBU 010 Installed remotely response:<status:200 payload:"OK" > 
2018-04-01 23:14:21.258 UTC [main] main -> INFO 011 Exiting.....
===================== Chaincode is installed on remote peer PEER2 ===================== 

Instantiating chaincode on org2/peer2...
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=DEBUG
CORE_PEER_ADDRESS=peer0.org2.example.com:7051
2018-04-01 23:14:21.353 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2018-04-01 23:14:21.353 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2018-04-01 23:14:21.360 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2018-04-01 23:14:21.361 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2018-04-01 23:14:21.361 UTC [chaincodeCmd] getChaincodeSpec -> DEBU 005 java chaincode disabled
2018-04-01 23:14:21.361 UTC [msp/identity] Sign -> DEBU 006 Sign: plaintext: 0AAB070A6708031A0C08CDCF85D60510...324D53500A04657363630A0476736363 
2018-04-01 23:14:21.362 UTC [msp/identity] Sign -> DEBU 007 Sign: digest: 0D954D038F31E6DC3698C527D27A4564090CA423CC8D138CA5F621E91A88177D 
2018-04-01 23:14:43.519 UTC [msp/identity] Sign -> DEBU 008 Sign: plaintext: 0AAB070A6708031A0C08CDCF85D60510...EC80A5D9D20545C632DAC11407FDACDD 
2018-04-01 23:14:43.519 UTC [msp/identity] Sign -> DEBU 009 Sign: digest: C3D4126A0B38AC910C2DF574FF512FE7FA9DC741DACE3EA097B1897F8E8E2AA4 
2018-04-01 23:14:43.524 UTC [main] main -> INFO 00a Exiting.....
===================== Chaincode Instantiation on PEER2 on channel 'mychannel' is successful ===================== 

Querying chaincode on org1/peer0...
===================== Querying on PEER0 on 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=DEBUG
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
Attempting to Query PEER0 ...3 secs

2018-04-01 23:14:46.707 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2018-04-01 23:14:46.707 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2018-04-01 23:14:46.707 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2018-04-01 23:14:46.707 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2018-04-01 23:14:46.707 UTC [chaincodeCmd] getChaincodeSpec -> DEBU 005 java chaincode disabled
2018-04-01 23:14:46.708 UTC [msp/identity] Sign -> DEBU 006 Sign: plaintext: 0AA7070A6708031A0C08E6CF85D60510...6D7963631A0A0A0571756572790A0161 
2018-04-01 23:14:46.708 UTC [msp/identity] Sign -> DEBU 007 Sign: digest: 3D351098C616D30B77E024E75298EE328B1245F99CD373FCE207825833B163A8 
Query Result: 100
2018-04-01 23:15:05.929 UTC [main] main -> INFO 008 Exiting.....
===================== Query on PEER0 on channel 'mychannel' is successful ===================== 
Sending invoke transaction on org1/peer0...
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=DEBUG
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
2018-04-01 23:15:06.079 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2018-04-01 23:15:06.080 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2018-04-01 23:15:06.097 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2018-04-01 23:15:06.097 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2018-04-01 23:15:06.097 UTC [chaincodeCmd] getChaincodeSpec -> DEBU 005 java chaincode disabled
2018-04-01 23:15:06.097 UTC [msp/identity] Sign -> DEBU 006 Sign: plaintext: 0AA6070A6608031A0B08FACF85D60510...696E766F6B650A01610A01620A023130 
2018-04-01 23:15:06.097 UTC [msp/identity] Sign -> DEBU 007 Sign: digest: B9BB0412B4B268A016BE5527A9F4E859EF62E3A2EDE3A4327EE23B51364B3BF3 
2018-04-01 23:15:06.121 UTC [msp/identity] Sign -> DEBU 008 Sign: plaintext: 0AA6070A6608031A0B08FACF85D60510...3EA34B2B1DA3C1645A88C95A20E5E3E2 
2018-04-01 23:15:06.121 UTC [msp/identity] Sign -> DEBU 009 Sign: digest: AC0FCEEE617B0909D04EE4FF5AB2BF9E4AE0760FD69643FF5656B9F7DD103994 
2018-04-01 23:15:06.126 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> DEBU 00a ESCC invoke result: version:1 response:<status:200 message:"OK" > payload:"\n A4\317\252=>YvZOz\\Lr\226J\310M\0360\212d#\341\021\206\337\231\315\263\211\333\022Y\nE\022\024\n\004lscc\022\014\n\n\n\004mycc\022\002\010\003\022-\n\004mycc\022%\n\007\n\001a\022\002\010\003\n\007\n\001b\022\002\010\003\032\007\n\001a\032\00290\032\010\n\001b\032\003210\032\003\010\310\001\"\013\022\004mycc\032\0031.0" endorsement:<endorser:"\n\007Org1MSP\022\226\006-----BEGIN CERTIFICATE-----\nMIICGjCCAcCgAwIBAgIRAJeNVSVlXHnUh/7Mu//nFcAwCgYIKoZIzj0EAwIwczEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh\nLm9yZzEuZXhhbXBsZS5jb20wHhcNMTgwNDAxMjMwODQ0WhcNMjgwMzI5MjMwODQ0\nWjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN\nU2FuIEZyYW5jaXNjbzEfMB0GA1UEAxMWcGVlcjAub3JnMS5leGFtcGxlLmNvbTBZ\nMBMGByqGSM49AgEGCCqGSM49AwEHA0IABDLElA9lSZRv2Dx6m1zPaFb8mRGdFPe2\nLgBEtH0m7v2NQOvDf2QO7EtN/6q47+dOSBwK39efU/cWnka96PKcixmjTTBLMA4G\nA1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIKSyg5HRgPc8\n9Z0xQ2jbF1wfEu4rxZeDx/UWWhKeQS7EMAoGCCqGSM49BAMCA0gAMEUCIQCvdVwY\nRCOpm/1oE6tCgCSgEaSoJPRNIdRvPDk724vVPAIgIThWbatPkpqKoMBanTd1s+KJ\nunk8GPj4BY2DKZlwa2M=\n-----END CERTIFICATE-----\n" signature:"0D\002 (\025\372%k4@\306\237\237\010G\242\322_\344#\300 \006\305\321\242g\223M\367\3035|\3154\002 2\352\346\024d\225\023\206m\275\223\342\326\241\212&>\243K+\035\243\301dZ\210\311Z \345\343\342" > 
2018-04-01 23:15:06.126 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 00b Chaincode invoke successful. result: status:200 
2018-04-01 23:15:06.127 UTC [main] main -> INFO 00c Exiting.....
===================== Invoke transaction on PEER0 on channel 'mychannel' is successful ===================== 

Installing chaincode on org2/peer3...
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=DEBUG
CORE_PEER_ADDRESS=peer1.org2.example.com:7051
2018-04-01 23:15:06.234 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2018-04-01 23:15:06.234 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2018-04-01 23:15:06.234 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2018-04-01 23:15:06.234 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2018-04-01 23:15:06.234 UTC [chaincodeCmd] getChaincodeSpec -> DEBU 005 java chaincode disabled
2018-04-01 23:15:06.286 UTC [golang-platform] getCodeFromFS -> DEBU 006 getCodeFromFS github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02
2018-04-01 23:15:06.489 UTC [golang-platform] func1 -> DEBU 007 Discarding GOROOT package fmt
2018-04-01 23:15:06.489 UTC [golang-platform] func1 -> DEBU 008 Discarding provided package github.com/hyperledger/fabric/core/chaincode/shim
2018-04-01 23:15:06.489 UTC [golang-platform] func1 -> DEBU 009 Discarding provided package github.com/hyperledger/fabric/protos/peer
2018-04-01 23:15:06.489 UTC [golang-platform] func1 -> DEBU 00a Discarding GOROOT package strconv
2018-04-01 23:15:06.491 UTC [golang-platform] GetDeploymentPayload -> DEBU 00b done
2018-04-01 23:15:06.492 UTC [container] WriteFileToPackage -> DEBU 00c Writing file to tarball: src/github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02/chaincode_example02.go
2018-04-01 23:15:06.495 UTC [container] WriteFileToPackage -> DEBU 00d Writing file to tarball: src/github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02/chaincode_example02_test.go
2018-04-01 23:15:06.498 UTC [msp/identity] Sign -> DEBU 00e Sign: plaintext: 0AA0070A5C08031A0C08FACF85D60510...1B7DFE1B0000FFFFF19919A700300000 
2018-04-01 23:15:06.498 UTC [msp/identity] Sign -> DEBU 00f Sign: digest: FFA9086B17547C19B9016129B7F1E94AA9EC182737AF362BBD0ED1BD0AD12298 
2018-04-01 23:15:06.505 UTC [chaincodeCmd] install -> DEBU 010 Installed remotely response:<status:200 payload:"OK" > 
2018-04-01 23:15:06.505 UTC [main] main -> INFO 011 Exiting.....
===================== Chaincode is installed on remote peer PEER3 ===================== 

Querying chaincode on org2/peer3...
===================== Querying on PEER3 on 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=DEBUG
CORE_PEER_ADDRESS=peer1.org2.example.com:7051
Attempting to Query PEER3 ...3 secs

2018-04-01 23:15:09.963 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2018-04-01 23:15:09.963 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2018-04-01 23:15:09.963 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2018-04-01 23:15:09.963 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2018-04-01 23:15:09.963 UTC [chaincodeCmd] getChaincodeSpec -> DEBU 005 java chaincode disabled
2018-04-01 23:15:09.963 UTC [msp/identity] Sign -> DEBU 006 Sign: plaintext: 0AAB070A6708031A0C08FDCF85D60510...6D7963631A0A0A0571756572790A0161 
2018-04-01 23:15:09.963 UTC [msp/identity] Sign -> DEBU 007 Sign: digest: 372119C08D562D18E636BC6CBD2FAD1F37D33A7E98E44BC6261AC3142CE2B006 
Query Result: 90
2018-04-01 23:15:26.374 UTC [main] main -> INFO 008 Exiting.....
===================== Query on PEER3 on channel 'mychannel' is successful ===================== 

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


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

  1. 停止并清除运行在docker中的fabric组件
lydeiMac:first-network ly$ ./byfn.sh -m down
Stopping with channel 'mychannel' and CLI timeout of '10'
Continue (y/n)? y
proceeding ...
WARNING: The CHANNEL_NAME variable is not set. Defaulting to a blank string.
WARNING: The DELAY variable is not set. Defaulting to a blank string.
WARNING: The TIMEOUT variable is not set. Defaulting to a blank string.
Stopping peer0.org1.example.com ... done
Stopping peer0.org2.example.com ... done
Stopping peer1.org2.example.com ... done
Stopping peer1.org1.example.com ... done
Stopping orderer.example.com    ... done
Removing cli                    ... done
Removing peer0.org1.example.com ... done
Removing peer0.org2.example.com ... done
Removing peer1.org2.example.com ... done
Removing peer1.org1.example.com ... done
Removing orderer.example.com    ... done
Removing network net_byfn
Removing volume net_peer0.org2.example.com
Removing volume net_peer1.org2.example.com
Removing volume net_peer1.org1.example.com
Removing volume net_peer0.org1.example.com
Removing volume net_orderer.example.com
WARNING: The CHANNEL_NAME variable is not set. Defaulting to a blank string.
WARNING: The DELAY variable is not set. Defaulting to a blank string.
WARNING: The TIMEOUT variable is not set. Defaulting to a blank string.
Removing network net_byfn
WARNING: Network net_byfn not found.
Removing volume net_peer0.org2.example.com
WARNING: Volume net_peer0.org2.example.com not found.
Removing volume net_peer1.org2.example.com
WARNING: Volume net_peer1.org2.example.com not found.
Removing volume net_peer1.org1.example.com
WARNING: Volume net_peer1.org1.example.com not found.
Removing volume net_peer0.org1.example.com
WARNING: Volume net_peer0.org1.example.com not found.
Removing volume net_orderer.example.com
WARNING: Volume net_orderer.example.com not found.
389ed3a38abf
c4b56da41f51
caa02bceaf6c
Untagged: dev-peer1.org2.example.com-mycc-1.0-26c2ef32838554aac4f7ad6f100aca865e87959c9a126e86d764c8d01f8346ab:latest
Deleted: sha256:6bc9b85b8b4fe07808137387f9e75af367818548339a5385f8f9715783968ca6
Deleted: sha256:2d2cfb15f165142c1426ea70e6c3b5f2b6e38de2418b53f180d3e777d5a6d168
Deleted: sha256:25e7d518159d8850c652d51f7a6f5e0a9d4c3ad3b3985fc51e537c90a10e2ced
Deleted: sha256:616f9e47c2abc203d1bca1e51ff57e88b2de97bace6c53257d6b718ae568908d
Untagged: dev-peer0.org1.example.com-mycc-1.0-384f11f484b9302df90b453200cfb25174305fce8f53f4e94d45ee3b6cab0ce9:latest
Deleted: sha256:871ef869b1cc8dd03ad3b7e97d1e40f31eac48a07caa998a19d004960543defa
Deleted: sha256:d13d66c2a3a6bf081db64c31f356b02ce7c33a43a887e9e743b61b0f3ab2c298
Deleted: sha256:31749d3a9fdf18322dc6495b955e8d79351a707492ec8184e747d16f858b562a
Deleted: sha256:b404bf8e91621e513efe10366954d638d61834d88545259b52e6cd9a93476715
Untagged: dev-peer0.org2.example.com-mycc-1.0-15b571b3ce849066b7ec74497da3b27e54e0df1345daff3951b94245ce09c42b:latest
Deleted: sha256:2dd01c73685b06d2eed7de76a6defd4549de71b12ef8093bcae8ff3c23ead38e
Deleted: sha256:efa9c1a04f735e071e4416a21768ca5c7e9c9d3edbf8b76e3b936f3933f0a8bb
Deleted: sha256:9e639cf430e45a725a69eeb0d1665272a131a12f1311ee25ae34a9b95851b31c
Deleted: sha256:9544a92fa33638007c3306e200434be14b145b00dd62157c550cb95051e214bf

你可能感兴趣的

会飞的鸡翅 · 5月7日

有收获。安利个我写的Fabric区块链开发详解教程:http://t.cn/Eoz7J5B,看是否可以合作合作?

回复

载入中...