深度学习
下面我们手工逐步建立超级账本网络,理解了后面的操作步骤,就可以根据需求自行定制和部署超级账本网络了。
11.3.1 生成MSP证书
使用cryptogen工具生成证书。MSP证书是超级账本网络实体的身份标识,实体在通信和交易时使用证书进行 签名和验证。生成证书需要crypto-config.yaml配置文件,详细的文件解析参考附录B的内容。这个文件定义了组织结构,据此可以为组织和其 内的成员生成数字证书和签名密钥:加 入 会 员 微 信 dedao555
localhost:first-network clarity$ cryptogen generate
--config=./crypto-config.yaml
org1.example.com
org2.example.com
生成的MSP目录结构请参考第8章的内容。
11.3.2 生成排序服务创世区块
添加环境变量指定configtx.yaml文件的位置,生成创世区块:
export FABRIC_CFG_PATH=$PWD
configtxgen -profile TwoOrgsOrdererGenesis
-outputBlock ./channel-artifacts/genesis.block
执行结果如下:
2017-08-09 17:29:18.732 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2017-08-09 17:29:18.761 CST [common/configtx/tool] doOutputBlock -> INFO 002 Generating
genesis block
2017-08-09 17:29:18.763 CST [common/configtx/tool] doOutputBlock -> INFO 003 Writing
genesis block
执行成功以后会在channel-artifacts目录下生成创世区块geness.block,区块内容包含了联盟和组织信息,还包含通道的访问控制策略信息,可以通过configtxlator或者configtxgen工具查看详细内容。
11.3.3 生成通道配置创世区块
设置环境变量通道名称,同样利用configtxgen生成通道配置:
export CHANNEL_NAME=mychannel
configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/
channel.tx -channelID $CHANNEL_NAME
执行结果如下:
2017-08-09 17:36:09.651 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2017-08-09 17:36:09.654 CST [common/configtx/tool] doOutputChannelCreateTx -> INFO
002 Generating new channel configtx
2017-08-09 17:36:09.654 CST [common/configtx/tool] doOutputChannelCreateTx -> INFO
003 Writing new channel tx
执行成功以后会在channel-artifacts目录下生成通道配置channel.tx,可以通过configtxlator或者configtxgen工具查看详细内容。
11.3.4 定义组织锚节点
定义Org1和Org2的两个锚节点:
export CHANNEL_NAME=mychannel
// 组织Org1的锚节点
configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/
Org1MSPanchors.tx -channelID $CHANNEL_NAME -asOrg Org1MSP
// 组织Org2的锚节点
configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/
Org2MSPanchors.tx -channelID $CHANNEL_NAME -asOrg Org2MSP
执行结果如下:
2017-08-09 18:28:36.129 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2017-08-09 18:28:36.132 CST [common/configtx/tool] doOutputAnchorPeersUpdate -> INFO
002 Generating anchor peer update
2017-08-09 18:28:36.132 CST [common/configtx/tool] doOutputAnchorPeersUpdate -> INFO
003 Writing anchor peer update
执行成功以后会在channel-artifacts目录下生成锚节点配置Org1MSPanchors.tx和Org2MSPanchors.tx,可以通过configtxlator或者configtxgen工具查看详细内容。
11.3.5 启动超级账本网络
使用docker-compose启动超级账本网络,需要的配置文件是docker-compose- cli.yaml,定义了1个排序服务节点、4个Peer节点。还有一个命令行容器cli,默认通过和peer0.org1.example.com通信 实现与超级账本网络交互,进行链码部署等操作,切换环境变量也会和其他Peer节点进行通信。这里还会用到之前已经编译或者下载成功的 Hyperledger Fabric v1.0.0镜像文件,以及上面刚刚生成的创世区块genesis.block用于排序服务节点的启动。
由于启动cli容器的时候默认会执行./scripts/script.sh脚本,所以需要先屏蔽启动脚本,再启动我们的网络:
// 屏蔽./scripts/script.sh启动脚本
sed -i '' 's/command/#command/' docker-compose-cli.yaml
// 设置通道名称
CHANNEL_NAME=$CHANNEL_NAME
// 启动网络
docker-compose -f docker-compose-cli.yaml up -d
执行成功以后调用docker ps-a查看启动的容器如下(简化的输出信息):
localhost:first-network clarity$ docker ps -a
CONTAINER ID IMAGE NAMES
d294b6b493f9 hyperledger/fabric-tools cli
86e686846262 hyperledger/fabric-peer peer1.org2.example.com
7d1040f33537 hyperledger/fabric-peer peer0.org2.example.com
78c4daafb95f hyperledger/fabric-peer peer1.org1.example.com
f902601d3b89 hyperledger/fabric-peer peer0.org1.example.com
08a04df7cf36 hyperledger/fabric-orderer orderer.example.com
11.3.6 创建并加入通道
网络启动以后,需要先创建通道,进入cli容器进行操作:
// 进入cli容器
docker exec -it cli bash
// 设置通道名称的环境变量
export CHANNEL_NAME=mychannel
// 创建通道
peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-
artifacts/channel.tx --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.
com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/
orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
执行成功会在cli容器的当前路径下生成以通道名称命名的mychannel.block,这个是通道配置的创世区块,里面包含通道配置信息,加入通道操作时需要使用。
1.Peer节点peer0.org1.example.com加入通道
现在把Peer节点peer0.org1.example.com加入通道:
peer channel join -b mychannel.block
执行结果中包含“Peer joined the channel”,可见加入通道成功:
2017-08-09 13:07:16.816 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2017-08-09 13:07:16.816 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining
default signing identity
2017-08-09 13:07:16.824 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and
orderer connections initialized
2017-08-09 13:07:16.824 UTC [msp/identity] Sign -> DEBU 004 Sign: plaintext: 0A8
A070A5C08011A0C0884C996D00510...8DBFBB0981111A080A000A000A000A00
2017-08-09 13:07:16.824 UTC [msp/identity] Sign -> DEBU 005 Sign: digest: E10EC5
D95EE07F8E8793EF652E886F6398F30D9C510BB4420C6AEC0DE31612AD
2017-08-09 13:07:16.859 UTC [channelCmd] executeJoin -> INFO 006 Peer joined the
channel!
2017-08-09 13:07:16.859 UTC [main] main -> INFO 007 Exiting.....
查询当前Peer节点加入的通道列表:
peer channel list
日志中"Channels peers has joined to"后面显示的mychannel就是加入的通道:
2017-08-09 13:14:12.230 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2017-08-09 13:14:12.230 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining
default signing identity
2017-08-09 13:14:12.237 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and
orderer connections initialized
2017-08-09 13:14:12.237 UTC [msp/identity] Sign -> DEBU 004 Sign: plaintext: 0A8
9070A5B08031A0B08A4CC96D00510...631A0D0A0B4765744368616E6E656C73
2017-08-09 13:14:12.238 UTC [msp/identity] Sign -> DEBU 005 Sign: digest: 7E0B57
DC621486091E6DB68F41045957A83245292326472FACC493D5B077C3DE
2017-08-09 13:14:12.241 UTC [channelCmd] list -> INFO 006 Channels peers has
joined to:
2017-08-09 13:14:12.241 UTC [channelCmd] list -> INFO 007 mychannel
2017-08-09 13:14:12.241 UTC [main] main -> INFO 008 Exiting.....
2.Peer节点peer1.org1.example.com加入通道
需要依次把其他Peer节点也加入通道,在cli容器中切换环境变量,设置连接的Peer节点和MSP等信息,再加入通道:
// 设置连接的Peer节点
export CORE_PEER_ADDRESS=peer1.org1.example.com:7051
// 设置MSP信息
export CORE_PEER_LOCALMSPID="Org1MSP"
export 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
export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/
peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
// 把peer1.org1.example.com加入通道
peer channel join -b mychannel.block
可以通过peer channel list查询到Peer节点peer1.org1.example.com已经成功加入通道mychannel。
3.Peer节点peer0.org2.example.com加入通道
需要先设置连接的Peer节点和MSP等信息,再加入通道:
// 设置连接的Peer节点
export CORE_PEER_ADDRESS=peer0.org2.example.com:7051
// 设置MSP信息
export CORE_PEER_LOCALMSPID="Org2MSP"
export 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
export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/
peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
// 把peer1.org1.example.com加入通道
peer channel join -b mychannel.block
可以通过peer channel list查询到Peer节点peer0.org2.example.com已经成功加入通道mychannel。
4.Peer节点peer1.org2.example.com加入通道
需要先设置连接的Peer节点和MSP等信息,再加入通道:
// 设置连接的Peer节点
export CORE_PEER_ADDRESS=peer1.org2.example.com:7051
// 设置MSP信息
export CORE_PEER_LOCALMSPID="Org2MSP"
export CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/
peer/crypto/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt
export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/
peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
// 把peer1.org1.example.com加入通道
peer channel join -b mychannel.block
可以通过peer channel list查询到Peer节点peer1.org2.example.com已经成功加入通道mychannel。
11.3.7 安装和实例化链码
应用程序通过链码执行智能合约的功能,需要先在每个Peer节点上安装链码,然后在通道上实例化链码。
1.Peer节点peer0.org1.example.com安装链码
在Peer节点peer0.org1.example.com上安装链码,先设置环境变量,再安装链码chaincode_example02:
// 设置连接的Peer节点
export CORE_PEER_ADDRESS=peer0.org1.example.com:7051
// 设置MSP信息
export CORE_PEER_LOCALMSPID="Org1MSP"
export 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
export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/
peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
// 安装链码
peer chaincode install -n mycc -v 1.0 -p github.com/hyperledger/fabric/examples/
chaincode/go/chaincode_example02
执行结果中包含“Installed remotely response”说明执行成功:
2017-08-09 13:53:41.941 UTC [golang-platform] getCodeFromFS -> DEBU 005
getCodeFromFS
github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02
…
2017-08-09 13:53:42.123 UTC [chaincodeCmd] install -> DEBU 00d Installed remotely
response:<status:200 payload:"OK" >
2017-08-09 13:53:42.123 UTC [main] main -> INFO 00e Exiting.....
重新打开一个终端,进入Peer节点peer0.org1.example.com容器确认是否有安装的链码文件:
localhost:fabric clarity$ docker exec peer0.org1.example.com ls /var/hyperledger/
production/chaincodes
如果输出结果中包含mycc.1.0,就说明已经安装成功。
2.Peer节点peer1.org1.example.com安装链码
在Peer节点peer1.org1.example.com上安装链码,先设置环境变量,再安装链码chaincode_example02:
// 设置连接的Peer节点
export CORE_PEER_ADDRESS=peer1.org1.example.com:7051
// 设置MSP信息
export CORE_PEER_LOCALMSPID="Org1MSP"
export CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/
peer/crypto/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt
export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/
peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
// 安装链码
peer chaincode install -n mycc -v 1.0 -p github.com/hyperledger/fabric/examples/
chaincode/go/chaincode_example02
安装成功返回结果中会包含“Installed remotely response:”,再进入Peer节点容器确认是否有安装的链码文件:
localhost:fabric clarity$ docker exec peer1.org1.example.com ls /var/hyperledger/
production/chaincodes
如果输出结果中包含mycc.1.0,就说明已经安装成功。
3.Peer节点peer0.org2.example.com安装链码
在Peer节点peer0.org2.example.com上安装链码,先设置环境变量,再安装链码chaincode_example02:
// 设置连接的Peer节点
export CORE_PEER_ADDRESS=peer0.org2.example.com:7051
//设置MSP信息
export CORE_PEER_LOCALMSPID="Org2MSP"
export 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
export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/
peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
// 安装链码
peer chaincode install -n mycc -v 1.0 -p github.com/hyperledger/fabric/examples/
chaincode/go/chaincode_example02
安装成功返回结果中会包含“Installed remotely response:”,再进入Peer节点容器确认是否有安装的链码文件:
localhost:fabric clarity$ docker exec peer0.org2.example.com ls /var/hyperledger/
production/chaincodes
如果输出结果中包含mycc.1.0,就说明已经安装成功。
4.Peer节点peer1.org2.example.com安装链码
在Peer节点peer1.org2.example.com上安装链码,先设置环境变量,再安装链码chaincode_example02:
// 设置连接的Peer节点
export CORE_PEER_ADDRESS=peer1.org2.example.com:7051
// 设置MSP信息
export CORE_PEER_LOCALMSPID="Org2MSP"
export CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/
peer/crypto/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt
export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/
crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
// 安装链码
peer chaincode install -n mycc -v 1.0 -p github.com/hyperledger/fabric/examples/
chaincode/go/chaincode_example02
安装成功返回结果中会包含“Installed remotely response:”,再进入Peer节点容器确认是否有安装的链码文件:
localhost:fabric clarity$ docker exec peer1.org2.example.com ls /var/hyperledger/
production/chaincodes
如果输出结果中包含mycc.1.0,就说明已经安装成功。
5.实例化链码
实例化链码只需要执行一次,任意一个Peer节点都可以处理实例化的请求,同样是在cli容器中执行如下操作:
peer chaincode instantiate -o orderer.example.com:7050 --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n mycc -v 1.0 -c '{"Args":["init","a","100", "b","200"]}' -P "OR('Org1MSP.member','Org2MSP.member')"
其中,-c参数确定了账户初始化情况为a=100和b=200,-P参数指定了背书策略,链码的每个交易需要由Org1MSP或Org2MSP两个组织中的任意一个成员背书签名,才能通过背书策略,继续进入后续交易流程。
上面的命令执行完成以后没有错误提示就是成功的,会启动链码的容器dev-peer1.org2.example.com-mycc-1.0:
localhost:first-network clarity$ docker ps -a
CONTAINER ID IMAGE NAMES
f851c41073b8 dev-peer1.org2.example.com-mycc-1.0 dev-peer1.org2.example.com-
mycc-1.0
d294b6b493f9 hyperledger/fabric-tools cli
86e686846262 hyperledger/fabric-peer peer1.org2.example.com
7d1040f33537 hyperledger/fabric-peer peer0.org2.example.com
78c4daafb95f hyperledger/fabric-peer peer1.org1.example.com
f902601d3b89 hyperledger/fabric-peer peer0.org1.example.com
08a04df7cf36 hyperledger/fabric-orderer orderer.example.com
11.3.8 执行链码查询
先查看当前的环境变量:
env | grep CORE_PEER_ADDRESS
输出结果是:
CORE_PEER_ADDRESS=peer1.org2.example.com:7051
表明cli容器目前是从Peer节点peer1.org2.example.com查询的:
peer chaincode query -C $CHANNEL_NAME -nmycc -c '{"Args":["query","a"]}'
peer chaincode query -C $CHANNEL_NAME -nmycc -c '{"Args":["query","b"]}'
可以看到a和b的账户分别返回了之前初始化的数值。
我们切换环境变量然后通过peer0.org2.example.com做同样的查询工作:
// 设置连接的Peer节点
export CORE_PEER_ADDRESS=peer0.org2.example.com:7051
// 设置MSP信息
export CORE_PEER_LOCALMSPID="Org2MSP"
export 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
export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/
crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
// 查询a和b的值
peer chaincode query -C $CHANNEL_NAME -nmycc -c '{"Args":["query","a"]}'
peer chaincode query -C $CHANNEL_NAME -nmycc -c '{"Args":["query","b"]}'
结果和从Peer节点peer1.org2.example.com查询是一样的,由于Peer节点 peer0.org2.example.com的链码之前没有调用过,所以在做查询操作前会自行启动dev- peer0.org2.example.com-mycc-1.0的链码容器,然后再完成查询:
localhost:first-network clarity$ docker ps -a
CONTAINER ID IMAGE NAMES
f851c41073b8 dev-peer1.org2.example.com-mycc-1.0 dev-peer1.org2.example.com-
mycc-1.0
8537e573f7a5 dev-peer0.org2.example.com-mycc-1.0 dev-peer0.org2.example.com-
mycc-1.0
d294b6b493f9 hyperledger/fabric-tools cli
86e686846262 hyperledger/fabric-peer peer1.org2.example.com
7d1040f33537 hyperledger/fabric-peer peer0.org2.example.com
78c4daafb95f hyperledger/fabric-peer peer1.org1.example.com
f902601d3b89 hyperledger/fabric-peer peer0.org1.example.com
08a04df7cf36 hyperledger/fabric-orderer orderer.example.com
11.3.9 执行链码调用
链码调用也可以在任意一个节点上执行,下面的操作完成从a账户转账10到b账户:
peer chaincode invoke -oorderer.example.com:7050 --tls $CORE_PEER_TLS_ENABLED
--cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.
example.com-cert.pem -C $CHANNEL_NAME -n mycc -c'{"Args":["invoke","a","b","10"]}'
执行成功的结果包含“Chaincode invoke successful.result:status:200”:
2017-08-09 15:25:32.202 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local
MSP
2017-08-09 15:25:32.202 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining
default signing identity
2017-08-09 15:25:32.208 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003
Using default escc
2017-08-09 15:25:32.208 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004
Using default vscc
2017-08-09 15:25:32.209 UTC [msp/identity] Sign -> DEBU 005 Sign: plaintext: 0A9
4070A6608031A0B08EC8997D00510...696E766F6B650A01610A01620A023130
2017-08-09 15:25:32.209 UTC [msp/identity] Sign -> DEBU 006 Sign: digest: E5807B
923EAB14944DFCE2268413765F629D489159E345F919C8171E1704C3BA
2017-08-09 15:25:32.224 UTC [msp/identity] Sign -> DEBU 007 Sign: plaintext: 0A9
4070A6608031A0B08EC8997D00510...0BF1F0306F009754B827D0419FF8B29F
2017-08-09 15:25:32.224 UTC [msp/identity] Sign -> DEBU 008 Sign: digest: 5C8256
B24D92447294F7AA0012412541712E2BC31E8C7F80AA2AEB0B670EB3CC
2017-08-09 15:25:32.229 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> DEBU 009
ESCC invoke result: version:1 response:<status:200 message:"OK" > payload:"\n \250.\245\310\004\ns\306p\334/\331\306x\2244\347\020\333|\352
\034\323\267M\2719\265\306\n\304q\022Y\nE\022\024\n\004lscc\022\014\n\n\n\004mycc\022\002\010\001\022-\n\004mycc\022%\n\007\n\001a\022\002\010\001\n\
007\n\001b\022\002\010\001\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\007Org2MSP\022\374\005-----BEGIN
-----\nMIICGDCCAb+gAwIBAgIQBhvnD4KTVCkvkyVz4YIMqDAKBggqhkjOPQQDAjBzMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu\nb3JnMi5leGFtcGxlLmNvbTAeFw0xNzExMTAwOTExMDlaFw0yNzExMDgwOTExMDla\nMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T\nYW4gRnJhbmNpc2NvMR8wHQYDVQQDExZwZWVyMC5vcmcyLmV4YW1wbGUuY29tMFkw\nEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaNjBLY2Axe5FqwfBllIKT3KSfYRCDJUm\n7IUWS0qOzmwjbWhAh5+M3rGdE90lIyLgGlVY5T6Rgm5GdAladW51q6NNMEswDgYD\nVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgjdtfuR1T/7Bh\nYIVSk87JB7i9hBMYVxs5xrTqpmGI+iwwCgYIKoZIzj0EAwIDRwAwRAIgUWz5CSZc\nUjuOf9uzFx5Y2uCQoOZi23RPIyrSD5MgPWoCIHpD6f5QVVYaU0yC1AadOiA81MJf\n+yb/gNSK2jelSiIC\n-----END -----\n"
signature:"0D\002
h\212\000\034-\301\223\230\265\273\357\255\226\344\206\301\210\302T\341\257_\316<\310'\031U\177<;B\002
<\010a\273\025[<\232r\254\275\225\234\002\024\217\013\361\3600o\000\227T\270'\320A\237\370\262\237" >
2017-08-09 15:25:32.230 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 00a Chaincode invoke successful. result: status:200
2017-08-09 15:25:32.230 UTC [main] main -> INFO 00b Exiting.....
同样可以在任意一个Peer节点上查询转账后的结果。本章详细介绍了搭建超级账本网络的过程,内容由浅入深循序渐进,初学者能够快速体验超级账本的基本功能。再结合前面章节对内部实现原理的介绍,读者能够在详细的步骤中了解每一个步骤的作用,逐步深入地了解超级账本的内在魅力。
来源:我是码农,转载请保留出处和链接!
本文链接:http://www.54manong.com/?id=1048
微信号:qq444848023 QQ号:444848023
加入【我是码农】QQ群:864689844(加群验证:我是码农)
全站首页 | 数据结构 | 区块链| 大数据 | 机器学习 | 物联网和云计算 | 面试笔试
var cnzz_protocol = (("https:" == document.location.protocol) ? "https://" : "http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1276413723'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s23.cnzz.com/z_stat.php%3Fid%3D1276413723%26show%3Dpic1' type='text/javascript'%3E%3C/script%3E"));本站资源大部分来自互联网,版权归原作者所有!
评论专区