Skip to content

Instantly share code, notes, and snippets.

@sykesm
Last active April 4, 2018 20:20
Show Gist options
  • Save sykesm/f0053044b4cd8e1e4043b3d686afa1f6 to your computer and use it in GitHub Desktop.
Save sykesm/f0053044b4cd8e1e4043b3d686afa1f6 to your computer and use it in GitHub Desktop.
#!/bin/bash -ex
pwd
# /Users/cfdojo/workspace/fabric/standalone
killall orderer peer
rm -rf output peer1 peer2
mkdir -p output/crypto
cryptogen generate --config testdata/crypto-config.yaml --output output/crypto
# org1.example.com
# org2.example.com
cp testdata/configtx.yaml output
FABRIC_CFG_PATH=$PWD/output configtxgen -profile TwoOrgsOrdererGenesis -channelID systestchannel -outputBlock $PWD/output/systestchannel.block # systest should be system
# 2018-04-04 13:54:45.571 EDT [common/tools/configtxgen] main -> INFO 001 Loading configuration
# 2018-04-04 13:54:45.578 EDT [common/tools/configtxgen] doOutputBlock -> INFO 002 Generating genesis block
# 2018-04-04 13:54:45.579 EDT [common/tools/configtxgen] doOutputBlock -> INFO 003 Writing genesis block
# NOTE: This assumes a lot of stuff. Bugs are needed. See whiteboard.
# - No flag for config path (should really be config dir not path...)
# - Assumes configtx.yaml is in the config path and provides no way to point to the file
# - Uses contents of configtx.yaml to determine relative path of crypto material (MSPDir)
FABRIC_CFG_PATH=$PWD/output configtxgen -profile TwoOrgsChannel -channelID testchannel -outputCreateChannelTx $PWD/output/testchannel.tx
# 2018-04-04 14:00:26.214 EDT [common/tools/configtxgen] main -> INFO 001 Loading configuration
# 2018-04-04 14:00:26.220 EDT [common/tools/configtxgen] doOutputChannelCreateTx -> INFO 002 Generating new channel configtx
# 2018-04-04 14:00:26.238 EDT [common/tools/configtxgen] doOutputChannelCreateTx -> INFO 003 Writing new channel tx
FABRIC_CFG_PATH=$PWD/output configtxgen -profile TwoOrgsChannel -channelID testchannel -asOrg Org1 -outputAnchorPeersUpdate $PWD/output/Org1MSPAnchors.tx
# 2018-04-04 14:02:45.153 EDT [common/tools/configtxgen] main -> INFO 001 Loading configuration
# 2018-04-04 14:02:45.159 EDT [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update
# 2018-04-04 14:02:45.159 EDT [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 003 Writing anchor peer update
FABRIC_CFG_PATH=$PWD/output configtxgen -profile TwoOrgsChannel -channelID testchannel -asOrg Org2 -outputAnchorPeersUpdate $PWD/output/Org2MSPAnchors.tx
# 2018-04-04 14:05:09.075 EDT [common/tools/configtxgen] main -> INFO 001 Loading configuration
# 2018-04-04 14:05:09.081 EDT [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update
# 2018-04-04 14:05:09.081 EDT [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 003 Writing anchor peer update
cp testdata/core.yaml testdata/orderer.yaml output/
FABRIC_CFG_PATH=$PWD/output orderer start 2>&1 &
# 2018-04-04 14:22:44.013 EDT [orderer/common/server] prettyPrintStruct -> INFO 001 Orderer config values:
# General.LedgerType = "file"
# General.ListenAddress = "127.0.0.1"
# General.ListenPort = 7050
# General.TLS.Enabled = false
# General.TLS.PrivateKey = "/Users/cfdojo/workspace/fabric/standalone/output/tls/server.key"
# General.TLS.Certificate = "/Users/cfdojo/workspace/fabric/standalone/output/tls/server.crt"
# General.TLS.RootCAs = [/Users/cfdojo/workspace/fabric/standalone/output/tls/ca.crt]
# General.TLS.ClientAuthRequired = false
# General.TLS.ClientRootCAs = []
# General.Keepalive.ServerMinInterval = 1m0s
# General.Keepalive.ServerInterval = 2h0m0s
# General.Keepalive.ServerTimeout = 20s
# General.GenesisMethod = "file"
# General.GenesisProfile = "TwoOrgsOrdererGenesis"
# General.SystemChannel = "testchainid"
# General.GenesisFile = "/Users/cfdojo/workspace/fabric/standalone/output/systestchannel.block"
# General.Profile.Enabled = false
# General.Profile.Address = "0.0.0.0:6060"
# General.LogLevel = "info"
# General.LogFormat = "%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message}"
# General.LocalMSPDir = "/Users/cfdojo/workspace/fabric/standalone/output/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp"
# General.LocalMSPID = "OrdererMSP"
# General.BCCSP.ProviderName = "SW"
# General.BCCSP.SwOpts.SecLevel = 256
# General.BCCSP.SwOpts.HashFamily = "SHA2"
# General.BCCSP.SwOpts.Ephemeral = false
# General.BCCSP.SwOpts.FileKeystore.KeyStorePath = "/Users/cfdojo/workspace/fabric/standalone/output/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/keystore"
# General.BCCSP.SwOpts.DummyKeystore =
# General.BCCSP.PluginOpts =
# General.BCCSP.Pkcs11Opts =
# General.Authentication.TimeWindow = 15m0s
# FileLedger.Location = "output/ledger/orderer"
# FileLedger.Prefix = "hyperledger-fabric-ordererledger"
# RAMLedger.HistorySize = 1000
# Kafka.Retry.ShortInterval = 5s
# Kafka.Retry.ShortTotal = 10m0s
# Kafka.Retry.LongInterval = 5m0s
# Kafka.Retry.LongTotal = 12h0m0s
# Kafka.Retry.NetworkTimeouts.DialTimeout = 10s
# Kafka.Retry.NetworkTimeouts.ReadTimeout = 10s
# Kafka.Retry.NetworkTimeouts.WriteTimeout = 10s
# Kafka.Retry.Metadata.RetryMax = 3
# Kafka.Retry.Metadata.RetryBackoff = 250ms
# Kafka.Retry.Producer.RetryMax = 3
# Kafka.Retry.Producer.RetryBackoff = 100ms
# Kafka.Retry.Consumer.RetryBackoff = 2s
# Kafka.Verbose = false
# Kafka.Version = 0.10.2.0
# Kafka.TLS.Enabled = false
# Kafka.TLS.PrivateKey = ""
# Kafka.TLS.Certificate = ""
# Kafka.TLS.RootCAs = []
# Kafka.TLS.ClientAuthRequired = false
# Kafka.TLS.ClientRootCAs = []
# Debug.BroadcastTraceDir = ""
# Debug.DeliverTraceDir = ""
# 2018-04-04 14:22:44.018 EDT [orderer/common/server] initializeMultichannelRegistrar -> INFO 002 Not bootstrapping because of existing chains
# 2018-04-04 14:22:44.023 EDT [orderer/commmon/multichannel] NewRegistrar -> INFO 003 Starting system channel 'systestchannel' with genesis block hash a5a125684385dbe94986cfb082956e3685f5c516745255bdc0f4dde845a03e49 and orderer type solo
# 2018-04-04 14:22:44.023 EDT [orderer/common/server] Start -> INFO 004 Starting orderer:
# Version: 1.2.0-snapshot-3fd90a9c
# Go version: go1.10.1
# OS/Arch: darwin/amd64
# Experimental features: true
# 2018-04-04 14:22:44.023 EDT [orderer/common/server] Start -> INFO 005 Beginning to serve requests
mkdir peer1 # TODO output/orderer output/peer etc
cp testdata/peer1-core.yaml peer1/core.yaml
cp -pr output/crypto peer1
FABRIC_CFG_PATH=$PWD/peer1 peer node start 2>&1 &
# 2018-04-04 14:40:09.294 EDT [msp] getMspConfig -> INFO 001 Loading NodeOUs
# 2018-04-04 14:40:09.310 EDT [nodeCmd] serve -> INFO 002 Starting peer:
# Version: 1.2.0-snapshot-3fd90a9c
# Go version: go1.10.1
# OS/Arch: darwin/amd64
# Experimental features: true
# Chaincode:
# Base Image Version: 0.4.6
# Base Docker Namespace: hyperledger
# Base Docker Label: org.hyperledger.fabric
# Docker Namespace: hyperledger
# 2018-04-04 14:40:09.310 EDT [ledgermgmt] initialize -> INFO 003 Initializing ledger mgmt
# 2018-04-04 14:40:09.311 EDT [kvledger] NewProvider -> INFO 004 Initializing ledger provider
# 2018-04-04 14:40:09.319 EDT [kvledger] NewProvider -> INFO 005 ledger provider Initialized
# 2018-04-04 14:40:09.319 EDT [ledgermgmt] initialize -> INFO 006 ledger mgmt initialized
# 2018-04-04 14:40:09.319 EDT [peer] func1 -> INFO 007 Auto-detected peer address: 9.236.236.104:7051
# 2018-04-04 14:40:09.319 EDT [peer] func1 -> INFO 008 Host is 0.0.0.0 , falling back to auto-detected address: 9.236.236.104:7051
# 2018-04-04 14:40:09.320 EDT [peer] func1 -> INFO 009 Auto-detected peer address: 9.236.236.104:7051
# 2018-04-04 14:40:09.320 EDT [peer] func1 -> INFO 00a Host is 0.0.0.0 , falling back to auto-detected address: 9.236.236.104:7051
# 2018-04-04 14:40:09.321 EDT [eventhub_producer] start -> INFO 00b Event processor started
# 2018-04-04 14:40:09.322 EDT [nodeCmd] computeChaincodeEndpoint -> INFO 00c Entering computeChaincodeEndpoint with peerHostname: 9.236.236.104
# 2018-04-04 14:40:09.322 EDT [nodeCmd] computeChaincodeEndpoint -> INFO 00d Exit with ccEndpoint: 9.236.236.104:7052
# 2018-04-04 14:40:09.322 EDT [nodeCmd] createChaincodeServer -> WARN 00e peer.chaincodeListenAddress is not set, using 9.236.236.104:7052
# 2018-04-04 14:40:09.323 EDT [chaincode] NewChaincodeSupport -> INFO 00f Chaincode support using peerAddress: 9.236.236.104:7052
# 2018-04-04 14:40:09.324 EDT [sccapi] registerSysCC -> INFO 010 system chaincode cscc(github.com/hyperledger/fabric/core/scc/cscc) registered
# 2018-04-04 14:40:09.324 EDT [sccapi] registerSysCC -> INFO 011 system chaincode lscc(github.com/hyperledger/fabric/core/scc/lscc) registered
# 2018-04-04 14:40:09.324 EDT [sccapi] registerSysCC -> INFO 012 system chaincode escc(github.com/hyperledger/fabric/core/scc/escc) registered
# 2018-04-04 14:40:09.324 EDT [sccapi] registerSysCC -> INFO 013 system chaincode vscc(github.com/hyperledger/fabric/core/scc/vscc) registered
# 2018-04-04 14:40:09.324 EDT [sccapi] registerSysCC -> INFO 014 system chaincode qscc(github.com/hyperledger/fabric/core/chaincode/qscc) registered
# 2018-04-04 14:40:09.325 EDT [gossip/service] func1 -> INFO 015 Initialize gossip with endpoint 9.236.236.104:7051 and bootstrap set [127.0.0.1:7051]
# 2018-04-04 14:40:09.326 EDT [msp] DeserializeIdentity -> INFO 016 Obtaining identity
# 2018-04-04 14:40:09.328 EDT [gossip/discovery] NewDiscoveryService -> INFO 017 Started { [] [75 73 192 103 212 187 164 81 62 213 160 17 133 17 137 184 22 175 53 48 193 157 219 134 42 99 249 53 245 56 238 79] 9.236.236.104:7051 <nil> <nil>} incTime is 1522867209328085921
# 2018-04-04 14:40:09.328 EDT [gossip/gossip] NewGossipService -> INFO 018 Creating gossip service with self membership of { [] [75 73 192 103 212 187 164 81 62 213 160 17 133 17 137 184 22 175 53 48 193 157 219 134 42 99 249 53 245 56 238 79] 9.236.236.104:7051 <nil> <nil>}
# 2018-04-04 14:40:09.329 EDT [gossip/gossip] NewGossipService -> WARN 019 External endpoint is empty, peer will not be accessible outside of its organization
# 2018-04-04 14:40:09.329 EDT [gossip/gossip] start -> INFO 01a Gossip instance 9.236.236.104:7051 started
# 2018-04-04 14:40:09.329 EDT [cscc] Init -> INFO 01b Init CSCC
# 2018-04-04 14:40:09.330 EDT [sccapi] deploySysCC -> INFO 01c system chaincode cscc/(github.com/hyperledger/fabric/core/scc/cscc) deployed
# 2018-04-04 14:40:09.330 EDT [sccapi] deploySysCC -> INFO 01d system chaincode lscc/(github.com/hyperledger/fabric/core/scc/lscc) deployed
# 2018-04-04 14:40:09.330 EDT [escc] Init -> INFO 01e Successfully initialized ESCC
# 2018-04-04 14:40:09.330 EDT [sccapi] deploySysCC -> INFO 01f system chaincode escc/(github.com/hyperledger/fabric/core/scc/escc) deployed
# 2018-04-04 14:40:09.330 EDT [sccapi] deploySysCC -> INFO 020 system chaincode vscc/(github.com/hyperledger/fabric/core/scc/vscc) deployed
# 2018-04-04 14:40:09.330 EDT [qscc] Init -> INFO 021 Init QSCC
# 2018-04-04 14:40:09.330 EDT [sccapi] deploySysCC -> INFO 022 system chaincode qscc/(github.com/hyperledger/fabric/core/chaincode/qscc) deployed
# 2018-04-04 14:40:09.330 EDT [nodeCmd] initSysCCs -> INFO 023 Deployed system chaincodes
# 2018-04-04 14:40:09.331 EDT [nodeCmd] serve -> INFO 024 Starting peer with ID=[name:"peer0.org1.example.com" ], network ID=[dev], address=[9.236.236.104:7051]
# 2018-04-04 14:40:09.331 EDT [nodeCmd] serve -> INFO 025 Started peer with ID=[name:"peer0.org1.example.com" ], network ID=[dev], address=[9.236.236.104:7051]
mkdir peer2
cp testdata/peer2-core.yaml peer2/core.yaml
cp -pr output/crypto peer2
FABRIC_CFG_PATH=$PWD/peer2 peer node start 2>&1 &
# 2018-04-04 14:44:27.906 EDT [msp] getMspConfig -> INFO 001 Loading NodeOUs
# 2018-04-04 14:44:27.922 EDT [nodeCmd] serve -> INFO 002 Starting peer:
# Version: 1.2.0-snapshot-3fd90a9c
# Go version: go1.10.1
# OS/Arch: darwin/amd64
# Experimental features: true
# Chaincode:
# Base Image Version: 0.4.6
# Base Docker Namespace: hyperledger
# Base Docker Label: org.hyperledger.fabric
# Docker Namespace: hyperledger
# 2018-04-04 14:44:27.922 EDT [ledgermgmt] initialize -> INFO 003 Initializing ledger mgmt
# 2018-04-04 14:44:27.922 EDT [kvledger] NewProvider -> INFO 004 Initializing ledger provider
# 2018-04-04 14:44:27.933 EDT [kvledger] NewProvider -> INFO 005 ledger provider Initialized
# 2018-04-04 14:44:27.933 EDT [ledgermgmt] initialize -> INFO 006 ledger mgmt initialized
# 2018-04-04 14:44:27.933 EDT [peer] func1 -> INFO 007 Auto-detected peer address: 9.236.236.104:8051
# 2018-04-04 14:44:27.933 EDT [peer] func1 -> INFO 008 Host is 0.0.0.0 , falling back to auto-detected address: 9.236.236.104:8051
# 2018-04-04 14:44:27.933 EDT [peer] func1 -> INFO 009 Auto-detected peer address: 9.236.236.104:8051
# 2018-04-04 14:44:27.933 EDT [peer] func1 -> INFO 00a Host is 0.0.0.0 , falling back to auto-detected address: 9.236.236.104:8051
# 2018-04-04 14:44:27.934 EDT [eventhub_producer] start -> INFO 00b Event processor started
# 2018-04-04 14:44:27.935 EDT [nodeCmd] computeChaincodeEndpoint -> INFO 00c Entering computeChaincodeEndpoint with peerHostname: 9.236.236.104
# 2018-04-04 14:44:27.935 EDT [nodeCmd] computeChaincodeEndpoint -> INFO 00d Exit with ccEndpoint: 9.236.236.104:7052
# 2018-04-04 14:44:27.936 EDT [nodeCmd] createChaincodeServer -> WARN 00e peer.chaincodeListenAddress is not set, using 9.236.236.104:7052
# 2018-04-04 14:44:27.937 EDT [chaincode] NewChaincodeSupport -> INFO 00f Chaincode support using peerAddress: 9.236.236.104:7052
# 2018-04-04 14:44:27.937 EDT [sccapi] registerSysCC -> INFO 010 system chaincode cscc(github.com/hyperledger/fabric/core/scc/cscc) registered
# 2018-04-04 14:44:27.937 EDT [sccapi] registerSysCC -> INFO 011 system chaincode lscc(github.com/hyperledger/fabric/core/scc/lscc) registered
# 2018-04-04 14:44:27.937 EDT [sccapi] registerSysCC -> INFO 012 system chaincode escc(github.com/hyperledger/fabric/core/scc/escc) registered
# 2018-04-04 14:44:27.937 EDT [sccapi] registerSysCC -> INFO 013 system chaincode vscc(github.com/hyperledger/fabric/core/scc/vscc) registered
# 2018-04-04 14:44:27.937 EDT [sccapi] registerSysCC -> INFO 014 system chaincode qscc(github.com/hyperledger/fabric/core/chaincode/qscc) registered
# 2018-04-04 14:44:27.938 EDT [gossip/service] func1 -> INFO 015 Initialize gossip with endpoint 9.236.236.104:8051 and bootstrap set [127.0.0.1:8051]
# 2018-04-04 14:44:27.940 EDT [msp] DeserializeIdentity -> INFO 016 Obtaining identity
# 2018-04-04 14:44:27.941 EDT [gossip/discovery] NewDiscoveryService -> INFO 017 Started { [] [206 130 233 152 152 200 89 129 18 22 78 62 85 217 120 222 30 180 247 97 143 100 119 104 195 188 122 13 6 58 45 204] 9.236.236.104:8051 <nil> <nil>} incTime is 1522867467941355359
# 2018-04-04 14:44:27.941 EDT [gossip/gossip] NewGossipService -> INFO 018 Creating gossip service with self membership of { [] [206 130 233 152 152 200 89 129 18 22 78 62 85 217 120 222 30 180 247 97 143 100 119 104 195 188 122 13 6 58 45 204] 9.236.236.104:8051 <nil> <nil>}
# 2018-04-04 14:44:27.942 EDT [gossip/gossip] NewGossipService -> WARN 019 External endpoint is empty, peer will not be accessible outside of its organization
# 2018-04-04 14:44:27.942 EDT [gossip/gossip] start -> INFO 01a Gossip instance 9.236.236.104:8051 started
# 2018-04-04 14:44:27.943 EDT [cscc] Init -> INFO 01b Init CSCC
# 2018-04-04 14:44:27.943 EDT [sccapi] deploySysCC -> INFO 01c system chaincode cscc/(github.com/hyperledger/fabric/core/scc/cscc) deployed
# 2018-04-04 14:44:27.943 EDT [sccapi] deploySysCC -> INFO 01d system chaincode lscc/(github.com/hyperledger/fabric/core/scc/lscc) deployed
# 2018-04-04 14:44:27.943 EDT [escc] Init -> INFO 01e Successfully initialized ESCC
# 2018-04-04 14:44:27.943 EDT [sccapi] deploySysCC -> INFO 01f system chaincode escc/(github.com/hyperledger/fabric/core/scc/escc) deployed
# 2018-04-04 14:44:27.944 EDT [sccapi] deploySysCC -> INFO 020 system chaincode vscc/(github.com/hyperledger/fabric/core/scc/vscc) deployed
# 2018-04-04 14:44:27.944 EDT [qscc] Init -> INFO 021 Init QSCC
# 2018-04-04 14:44:27.944 EDT [sccapi] deploySysCC -> INFO 022 system chaincode qscc/(github.com/hyperledger/fabric/core/chaincode/qscc) deployed
# 2018-04-04 14:44:27.944 EDT [nodeCmd] initSysCCs -> INFO 023 Deployed system chaincodes
# 2018-04-04 14:44:27.944 EDT [nodeCmd] serve -> INFO 024 Starting peer with ID=[name:"peer0.org2.example.com" ], network ID=[dev], address=[9.236.236.104:8051]
# 2018-04-04 14:44:27.945 EDT [nodeCmd] serve -> INFO 025 Started peer with ID=[name:"peer0.org2.example.com" ], network ID=[dev], address=[9.236.236.104:8051]
#!/bin/bash -ex
### Begin synchronous goo
FABRIC_CFG_PATH=$PWD/peer1 CORE_PEER_MSPCONFIGPATH=crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp peer channel create -c testchannel -o 127.0.0.1:7050 -f output/testchannel.tx
# 2018-04-04 15:03:08.929 EDT [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
# 2018-04-04 15:03:08.933 EDT [msp] DeserializeIdentity -> INFO 009 Obtaining identity
# 2018-04-04 15:03:08.934 EDT [msp] DeserializeIdentity -> INFO 00a Obtaining identity
# 2018-04-04 15:03:08.936 EDT [msp] DeserializeIdentity -> INFO 00b Obtaining identity
# 2018-04-04 15:03:08.940 EDT [channelCmd] InitCmdFactory -> INFO 002 Endorser and orderer connections initialized
# 2018-04-04 15:03:08.941 EDT [fsblkstorage] newBlockfileMgr -> INFO 00c Getting block information from block storage
# 2018-04-04 15:03:08.944 EDT [orderer/commmon/multichannel] newChain -> INFO 00d Created and starting new chain testchannel
# 2018-04-04 15:03:09.146 EDT [msp] DeserializeIdentity -> INFO 00e Obtaining identity
# 2018-04-04 15:03:09.147 EDT [main] main -> INFO 003 Exiting.....
FABRIC_CFG_PATH=$PWD/peer1 CORE_PEER_MSPCONFIGPATH=crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp peer channel fetch 0 -o 127.0.0.1:7050 -c testchannel peer1/testchannel.block
# 2018-04-04 15:06:56.965 EDT [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
# 2018-04-04 15:06:56.966 EDT [main] main -> INFO 002 Exiting.....
# 2018-04-04 15:06:56.968 EDT [common/deliver] Handle -> WARN 010 Error reading from 127.0.0.1:60636: rpc error: code = Canceled desc = context canceled
FABRIC_CFG_PATH=$PWD/peer2 CORE_PEER_MSPCONFIGPATH=crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp peer channel fetch 0 -o 127.0.0.1:7050 -c testchannel peer2/testchannel.block
# 2018-04-04 15:08:29.418 EDT [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
# 2018-04-04 15:08:29.419 EDT [msp] DeserializeIdentity -> INFO 011 Obtaining identity
# 2018-04-04 15:08:29.420 EDT [main] main -> INFO 002 Exiting.....
# 2018-04-04 15:08:29.422 EDT [common/deliver] Handle -> WARN 012 Error reading from 127.0.0.1:60639: rpc error: code = Canceled desc = context canceled
FABRIC_CFG_PATH=$PWD/peer1 CORE_PEER_MSPCONFIGPATH=crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp peer channel join -b peer1/testchannel.block
# 2018-04-04 15:09:21.591 EDT [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
# 2018-04-04 15:09:21.593 EDT [ledgermgmt] CreateLedger -> INFO 026 Creating ledger [testchannel] with genesis block
# 2018-04-04 15:09:21.594 EDT [fsblkstorage] newBlockfileMgr -> INFO 027 Getting block information from block storage
# 2018-04-04 15:09:21.596 EDT [kvledger] CommitWithPvtData -> INFO 028 Channel [testchannel]: Committed block [0] with 1 transaction(s)
# 2018-04-04 15:09:21.597 EDT [ledgermgmt] CreateLedger -> INFO 029 Created ledger [testchannel] with genesis block
# 2018-04-04 15:09:21.601 EDT [cscc] Init -> INFO 02a Init CSCC
# 2018-04-04 15:09:21.601 EDT [sccapi] deploySysCC -> INFO 02b system chaincode cscc/testchannel(github.com/hyperledger/fabric/core/scc/cscc) deployed
# 2018-04-04 15:09:21.601 EDT [sccapi] deploySysCC -> INFO 02c system chaincode lscc/testchannel(github.com/hyperledger/fabric/core/scc/lscc) deployed
# 2018-04-04 15:09:21.601 EDT [escc] Init -> INFO 02d Successfully initialized ESCC
# 2018-04-04 15:09:21.601 EDT [sccapi] deploySysCC -> INFO 02e system chaincode escc/testchannel(github.com/hyperledger/fabric/core/scc/escc) deployed
# 2018-04-04 15:09:21.601 EDT [sccapi] deploySysCC -> INFO 02f system chaincode vscc/testchannel(github.com/hyperledger/fabric/core/scc/vscc) deployed
# 2018-04-04 15:09:21.601 EDT [qscc] Init -> INFO 030 Init QSCC
# 2018-04-04 15:09:21.601 EDT [sccapi] deploySysCC -> INFO 031 system chaincode qscc/testchannel(github.com/hyperledger/fabric/core/chaincode/qscc) deployed
# 2018-04-04 15:09:21.601 EDT [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
# 2018-04-04 15:09:21.601 EDT [main] main -> INFO 003 Exiting.....
FABRIC_CFG_PATH=$PWD/peer2 CORE_PEER_MSPCONFIGPATH=crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp peer channel join -b peer2/testchannel.block
# 2018-04-04 15:10:02.326 EDT [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
# 2018-04-04 15:10:02.328 EDT [ledgermgmt] CreateLedger -> INFO 025 Creating ledger [testchannel] with genesis block
# 2018-04-04 15:10:02.330 EDT [fsblkstorage] newBlockfileMgr -> INFO 026 Getting block information from block storage
# 2018-04-04 15:10:02.333 EDT [kvledger] CommitWithPvtData -> INFO 027 Channel [testchannel]: Committed block [0] with 1 transaction(s)
# 2018-04-04 15:10:02.334 EDT [ledgermgmt] CreateLedger -> INFO 028 Created ledger [testchannel] with genesis block
# 2018-04-04 15:10:02.338 EDT [cscc] Init -> INFO 029 Init CSCC
# 2018-04-04 15:10:02.338 EDT [sccapi] deploySysCC -> INFO 02a system chaincode cscc/testchannel(github.com/hyperledger/fabric/core/scc/cscc) deployed
# 2018-04-04 15:10:02.338 EDT [sccapi] deploySysCC -> INFO 02b system chaincode lscc/testchannel(github.com/hyperledger/fabric/core/scc/lscc) deployed
# 2018-04-04 15:10:02.338 EDT [escc] Init -> INFO 02c Successfully initialized ESCC
# 2018-04-04 15:10:02.338 EDT [sccapi] deploySysCC -> INFO 02d system chaincode escc/testchannel(github.com/hyperledger/fabric/core/scc/escc) deployed
# 2018-04-04 15:10:02.338 EDT [sccapi] deploySysCC -> INFO 02e system chaincode vscc/testchannel(github.com/hyperledger/fabric/core/scc/vscc) deployed
# 2018-04-04 15:10:02.338 EDT [qscc] Init -> INFO 02f Init QSCC
# 2018-04-04 15:10:02.338 EDT [sccapi] deploySysCC -> INFO 030 system chaincode qscc/testchannel(github.com/hyperledger/fabric/core/chaincode/qscc) deployed
# 2018-04-04 15:10:02.339 EDT [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
# 2018-04-04 15:10:02.339 EDT [main] main -> INFO 003 Exiting.....
FABRIC_CFG_PATH=$PWD/peer1 CORE_PEER_MSPCONFIGPATH=crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp GOPATH=$PWD/testdata/chaincode peer chaincode install -n mycc -v 1.0 -p simple/cmd
# 2018-04-04 15:12:40.298 EDT [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
# 2018-04-04 15:12:40.299 EDT [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
# 2018-04-04 15:12:40.672 EDT [lscc] executeInstall -> INFO 032 Installed Chaincode [mycc] Version [1.0] to peer
# 2018-04-04 15:12:40.673 EDT [main] main -> INFO 003 Exiting.....
FABRIC_CFG_PATH=$PWD/peer2 CORE_PEER_MSPCONFIGPATH=crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp GOPATH=$PWD/testdata/chaincode peer chaincode install -n mycc -v 1.0 -p simple/cmd
# 2018-04-04 15:13:16.759 EDT [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
# 2018-04-04 15:13:16.759 EDT [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
# 2018-04-04 15:13:17.134 EDT [lscc] executeInstall -> INFO 031 Installed Chaincode [mycc] Version [1.0] to peer
# 2018-04-04 15:13:17.134 EDT [main] main -> INFO 003 Exiting.....
FABRIC_CFG_PATH=$PWD/peer1 CORE_PEER_MSPCONFIGPATH=crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp peer chaincode instantiate -n mycc -v 1.0 -o 127.0.0.1:7050 -C testchannel -c '{"Args":["init","a","100","b","200"]}' -P "OR ('Org1MSP.member','Org2MSP.member')"
# 2018-04-04 15:15:22.562 EDT [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
# 2018-04-04 15:15:22.562 EDT [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
# 2018-04-04 15:15:22.910 EDT [main] main -> INFO 003 Exiting.....
sleep 5
FABRIC_CFG_PATH=$PWD/peer1 CORE_PEER_MSPCONFIGPATH=crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp peer chaincode list --installed -C testchannel
# Get installed chaincodes on peer:
# Name: mycc, Version: 1.0, Path: simple/cmd, Id: 8c6968c1653904f4e5e170547c8f214b7bd311eca5a076f20fc3d177f9a733a9
# 2018-04-04 15:16:18.556 EDT [main] main -> INFO 001 Exiting.....
FABRIC_CFG_PATH=$PWD/peer1 CORE_PEER_MSPCONFIGPATH=crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp peer chaincode list --instantiated -C testchannel
# Get instantiated chaincodes on channel testchannel:
# Name: mycc, Version: 1.0, Path: simple/cmd, Escc: escc, Vscc: vscc
# 2018-04-04 15:16:26.249 EDT [main] main -> INFO 001 Exiting.....
FABRIC_CFG_PATH=$PWD/peer1 CORE_PEER_MSPCONFIGPATH=crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp peer chaincode query -n mycc -v 1.0 -C testchannel -c '{"Args":["query","a"]}'
# 2018-04-04 15:18:59.656 EDT [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
# 2018-04-04 15:18:59.657 EDT [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
# Query Result: 100
# 2018-04-04 15:18:59.660 EDT [main] main -> INFO 003 Exiting.....
FABRIC_CFG_PATH=$PWD/peer1 CORE_PEER_MSPCONFIGPATH=crypto/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp peer chaincode query -n mycc -v 1.0 -C testchannel -c '{"Args":["query","a"]}'
# 2018-04-04 15:19:39.959 EDT [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
# 2018-04-04 15:19:39.959 EDT [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
# Query Result: 100
# 2018-04-04 15:19:39.963 EDT [main] main -> INFO 003 Exiting.....
FABRIC_CFG_PATH=$PWD/peer2 CORE_PEER_MSPCONFIGPATH=crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp peer chaincode query -n mycc -v 1.0 -C testchannel -c '{"Args":["query","a"]}'
# 2018-04-04 15:20:36.383 EDT [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
# 2018-04-04 15:20:36.383 EDT [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
# 2018-04-04 15:20:36.396 EDT [golang-platform] GenerateDockerBuild -> INFO 034 building chaincode with ldflagsOpt: '-ldflags "-linkmode external -extldflags '-static'"'
# 2018-04-04 15:20:36.396 EDT [golang-platform] GenerateDockerBuild -> INFO 035 building chaincode with tags: experimental
# Query Result: 100
# 2018-04-04 15:20:47.096 EDT [main] main -> INFO 003 Exiting.....
FABRIC_CFG_PATH=$PWD/peer2 CORE_PEER_MSPCONFIGPATH=crypto/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp peer chaincode query -n mycc -v 1.0 -C testchannel -c '{"Args":["query","a"]}'
# 2018-04-04 15:21:24.053 EDT [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
# 2018-04-04 15:21:24.053 EDT [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
# Query Result: 100
# 2018-04-04 15:21:24.057 EDT [main] main -> INFO 003 Exiting.....
FABRIC_CFG_PATH=$PWD/peer1 CORE_PEER_MSPCONFIGPATH=crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp peer chaincode invoke -o 127.0.0.1:7050 -n mycc -C testchannel -c '{"Args":["invoke","a","b","10"]}'
#2018-04-04 15:59:55.160 EDT [msp] getMspConfig -> INFO 001 Loading NodeOUs
#2018-04-04 15:59:55.179 EDT [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default escc
#2018-04-04 15:59:55.179 EDT [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default vscc
#2018-04-04 15:59:55.185 EDT [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 004 Chaincode invoke successful. result: status:200
#2018-04-04 15:59:55.185 EDT [main] main -> INFO 005 Exiting.....
#
# 2018-04-04 15:59:55 ⌚ |2.2.4| cfdojo-2 in ~/workspace/fabric/testme
#○ → 2018-04-04 15:59:57.191 EDT [kvledger] CommitWithPvtData -> INFO 034 Channel [testchannel]: Committed block [2] with 1 transaction(s)
#2018-04-04 15:59:57.191 EDT [kvledger] CommitWithPvtData -> INFO 035 Channel [testchannel]: Committed block [2] with 1 transaction(s)
FABRIC_CFG_PATH=$PWD/peer2 CORE_PEER_MSPCONFIGPATH=crypto/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp peer chaincode query -n mycc -v 1.0 -C testchannel -c '{"Args":["query","a"]}'
# 2018-04-04 15:21:24.053 EDT [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
# 2018-04-04 15:21:24.053 EDT [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
# Query Result: 100
# 2018-04-04 15:21:24.057 EDT [main] main -> INFO 003 Exiting.....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment