Starting for channel 'mychannel' with CLI timeout of '10' seconds and CLI delay of '3' seconds
Continue? [Y/n]
proceeding ...
LOCAL_VERSION=1.4.4
DOCKER_IMAGE_VERSION=1.4.4
/home/real/project/videocopyright/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
Generate CCP files for Org1 and Org2
/home/real/project/videocopyright/network/fabric-samples/first-network/../bin/configtxgen
##########################################################
######### Generating Orderer Genesis block ##############
##########################################################
CONSENSUS_TYPE=solo
+ '[' solo == solo ']'
+ configtxgen -profile TwoOrgsOrdererGenesis -channelID byfn-sys-channel -outputBlock ./channel-artifacts/genesis.block
2022-07-27 18:14:37.397 CST [common.tools.configtxgen] main -> INFO 001 Loading configuration
2022-07-27 18:14:37.457 CST [common.tools.configtxgen.localconfig] completeInitialization -> INFO 002 orderer type: solo
2022-07-27 18:14:37.458 CST [common.tools.configtxgen.localconfig] Load -> INFO 003 Loaded configuration: /home/real/project/videocopyright/network/fabric-samples/first-network/configtx.yaml
2022-07-27 18:14:37.515 CST [common.tools.configtxgen.localconfig] completeInitialization -> INFO 004 orderer type: solo
2022-07-27 18:14:37.515 CST [common.tools.configtxgen.localconfig] LoadTopLevel -> INFO 005 Loaded configuration: /home/real/project/videocopyright/network/fabric-samples/first-network/configtx.yaml
2022-07-27 18:14:37.516 CST [common.tools.configtxgen] doOutputBlock -> INFO 006 Generating genesis block
2022-07-27 18:14:37.517 CST [common.tools.configtxgen] doOutputBlock -> INFO 007 Writing genesis block
+ res=0
+ set +x
#################################################################
### Generating channel configuration transaction 'channel.tx' ###
#################################################################
+ configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID mychannel
2022-07-27 18:14:37.533 CST [common.tools.configtxgen] main -> INFO 001 Loading configuration
2022-07-27 18:14:37.591 CST [common.tools.configtxgen.localconfig] Load -> INFO 002 Loaded configuration: /home/real/project/videocopyright/network/fabric-samples/first-network/configtx.yaml
2022-07-27 18:14:37.646 CST [common.tools.configtxgen.localconfig] completeInitialization -> INFO 003 orderer type: solo
2022-07-27 18:14:37.646 CST [common.tools.configtxgen.localconfig] LoadTopLevel -> INFO 004 Loaded configuration: /home/real/project/videocopyright/network/fabric-samples/first-network/configtx.yaml
2022-07-27 18:14:37.646 CST [common.tools.configtxgen] doOutputChannelCreateTx -> INFO 005 Generating new channel configtx
2022-07-27 18:14:37.648 CST [common.tools.configtxgen] doOutputChannelCreateTx -> INFO 006 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
2022-07-27 18:14:37.666 CST [common.tools.configtxgen] main -> INFO 001 Loading configuration
2022-07-27 18:14:37.727 CST [common.tools.configtxgen.localconfig] Load -> INFO 002 Loaded configuration: /home/real/project/videocopyright/network/fabric-samples/first-network/configtx.yaml
2022-07-27 18:14:37.783 CST [common.tools.configtxgen.localconfig] completeInitialization -> INFO 003 orderer type: solo
2022-07-27 18:14:37.783 CST [common.tools.configtxgen.localconfig] LoadTopLevel -> INFO 004 Loaded configuration: /home/real/project/videocopyright/network/fabric-samples/first-network/configtx.yaml
2022-07-27 18:14:37.783 CST [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO 005 Generating anchor peer update
2022-07-27 18:14:37.783 CST [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO 006 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
2022-07-27 18:14:37.803 CST [common.tools.configtxgen] main -> INFO 001 Loading configuration
2022-07-27 18:14:37.863 CST [common.tools.configtxgen.localconfig] Load -> INFO 002 Loaded configuration: /home/real/project/videocopyright/network/fabric-samples/first-network/configtx.yaml
2022-07-27 18:14:37.920 CST [common.tools.configtxgen.localconfig] completeInitialization -> INFO 003 orderer type: solo
2022-07-27 18:14:37.920 CST [common.tools.configtxgen.localconfig] LoadTopLevel -> INFO 004 Loaded configuration: /home/real/project/videocopyright/network/fabric-samples/first-network/configtx.yaml
2022-07-27 18:14:37.920 CST [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO 005 Generating anchor peer update
2022-07-27 18:14:37.920 CST [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO 006 Writing anchor peer update
+ res=0
+ set +x
[+] Running 12/12
⠿ Network net_byfn Created 0.0s
⠿ Volume "net_peer0.org1.example.com" Created 0.0s
⠿ Volume "net_peer1.org1.example.com" Created 0.0s
⠿ Volume "net_peer0.org2.example.com" Created 0.0s
⠿ Volume "net_peer1.org2.example.com" Created 0.0s
⠿ Volume "net_orderer.example.com" Created 0.0s
⠿ Container peer0.org2.example.com Started 0.9s
⠿ Container peer1.org2.example.com Started 0.8s
⠿ Container orderer.example.com Started 0.9s
⠿ Container peer0.org1.example.com Started 0.9s
⠿ Container peer1.org1.example.com Started 0.9s
⠿ Container cli Started 1.6s
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9eed20606ca1 hyperledger/fabric-tools:latest "/bin/bash" 1 second ago Up Less than a second cli
ae3b01e3831e hyperledger/fabric-orderer:latest "orderer" 1 second ago Up Less than a second 0.0.0.0:7050->7050/tcp, :::7050->7050/tcp orderer.example.com
45b17de82d8e hyperledger/fabric-peer:latest "peer node start" 1 second ago Up Less than a second 0.0.0.0:7051->7051/tcp, :::7051->7051/tcp peer0.org1.example.com
b9eee300dddf hyperledger/fabric-peer:latest "peer node start" 1 second ago Up Less than a second 0.0.0.0:10051->10051/tcp, :::10051->10051/tcp peer1.org2.example.com
23310297ec89 hyperledger/fabric-peer:latest "peer node start" 1 second ago Up Less than a second 0.0.0.0:8051->8051/tcp, :::8051->8051/tcp peer1.org1.example.com
3e070fcbff1b hyperledger/fabric-peer:latest "peer node start" 1 second ago Up Less than a second 0.0.0.0:9051->9051/tcp, :::9051->9051/tcp peer0.org2.example.com
____ _____ _ ____ _____
/ ___| |_ _| / \ | _ \ |_ _|
\___ \ | | / _ \ | |_) | | |
___) | | | / ___ \ | _ < | |
|____/ |_| /_/ \_\ |_| \_\ |_|
Build your first network (BYFN) end-to-end test
Channel name : mychannel
Creating channel...
+ peer channel create -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/channel.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
+ res=0
+ set +x
2022-07-27 10:14:39.902 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2022-07-27 10:14:39.918 UTC [cli.common] readBlock -> INFO 002 Received block: 0
===================== Channel 'mychannel' created =====================
Having all peers join the channel...
+ peer channel join -b mychannel.block
+ res=0
+ set +x
2022-07-27 10:14:39.957 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2022-07-27 10:14:39.982 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
===================== peer0.org1 joined channel 'mychannel' =====================
+ peer channel join -b mychannel.block
+ res=0
+ set +x
2022-07-27 10:14:43.022 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2022-07-27 10:14:43.039 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
===================== peer1.org1 joined channel 'mychannel' =====================
+ peer channel join -b mychannel.block
+ res=0
+ set +x
2022-07-27 10:14:46.077 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2022-07-27 10:14:46.095 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
===================== peer0.org2 joined channel 'mychannel' =====================
+ peer channel join -b mychannel.block
+ res=0
+ set +x
2022-07-27 10:14:49.141 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2022-07-27 10:14:49.160 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
===================== peer1.org2 joined channel 'mychannel' =====================
Updating anchor peers for org1...
+ peer channel update -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/Org1MSPanchors.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
+ res=0
+ set +x
2022-07-27 10:14:52.197 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2022-07-27 10:14:52.203 UTC [channelCmd] update -> INFO 002 Successfully submitted channel update
===================== Anchor peers updated for org 'Org1MSP' on channel 'mychannel' =====================
Updating anchor peers for org2...
+ peer channel update -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/Org2MSPanchors.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
+ res=0
+ set +x
2022-07-27 10:14:55.238 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2022-07-27 10:14:55.244 UTC [channelCmd] update -> INFO 002 Successfully submitted channel update
===================== Anchor peers updated for org 'Org2MSP' on channel 'mychannel' =====================
Installing chaincode on peer0.org1...
+ peer chaincode install -n mycc -v 1.0 -l golang -p github.com/chaincode/chaincode_example02/go/
+ res=0
+ set +x
2022-07-27 10:14:58.286 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2022-07-27 10:14:58.286 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
2022-07-27 10:14:58.539 UTC [chaincodeCmd] install -> INFO 003 Installed remotely response:<status:200 payload:"OK" >
===================== Chaincode is installed on peer0.org1 =====================
Install chaincode on peer0.org2...
+ peer chaincode install -n mycc -v 1.0 -l golang -p github.com/chaincode/chaincode_example02/go/
+ res=0
+ set +x
2022-07-27 10:14:58.576 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2022-07-27 10:14:58.576 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
2022-07-27 10:14:58.723 UTC [chaincodeCmd] install -> INFO 003 Installed remotely response:<status:200 payload:"OK" >
===================== Chaincode is installed on peer0.org2 =====================
Instantiating chaincode on peer0.org2...
+ peer chaincode instantiate -o orderer.example.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n mycc -l golang -v 1.0 -c '{"Args":["init","a","100","b","200"]}' -P 'AND ('\''Org1MSP.peer'\'','\''Org2MSP.peer'\'')'
+ res=0
+ set +x
2022-07-27 10:14:58.759 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2022-07-27 10:14:58.759 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
===================== Chaincode is instantiated on peer0.org2 on channel 'mychannel' =====================
Querying chaincode on peer0.org1...
===================== Querying on peer0.org1 on channel 'mychannel'... =====================
Attempting to Query peer0.org1 ...3 secs
+ peer chaincode query -C mychannel -n mycc -c '{"Args":["query","a"]}'
+ res=0
+ set +x
100
===================== Query successful on peer0.org1 on channel 'mychannel' =====================
Sending invoke transaction on peer0.org1 peer0.org2...
+ peer chaincode invoke -o orderer.example.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n mycc --peerAddresses peer0.org1.example.com:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses peer0.org2.example.com:9051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt -c '{"Args":["invoke","a","b","10"]}'
+ res=0
+ set +x
2022-07-27 10:15:21.282 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 001 Chaincode invoke successful. result: status:200
===================== Invoke transaction successful on peer0.org1 peer0.org2 on channel 'mychannel' =====================
Installing chaincode on peer1.org2...
+ peer chaincode install -n mycc -v 1.0 -l golang -p github.com/chaincode/chaincode_example02/go/
+ res=0
+ set +x
2022-07-27 10:15:21.316 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2022-07-27 10:15:21.316 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
2022-07-27 10:15:21.459 UTC [chaincodeCmd] install -> INFO 003 Installed remotely response:<status:200 payload:"OK" >
===================== Chaincode is installed on peer1.org2 =====================
Querying chaincode on peer1.org2...
===================== Querying on peer1.org2 on channel 'mychannel'... =====================
Attempting to Query peer1.org2 ...3 secs
+ peer chaincode query -C mychannel -n mycc -c '{"Args":["query","a"]}'
+ res=0
+ set +x
90
===================== Query successful on peer1.org2 on channel 'mychannel' =====================
========= All GOOD, BYFN execution completed ===========
_____ _ _ ____
| ____| | \ | | | _ \
| _| | \| | | | | |
| |___ | |\ | | |_| |
|_____| |_| \_| |____/
Hyperledger Fabric 1.4.4 默认配置启动完整日志记录,方便查阅学习
猜你喜欢
转载自blog.csdn.net/qq_41575489/article/details/126020666
今日推荐
周排行