#!/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 } 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 } # 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 } 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 } # 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]