在本地搭建hyperledger fabric 网络
参考了官方文档,直接就可以了https://hyperledger-fabric.readthedocs.io/en/latest/build_network.html 很好用
- ➜ ~ cd $GOPATH/src/github.com/hyperledger/fabric/master/scripts/
- cd: no such file or directory: /Volumes/Data/Work/golang/src/github.com/hyperledger/fabric/master/scripts/
- ➜ ~ cd $GOPATH/src/github.com/hyperledger/fabric/scripts
- ➜ scripts git:(be235fd3a) ✗ ls
- bootstrap.sh check_go_version.sh check_trailingspaces.sh goListFiles.sh multiarch.sh run-unit-tests.sh
- changelog.sh check_license.sh compile_protos.sh golinter.sh pull_build_artifacts.sh
- check_deps.sh check_spelling.sh generateHelpDocs.sh metrics_doc.sh run-integration-tests.sh
- ➜ scripts git:(be235fd3a) ✗ ./bootstrap.sh
- Installing hyperledger/fabric-samples repo
- ===> Cloning hyperledger/fabric-samples repo and checkout v1.4.0
- Cloning into 'fabric-samples'...
- remote: Enumerating objects: , done.
- remote: Counting objects: % (/), done.
- remote: Compressing objects: % (/), done.
- remote: Total (delta ), reused (delta ), pack-reused
- Receiving objects: % (/), 1.04 MiB | 25.00 KiB/s, done.
- Resolving deltas: % (/), done.
- Note: checking out 'v1.4.0'.
- You are in 'detached HEAD' state. You can look around, make experimental
- changes and commit them, and you can discard any commits you make in this
- state without impacting any branches by performing another checkout.
- If you want to create a new branch to retain commits you create, you may
- do so (now or later) by using -b with the checkout command again. Example:
- git checkout -b <new-branch-name>
- HEAD is now at bb39b6e [FAB-] Align fabric-samples with 1.4. release
- Installing Hyperledger Fabric binaries
- ===> Downloading version 1.4. platform specific fabric binaries
- ===> Downloading: https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/darwin-amd64-1.4.0/hyperledger-fabric-darwin-amd64-1.4.0.tar.gz
- % Total % Received % Xferd Average Speed Time Time Time Current
- Dload Upload Total Spent Left Speed
- 39.8M 39.8M 190k :: :: --:--:-- 254k
- ==> Done.
- ===> Downloading version 1.4. platform specific fabric-ca-client binary
- ===> Downloading: https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric-ca/hyperledger-fabric-ca/darwin-amd64-1.4.0/hyperledger-fabric-ca-darwin-amd64-1.4.0.tar.gz
- % Total % Received % Xferd Average Speed Time Time Time Current
- Dload Upload Total Spent Left Speed
- 4806k 4806k 161k :: :: --:--:-- 160k
- ==> Done.
- Installing Hyperledger Fabric docker images
- ===> Pulling fabric Images
- ==> FABRIC IMAGE: peer
- 1.4.: Pulling from hyperledger/fabric-peer
- 3b37166ec614: Pull complete
- 504facff238f: Pull complete
- ebbcacd28e10: Pull complete
- c7fb3351ecad: Pull complete
- 2e3debadcbf7: Pull complete
- fc435e46e32e: Pull complete
- a4922bafdce8: Pull complete
- 7d9964965066: Pull complete
- 625153a09c48: Pull complete
- 291344806a10: Pull complete
- Digest: sha256:9707c97f787de1d4d6dd60994d6b8ea2e5cc28b0f42e6849df3fb41c64b41372
- Status: Downloaded newer image for hyperledger/fabric-peer:1.4.
- ==> FABRIC IMAGE: orderer
- 1.4.: Pulling from hyperledger/fabric-orderer
- 3b37166ec614: Already exists
- 504facff238f: Already exists
- ebbcacd28e10: Already exists
- c7fb3351ecad: Already exists
- 2e3debadcbf7: Already exists
- fc435e46e32e: Already exists
- a4922bafdce8: Already exists
- 7d9964965066: Already exists
- 1aa1f5822ea4: Pull complete
- f3adcb95411e: Pull complete
- Digest: sha256:644265186b4887c7d9dcb91895124ccead3c0125c2c4f9eadc421dc9555d7495
- Status: Downloaded newer image for hyperledger/fabric-orderer:1.4.
- ==> FABRIC IMAGE: ccenv
- 1.4.: Pulling from hyperledger/fabric-ccenv
- 3b37166ec614: Already exists
- 504facff238f: Already exists
- ebbcacd28e10: Already exists
- c7fb3351ecad: Already exists
- 2e3debadcbf7: Already exists
- fc435e46e32e: Already exists
- a4922bafdce8: Already exists
- 14675a1189ca: Pull complete
- 33f930d7053e: Pull complete
- 7aa21e006739: Pull complete
- 806ba27e29bb: Pull complete
- 0292b0ff822a: Pull complete
- 5d4ce0f5fd82: Pull complete
- 3bde20c14104: Pull complete
- Digest: sha256:6d797cac9fd39d4c9964fbcf02e47137ce8ae321af60832c41d511f0c7ed4d3e
- Status: Downloaded newer image for hyperledger/fabric-ccenv:1.4.
- ==> FABRIC IMAGE: tools
- 1.4.: Pulling from hyperledger/fabric-tools
- 3b37166ec614: Already exists
- 504facff238f: Already exists
- ebbcacd28e10: Already exists
- c7fb3351ecad: Already exists
- 2e3debadcbf7: Already exists
- fc435e46e32e: Already exists
- a4922bafdce8: Already exists
- 14675a1189ca: Already exists
- 33f930d7053e: Already exists
- 7aa21e006739: Already exists
- 806ba27e29bb: Already exists
- 72b2b3c78600: Pull complete
- f36a6f470154: Pull complete
- 19fc6d1044df: Pull complete
- Digest: sha256:aee256916d0cb938d8023fa32ed2745991d32cfe79018e360f1720707ebfbdb5
- Status: Downloaded newer image for hyperledger/fabric-tools:1.4.
- ==> FABRIC IMAGE: baseos
- Error response from daemon: manifest for hyperledger/fabric-baseos:1.4. not found
- Error response from daemon: No such image: hyperledger/fabric-baseos:1.4.
- ==> FABRIC IMAGE: nodeenv
- Error response from daemon: manifest for hyperledger/fabric-nodeenv:1.4. not found
- Error response from daemon: No such image: hyperledger/fabric-nodeenv:1.4.
- ==> FABRIC IMAGE: javaenv
- 1.4.: Pulling from hyperledger/fabric-javaenv
- 3b37166ec614: Already exists
- 504facff238f: Already exists
- ebbcacd28e10: Already exists
- c7fb3351ecad: Already exists
- 2e3debadcbf7: Already exists
- fc435e46e32e: Already exists
- a4922bafdce8: Already exists
- 14675a1189ca: Already exists
- 33f930d7053e: Already exists
- 7aa21e006739: Already exists
- 806ba27e29bb: Already exists
- af7eebe5d909: Pulling fs layer
- c0ad74369a8f: Pulling fs layer
- e36a0232c697: Pulling fs layer
- c44da90e9317: Pull complete
- 91686ed50f7f: Pull complete
- 1bc0e6d0fb0f: Pull complete
- db373eca3e52: Pull complete
- 942e34fe9650: Pull complete
- e49b8e9d853d: Pull complete
- 094ba7d3af94: Pull complete
- 4bf56bdf76e0: Pull complete
- 138eeaa643a0: Pull complete
- 2b405cbef2dc: Pull complete
- 386086ff2840: Pull complete
- 32bb4435cb82: Pull complete
- 3280cfa711dc: Pull complete
- 6b14cff5081c: Pull complete
- 04743de5a814: Pull complete
- 5360864ccda4: Pull complete
- 2fd4fc8d8137: Pull complete
- bd0e3b20a1bb: Pull complete
- a298ecbfeab2: Pull complete
- c7b9277c5a65: Pull complete
- 201919c3a1fe: Pull complete
- 539bfc561087: Pull complete
- 4e779849c7ea: Pull complete
- 3a7304a5b624: Pull complete
- Digest: sha256:f392f0c568e515b3e14c9afce14340ba18bc456cfd831ffcb4f72db58dbbcc34
- Status: Downloaded newer image for hyperledger/fabric-javaenv:1.4.
- ===> Pulling fabric ca Image
- ==> FABRIC CA IMAGE
- 1.4.: Pulling from hyperledger/fabric-ca
- 3b37166ec614: Already exists
- 504facff238f: Already exists
- ebbcacd28e10: Already exists
- c7fb3351ecad: Already exists
- 2e3debadcbf7: Already exists
- fc435e46e32e: Already exists
- a4922bafdce8: Already exists
- c8ec0cae397c: Pull complete
- 3153e2e7116e: Pull complete
- d84abf263d15: Pull complete
- 45ff112943d3: Pull complete
- c4678d50bc7a: Pull complete
- Digest: sha256:c1dce534d9e9202697e0aaad7c5521d958700fda0b05127dafb9333c22e15f74
- Status: Downloaded newer image for hyperledger/fabric-ca:1.4.
- ===> Pulling thirdparty docker images
- ==> THIRDPARTY DOCKER IMAGE: couchdb
- 0.4.: Pulling from hyperledger/fabric-couchdb
- Digest: sha256:f6c724592abf9c2b35d2f4cd6a7afcde9c1052cfed61560b20ef9e2e927d1790
- Status: Downloaded newer image for hyperledger/fabric-couchdb:0.4.
- ==> THIRDPARTY DOCKER IMAGE: kafka
- 0.4.: Pulling from hyperledger/fabric-kafka
- 34667c7e4631: Already exists
- d18d76a881a4: Already exists
- 119c7358fbfc: Already exists
- 2aaf13f3eff0: Already exists
- 3f89de4cf84b: Already exists
- 24194f819972: Already exists
- 78e4eabd31a5: Already exists
- c7652b6bde40: Already exists
- b4646dd65c45: Already exists
- 5e6defad8a30: Already exists
- d0459116a54a: Pull complete
- 1bbcec7bfdef: Pull complete
- 5911218c5933: Pull complete
- Digest: sha256:62418a885c291830510379d9eb09fbdd3d397052d916ed877a468b0e2026b9e3
- Status: Downloaded newer image for hyperledger/fabric-kafka:0.4.
- ==> THIRDPARTY DOCKER IMAGE: zookeeper
- 0.4.: Pulling from hyperledger/fabric-zookeeper
- 34667c7e4631: Already exists
- d18d76a881a4: Already exists
- 119c7358fbfc: Already exists
- 2aaf13f3eff0: Already exists
- 3f89de4cf84b: Already exists
- 24194f819972: Already exists
- 78e4eabd31a5: Already exists
- c7652b6bde40: Already exists
- b4646dd65c45: Already exists
- 5e6defad8a30: Already exists
- 0e045d9c2cdc: Pull complete
- 7ef4d8920518: Pull complete
- dbeed81d9a45: Pull complete
- aeea025ecc4e: Pull complete
- Digest: sha256:180553e88d09167370aa62a41587a9a95b819b981ad74cad218689412b85f130
- Status: Downloaded newer image for hyperledger/fabric-zookeeper:0.4.
- ===> List out hyperledger docker images
- hyperledger/fabric-ca <none> 3a1799cda5d7 weeks ago 252MB
- hyperledger/fabric-tools <none> 432c24764fbb weeks ago .55GB
- hyperledger/fabric-ccenv <none> d7433c4b2a1c weeks ago .43GB
- hyperledger/fabric-orderer <none> ec4ca236d3d4 weeks ago 173MB
- hyperledger/fabric-peer <none> a1e3874f338b weeks ago 178MB
- hyperledger/fabric-zookeeper 0.4. 20c6045930c8 weeks ago .43GB
- hyperledger/fabric-zookeeper latest 20c6045930c8 weeks ago .43GB
- hyperledger/fabric-kafka 0.4. b4ab82bbaf2f weeks ago .44GB
- hyperledger/fabric-kafka latest b4ab82bbaf2f weeks ago .44GB
- hyperledger/fabric-couchdb 0.4. 8de128a55539 weeks ago .5GB
- hyperledger/fabric-couchdb latest 8de128a55539 weeks ago .5GB
- hyperledger/fabric-baseos amd64-0.4. 9d6ec11c60ff weeks ago 145MB
- hyperledger/fabric-baseos latest 9d6ec11c60ff weeks ago 145MB
- hyperledger/fabric-javaenv 1.4. 3d91b3bf7118 months ago .75GB
- hyperledger/fabric-javaenv latest 3d91b3bf7118 months ago .75GB
- hyperledger/fabric-tools 1.4. 0a44f4261a55 months ago .56GB
- hyperledger/fabric-tools latest 0a44f4261a55 months ago .56GB
- hyperledger/fabric-ccenv 1.4. 5b31d55f5f3a months ago .43GB
- hyperledger/fabric-ccenv latest 5b31d55f5f3a months ago .43GB
- hyperledger/fabric-orderer 1.4. 54f372205580 months ago 150MB
- hyperledger/fabric-orderer latest 54f372205580 months ago 150MB
- hyperledger/fabric-peer 1.4. 304fac59b501 months ago 157MB
- hyperledger/fabric-peer latest 304fac59b501 months ago 157MB
- hyperledger/fabric-ca 1.4. 1a804ab74f58 months ago 244MB
- hyperledger/fabric-ca latest 1a804ab74f58 months ago 244MB
- ➜ scripts git:(be235fd3a) ✗ ls
- bootstrap.sh check_go_version.sh check_trailingspaces.sh generateHelpDocs.sh metrics_doc.sh run-integration-tests.sh
- changelog.sh check_license.sh compile_protos.sh goListFiles.sh multiarch.sh run-unit-tests.sh
- check_deps.sh check_spelling.sh fabric-samples golinter.sh pull_build_artifacts.sh
- ➜ scripts git:(be235fd3a) ✗ cd fabric-samples
- ➜ fabric-samples git:(bb39b6e) ls
- CODE_OF_CONDUCT.md LICENSE balance-transfer chaincode config high-throughput
- CONTRIBUTING.md MAINTAINERS.md basic-network chaincode-docker-devmode fabcar interest_rate_swaps
- Jenkinsfile README.md bin commercial-paper first-network scripts
- ➜ fabric-samples git:(bb39b6e)
- ➜ fabric-samples git:(bb39b6e)
- ➜ fabric-samples git:(bb39b6e) ls
- CODE_OF_CONDUCT.md LICENSE balance-transfer chaincode config high-throughput
- CONTRIBUTING.md MAINTAINERS.md basic-network chaincode-docker-devmode fabcar interest_rate_swaps
- Jenkinsfile README.md bin commercial-paper first-network scripts
- ➜ fabric-samples git:(bb39b6e) cd first-network
- ➜ first-network git:(bb39b6e) ls
- README.md channel-artifacts docker-compose-cli.yaml docker-compose-e2e-template.yaml eyfn.sh
- base configtx.yaml docker-compose-couch-org3.yaml docker-compose-kafka.yaml org3-artifacts
- byfn.sh crypto-config.yaml docker-compose-couch.yaml docker-compose-org3.yaml scripts
- ➜ first-network git:(bb39b6e) ./byfn.sh
- Usage:
- byfn.sh <mode> [-c <channel name>] [-t <timeout>] [-d <delay>] [-f <docker-compose-file>] [-s <dbtype>] [-l <language>] [-o <consensus-type>] [-i <imagetag>] [-v]
- <mode> - one of 'up', 'down', 'restart', 'generate' or 'upgrade'
- - 'up' - bring up the network with docker-compose up
- - 'down' - clear the network with docker-compose down
- - 'restart' - restart the network
- - 'generate' - generate required certificates and genesis block
- - 'upgrade' - upgrade the network from version 1.3.x to 1.4.
- -c <channel name> - channel name to use (defaults to "mychannel")
- -t <timeout> - CLI timeout duration in seconds (defaults to )
- -d <delay> - delay duration in seconds (defaults to )
- -f <docker-compose-file> - specify which docker-compose file use (defaults to docker-compose-cli.yaml)
- -s <dbtype> - the database backend to use: goleveldb (default) or couchdb
- -l <language> - the chaincode language: golang (default) or node
- -o <consensus-type> - the consensus-type of the ordering service: solo (default) or kafka
- -i <imagetag> - the tag to be used to launch the network (defaults to "latest")
- -v - verbose mode
- byfn.sh -h (print this message)
- Typically, one would first generate the required certificates and
- genesis block, then bring up the network. e.g.:
- byfn.sh generate -c mychannel
- byfn.sh up -c mychannel -s couchdb
- byfn.sh up -c mychannel -s couchdb -i 1.4.
- byfn.sh up -l node
- byfn.sh down -c mychannel
- byfn.sh upgrade -c mychannel
- Taking all defaults:
- byfn.sh generate
- byfn.sh up
- byfn.sh down
- ➜ first-network git:(bb39b6e) ./byfn.sh generate
- Generating certs and genesis block for channel 'mychannel' with CLI timeout of '' seconds and CLI delay of '' seconds
- Continue? [Y/n] y
- proceeding ...
- /Volumes/Data/Work/golang/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/../bin/cryptogen
- ##########################################################
- ##### Generate certificates using cryptogen tool #########
- ##########################################################
- + cryptogen generate --config=./crypto-config.yaml
- org1.example.com
- org2.example.com
- + res=
- + set +x
- /Volumes/Data/Work/golang/src/github.com/hyperledger/fabric/scripts/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
- -- ::24.844 CST [common.tools.configtxgen] main -> INFO Loading configuration
- -- ::24.885 CST [common.tools.configtxgen.localconfig] completeInitialization -> INFO orderer type: solo
- -- ::24.885 CST [common.tools.configtxgen.localconfig] Load -> INFO Loaded configuration: /Volumes/Data/Work/golang/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/configtx.yaml
- -- ::24.929 CST [common.tools.configtxgen.localconfig] completeInitialization -> INFO orderer type: solo
- -- ::24.929 CST [common.tools.configtxgen.localconfig] LoadTopLevel -> INFO Loaded configuration: /Volumes/Data/Work/golang/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/configtx.yaml
- -- ::24.932 CST [common.tools.configtxgen] doOutputBlock -> INFO Generating genesis block
- -- ::24.933 CST [common.tools.configtxgen] doOutputBlock -> INFO Writing genesis block
- + res=
- + set +x
- #################################################################
- ### Generating channel configuration transaction 'channel.tx' ###
- #################################################################
- + configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID mychannel
- -- ::24.986 CST [common.tools.configtxgen] main -> INFO Loading configuration
- -- ::25.027 CST [common.tools.configtxgen.localconfig] Load -> INFO Loaded configuration: /Volumes/Data/Work/golang/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/configtx.yaml
- -- ::25.061 CST [common.tools.configtxgen.localconfig] completeInitialization -> INFO orderer type: solo
- -- ::25.061 CST [common.tools.configtxgen.localconfig] LoadTopLevel -> INFO Loaded configuration: /Volumes/Data/Work/golang/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/configtx.yaml
- -- ::25.061 CST [common.tools.configtxgen] doOutputChannelCreateTx -> INFO Generating new channel configtx
- -- ::25.064 CST [common.tools.configtxgen] doOutputChannelCreateTx -> INFO Writing new channel tx
- + res=
- + set +x
- #################################################################
- ####### Generating anchor peer update for Org1MSP ##########
- #################################################################
- + configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors.tx -channelID mychannel -asOrg Org1MSP
- -- ::25.132 CST [common.tools.configtxgen] main -> INFO Loading configuration
- -- ::25.174 CST [common.tools.configtxgen.localconfig] Load -> INFO Loaded configuration: /Volumes/Data/Work/golang/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/configtx.yaml
- -- ::25.212 CST [common.tools.configtxgen.localconfig] completeInitialization -> INFO orderer type: solo
- -- ::25.212 CST [common.tools.configtxgen.localconfig] LoadTopLevel -> INFO Loaded configuration: /Volumes/Data/Work/golang/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/configtx.yaml
- -- ::25.212 CST [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO Generating anchor peer update
- -- ::25.214 CST [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO Writing anchor peer update
- + res=
- + set +x
- #################################################################
- ####### Generating anchor peer update for Org2MSP ##########
- #################################################################
- + configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org2MSPanchors.tx -channelID mychannel -asOrg Org2MSP
- -- ::25.267 CST [common.tools.configtxgen] main -> INFO Loading configuration
- -- ::25.304 CST [common.tools.configtxgen.localconfig] Load -> INFO Loaded configuration: /Volumes/Data/Work/golang/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/configtx.yaml
- -- ::25.341 CST [common.tools.configtxgen.localconfig] completeInitialization -> INFO orderer type: solo
- -- ::25.342 CST [common.tools.configtxgen.localconfig] LoadTopLevel -> INFO Loaded configuration: /Volumes/Data/Work/golang/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/configtx.yaml
- -- ::25.342 CST [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO Generating anchor peer update
- -- ::25.342 CST [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO Writing anchor peer update
- + res=
- + set +x
- ➜ first-network git:(bb39b6e) ./byfn.sh up
- Starting for channel 'mychannel' with CLI timeout of '' seconds and CLI delay of '' seconds
- Continue? [Y/n] y
- proceeding ...
- LOCAL_VERSION=1.4.
- DOCKER_IMAGE_VERSION=1.4.
- 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 peer1.org1.example.com ... done
- Creating peer1.org2.example.com ... done
- Creating orderer.example.com ... done
- Creating peer0.org2.example.com ... done
- Creating peer0.org1.example.com ... done
- Creating cli ... done
- ____ _____ _ ____ _____
- / ___| |_ _| / \ | _ \ |_ _|
- \___ \ | | / _ \ | |_) | | |
- ___) | | | / ___ \ | _ < | |
- |____/ |_| /_/ \_\ |_| \_\ |_|
- Build your first network (BYFN) end-to-end test
- Channel name : mychannel
- Creating channel...
- + peer channel create -o orderer.example.com: -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=
- + set +x
- -- ::58.550 UTC [channelCmd] InitCmdFactory -> INFO Endorser and orderer connections initialized
- -- ::58.646 UTC [cli.common] readBlock -> INFO Received block:
- ===================== Channel 'mychannel' created =====================
- Having all peers join the channel...
- + peer channel join -b mychannel.block
- + res=
- + set +x
- -- ::58.821 UTC [channelCmd] InitCmdFactory -> INFO Endorser and orderer connections initialized
- -- ::58.905 UTC [channelCmd] executeJoin -> INFO Successfully submitted proposal to join channel
- ===================== peer0.org1 joined channel 'mychannel' =====================
- + peer channel join -b mychannel.block
- + res=
- + set +x
- -- ::02.111 UTC [channelCmd] InitCmdFactory -> INFO Endorser and orderer connections initialized
- -- ::02.197 UTC [channelCmd] executeJoin -> INFO Successfully submitted proposal to join channel
- ===================== peer1.org1 joined channel 'mychannel' =====================
- + peer channel join -b mychannel.block
- + res=
- + set +x
- -- ::05.360 UTC [channelCmd] InitCmdFactory -> INFO Endorser and orderer connections initialized
- -- ::05.437 UTC [channelCmd] executeJoin -> INFO Successfully submitted proposal to join channel
- ===================== peer0.org2 joined channel 'mychannel' =====================
- + peer channel join -b mychannel.block
- + res=
- + set +x
- -- ::08.580 UTC [channelCmd] InitCmdFactory -> INFO Endorser and orderer connections initialized
- -- ::08.656 UTC [channelCmd] executeJoin -> INFO Successfully submitted proposal to join channel
- ===================== peer1.org2 joined channel 'mychannel' =====================
- Updating anchor peers for org1...
- + peer channel update -o orderer.example.com: -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=
- + set +x
- -- ::11.815 UTC [channelCmd] InitCmdFactory -> INFO Endorser and orderer connections initialized
- -- ::11.849 UTC [channelCmd] update -> INFO 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: -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=
- + set +x
- -- ::15.029 UTC [channelCmd] InitCmdFactory -> INFO Endorser and orderer connections initialized
- -- ::15.065 UTC [channelCmd] update -> INFO 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=
- + set +x
- -- ::18.265 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO Using default escc
- -- ::18.265 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO Using default vscc
- -- ::19.176 UTC [chaincodeCmd] install -> INFO Installed remotely response:<status: 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=
- + set +x
- -- ::19.414 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO Using default escc
- -- ::19.415 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO Using default vscc
- -- ::19.697 UTC [chaincodeCmd] install -> INFO Installed remotely response:<status: payload:"OK" >
- ===================== Chaincode is installed on peer0.org2 =====================
- Instantiating chaincode on peer0.org2...
- + peer chaincode instantiate -o orderer.example.com: --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=
- + set +x
- -- ::19.900 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO Using default escc
- -- ::19.901 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO Using default vscc
- ===================== Chaincode is instantiated on peer0.org2 on channel 'mychannel' =====================
- Querying chaincode on peer0.org1...
- ===================== Querying on peer0.org1 on channel 'mychannel'... =====================
- + peer chaincode query -C mychannel -n mycc -c '{"Args":["query","a"]}'
- Attempting to Query peer0.org1 ... secs
- + res=
- + set +x
- ===================== Query successful on peer0.org1 on channel 'mychannel' =====================
- Sending invoke transaction on peer0.org1 peer0.org2...
- + peer chaincode invoke -o orderer.example.com: --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: --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: --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=
- + set +x
- -- ::25.793 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> INFO Chaincode invoke successful. result: status:
- ===================== 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=
- + set +x
- -- ::25.945 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO Using default escc
- -- ::25.945 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO Using default vscc
- -- ::26.280 UTC [chaincodeCmd] install -> INFO Installed remotely response:<status: payload:"OK" >
- ===================== Chaincode is installed on peer1.org2 =====================
- Querying chaincode on peer1.org2...
- ===================== Querying on peer1.org2 on channel 'mychannel'... =====================
- + peer chaincode query -C mychannel -n mycc -c '{"Args":["query","a"]}'
- Attempting to Query peer1.org2 ... secs
- + res=
- + set +x
- ===================== Query successful on peer1.org2 on channel 'mychannel' =====================
- ========= All GOOD, BYFN execution completed ===========
- _____ _ _ ____
- | ____| | \ | | | _ \
- | _| | \| | | | | |
- | |___ | |\ | | |_| |
- |_____| |_| \_| |____/
在本地搭建hyperledger fabric 网络的更多相关文章
- Ubuntu下搭建Hyperledger Fabric v1.0环境
多次尝试才正常启动了Fabric,如遇到各种莫名错误,请参考如下一步步严格安装,特别用户权限需要注意. 一.安装Ubuntu16 虚拟机或双系统,虚拟机有VirtualBox或者VMware,Ub ...
- 基于ubuntu16.04快速构建Hyperledger Fabric网络
前言 最近在参加一个比赛,使用到了区块链的开源软件hyperledger,由于之前从未接触过区块链,以及和区块链开发相关的内容,所有在网上查阅了大量的资料,并且通过学习yeasy(杨宝华)开源的入门书 ...
- 7.搭建hyperledger fabric环境及启动——2019年12月12日
2019年12月12日13:05:16 声明:从网络中学习整理实践而来. 1.介绍fabric Fabric 是一个面向企业应用的区块链框架,基于 Fabric 的开发可以粗略分为几个层面: 1. 参 ...
- 基于Debian搭建Hyperledger Fabric 2.4开发环境及运行简单案例
相关实验源码已上传:https://github.com/wefantasy/FabricLearn 前言 在基于truffle框架实现以太坊公开拍卖智能合约中我们已经实现了以太坊智能合约的编写及部署 ...
- 阿里云ECS 自己搭建 hyperledger fabric的错误
常常有在本地搭建没问题,到阿里云上跑的时候 fabric启动不成功的问题. 引用: https://yq.aliyun.com/articles/238940 解决方案 1.在e2e_cli 下有个d ...
- Hyperledger Fabric网络节点架构
Fabric区块链网络的组成  区块链网络结构图 区块链网络组成 组成区块链网络相关的节点 节点是区块链的通信主体,和区块链网络相关的节点有多种类型:客户端(应用).Peer节点.排序服务(Orde ...
- Hyperledger Fabric定制联盟链网络工程实践
总体来看,网络上成体系的可用的 Fabric 教程极少--不是直接在 Fabric 官网复制内容大谈基础理论就是在描述一个几乎无法复现的项目实践,以至于学习 Fabric 的效率极低,印象最深刻的就是 ...
- Hyperledger Fabric 环境搭建(1)
1,Fabric的程序模块组成 Fabric不是一个单独的程序而是由一组模块组成,这些模块中的每一个都是一个可独立运行的可执行文件. (1)peer 主节点模块,负责存储区块链数据,运行维护链码: ( ...
- hyperledger中文文档学习-4-构建第一个fabric网络
接下来的操作都将在hyperledge环境安装构建的虚拟机的环境下进行 参考https://hyperledgercn.github.io/hyperledgerDocs/build_network_ ...
随机推荐
- 安装nginx + nginx-gridfs + mongodb
1.安装依赖包 yum -y install pcre-devel openssl-devel zlib-devel git gcc gcc-c++ git clone https://github. ...
- Centos7安装DockerCE
1. 说明 以下使用的系统为centos7,64位,镜像为CentOS-7-x86_64-Minimal-1804,所有操作以root用户操作 2. 安装Docker官方源 2.1 安装yum工具集 ...
- go调度: 第一部分-OS调度(操作系统调度)
开场白 这个是三篇博客中的第一篇, 用来提供go调度背后的机制和语法. 这篇博客主要关注操作系统调度. 三篇博客的顺序是: 1) go调度: 第一部分 - 操作系统调度 2) go调度: 第二部分 - ...
- Flask入门到放弃(五)—— 蓝图
转载请在文章开头附上原文链接地址:https://www.cnblogs.com/Sunzz/p/10980094.html 蓝图 Blueprint 模块化 随着flask程序越来越复杂,我们需要对 ...
- Windows10家庭版安装docker攻略
在公司,一直使用mac系统,在mac上安装使用docker还是比较方便的,可本人心血来朝,家里是win10 home版,就想在windows上刷一刷. 好了,废话不多说,直接上干货. 为了不误导广大爱 ...
- div折角~~~
代码: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title ...
- ansible中的常用循环模块with_items
ansible中的循环模块有很多,不过with_items最为常用,且较为简单,循环模块最多的功能就是将重复性的任务简单化,如下例子所示: - hosts: all remote_user: root ...
- mysql where 1
where后跟各种查询条件,当条件为真时即可查询出记录.在这里where 1,1为真,也就是where后的条件为真,查询表中所有内容. SELECT * FROM `sdb_pam_members` ...
- Windows安装Redis(转!)
转自https://www.cnblogs.com/wxjnew/p/9160855.html “现在我已经走到了人生的十字路口边了,我相信,在已走过的人生道路中,我一直知道其中哪一条是正确的,是的, ...
- CentOS7下的AIDE入侵检测配置
一.AIDE的概念 AIDE:Advanced Intrusion Detection Environment,是一款入侵检测工具,主要用途是检查文档的完整性.AIDE在本地构造了一个基准的数据库,一 ...