• fabric基础设施管理-(二)基础网络搭建


    (一)基础网络搭建

    1.涉及的术语

    (1)机构

    Fabric是有权限的联盟链,机构就是联盟链内的最小身份单元。一个机构内就是私有链,多个机构的私有链联合起来就是联盟链。

    (2)链码

    链码就是区块链上的运行的分布式程序,实现了业务系统的某种功能,实现业务系统上链的功能。

    (3)链码通道

    网络上数据从安全性考虑,支持数据的相互隔离,提供链码通道的方式隔离不同业务数据,提供安全内部公开的。

    2.启动2节点测试网络

    (1)启动区块链网络

    ./network.sh up -ca

    备注: -ca 表示CA作为独立的服务

    执行成功,应有如下几个容器。

    逻辑拓扑分解:

    docker inspect --format='{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq)

    结果;

    /peer0.org2.example.com - 172.19.0.6

    /peer0.org1.example.com - 172.19.0.5

    /orderer.example.com - 172.19.0.7

    /ca_org1 - 172.19.0.4

    /ca_org2 - 172.19.0.3

    /ca_orderer - 172.19.0.2

    (2)创建应用程序通道

    应用程序通道也就是链码通道,通道的作用是联盟内组织之间共享账本,账本是共享数据存储的逻辑介质,物理表现为区块存储的链式结构文件及区块文件。

    ./network.sh up createChannel -ca -c mychannel -s couchdb -i 2.2.1

     

    备注: 

    -ca 表示CA作为独立的服务

    -c 指定链码通道的名称

    -s 存储类型,世界状态数据库的存储类型

    -i 镜像的版本

    (3)网络拓扑

    机构名

    节点

    功能

    IP地址

    机构1

    peer0.org1.example.com

    对等节点

    172.24.0.6

    ca_org1

    机构1的CA节点

    172.24.0.4

    机构2

    peer0.org2.example.com

    对等节点

    172.24.0.7

    ca_org2

    机构2的CA节点

    172.24.0.2

    排序节点

    orderer.example.com

    排序节点

    172.24.0.5

    ca_orderer

    排序的CA节点

    172.24.0.3

    (4)过程剖析

    创建链码通道的过程非常复杂,这里对日志进行剖析,力度弄清楚创建链码的过程。为基础设施的维护打下基础。

     ./network.sh up createChannel -ca -c mychannel -s couchdb -i 2.2.1

    Creating channel 'mychannel'.

    If network is not up, starting nodes with CLI timeout of '5' tries and CLI delay of '3' seconds and using database 'couchdb

    Generating channel create transaction 'mychannel.tx'

    生成通道交易mychannel.tx

    + configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/mychannel.tx -channelID mychannel

    2021-04-02 15:56:46.524 CST [common.tools.configtxgen] main -> INFO 001 Loading configuration

    2021-04-02 15:56:46.550 CST [common.tools.configtxgen.localconfig] Load -> INFO 002 Loaded configuration: /home/john/Downloads/hyper-ledger-inst/2-create-testnetwork/test-network/configtx/configtx.yaml

    2021-04-02 15:56:46.550 CST [common.tools.configtxgen] doOutputChannelCreateTx -> INFO 003 Generating new channel configtx

    2021-04-02 15:56:46.553 CST [common.tools.configtxgen] doOutputChannelCreateTx -> INFO 004 Writing new channel tx

    + res=0

    Generating anchor peer update transactions

    Generating anchor peer update transaction for Org1MSP

    生成机构1锚节点交易Org1MSPanchors.tx

    + configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors.tx -channelID mychannel -asOrg Org1MSP

    2021-04-02 15:56:46.586 CST [common.tools.configtxgen] main -> INFO 001 Loading configuration

    2021-04-02 15:56:46.615 CST [common.tools.configtxgen.localconfig] Load -> INFO 002 Loaded configuration: /home/john/Downloads/hyper-ledger-inst/2-create-testnetwork/test-network/configtx/configtx.yaml

    2021-04-02 15:56:46.615 CST [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO 003 Generating anchor peer update

    2021-04-02 15:56:46.617 CST [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO 004 Writing anchor peer update

    + res=0

    Generating anchor peer update transaction for Org2MSP

    生成机构2锚节点交易Org2MSPanchors.tx

    + configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org2MSPanchors.tx -channelID mychannel -asOrg Org2MSP

    2021-04-02 15:56:46.654 CST [common.tools.configtxgen] main -> INFO 001 Loading configuration

    2021-04-02 15:56:46.681 CST [common.tools.configtxgen.localconfig] Load -> INFO 002 Loaded configuration: /home/john/Downloads/hyper-ledger-inst/2-create-testnetwork/test-network/configtx/configtx.yaml

    2021-04-02 15:56:46.681 CST [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO 003 Generating anchor peer update

    2021-04-02 15:56:46.750 CST [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO 004 Writing anchor peer update

    + res=0

    Creating channel mychannel

    Using organization 1

    使用机构1的身份创建通道mychannel,并产生mychannel.block

    + peer channel create -o localhost:7050 -c mychannel --ordererTLSHostnameOverride orderer.example.com -f ./channel-artifacts/mychannel.tx --outputBlock ./channel-artifacts/mychannel.block --tls --cafile /home/john/Downloads/hyper-ledger-inst/2-create-testnetwork/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem

    + res=0

    2021-04-02 15:56:49.809 CST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized

    2021-04-02 15:56:49.826 CST [cli.common] readBlock -> INFO 002 Expect block, but got status: &{NOT_FOUND}

    2021-04-02 15:56:49.829 CST [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized

    2021-04-02 15:56:50.060 CST [cli.common] readBlock -> INFO 004 Expect block, but got status: &{SERVICE_UNAVAILABLE}

    2021-04-02 15:56:50.063 CST [channelCmd] InitCmdFactory -> INFO 005 Endorser and orderer connections initialized

    2021-04-02 15:56:50.264 CST [cli.common] readBlock -> INFO 006 Expect block, but got status: &{SERVICE_UNAVAILABLE}

    2021-04-02 15:56:50.267 CST [channelCmd] InitCmdFactory -> INFO 007 Endorser and orderer connections initialized

    2021-04-02 15:56:50.468 CST [cli.common] readBlock -> INFO 008 Expect block, but got status: &{SERVICE_UNAVAILABLE}

    2021-04-02 15:56:50.470 CST [channelCmd] InitCmdFactory -> INFO 009 Endorser and orderer connections initialized

    2021-04-02 15:56:50.671 CST [cli.common] readBlock -> INFO 00a Expect block, but got status: &{SERVICE_UNAVAILABLE}

    2021-04-02 15:56:50.674 CST [channelCmd] InitCmdFactory -> INFO 00b Endorser and orderer connections initialized

    2021-04-02 15:56:50.875 CST [cli.common] readBlock -> INFO 00c Expect block, but got status: &{SERVICE_UNAVAILABLE}

    2021-04-02 15:56:50.878 CST [channelCmd] InitCmdFactory -> INFO 00d Endorser and orderer connections initialized

    2021-04-02 15:56:51.081 CST [cli.common] readBlock -> INFO 00e Received block: 0

    Channel 'mychannel' created

    Join Org1 peers to the channel...

    Using organization 1

    使用机构1的身份,把初始区块mychannel.block加入到节点

    + peer channel join -b ./channel-artifacts/mychannel.block

    + res=0

    2021-04-02 15:56:54.140 CST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized

    2021-04-02 15:56:54.503 CST [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel

    Join Org2 peers to the channel...

    Using organization 2

    使用机构2的身份,把初始区块mychannel.block加入到节点

    + peer channel join -b ./channel-artifacts/mychannel.block

    + res=0

    2021-04-02 15:56:57.561 CST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized

    2021-04-02 15:56:57.936 CST [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel

    Updating anchor peers for org1...

    Using organization 1

    使用机构1的身份,更新通道,指定锚节点Org1MSPanchors.tx

    + peer channel update -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com -c mychannel -f ./channel-artifacts/Org1MSPanchors.tx --tls --cafile /home/john/Downloads/hyper-ledger-inst/2-create-testnetwork/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem

    + res=0

    2021-04-02 15:57:01.001 CST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized

    2021-04-02 15:57:01.012 CST [channelCmd] update -> INFO 002 Successfully submitted channel update

    Anchor peers updated for org 'Org1MSP' on channel 'mychannel'

    Updating anchor peers for org2...

    Using organization 2

    使用机构2的身份,更新通道,指定锚节点Org2MSPanchors.tx

    + peer channel update -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com -c mychannel -f ./channel-artifacts/Org2MSPanchors.tx --tls --cafile /home/john/Downloads/hyper-ledger-inst/2-create-testnetwork/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem

    + res=0

    2021-04-02 15:57:07.072 CST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized

    2021-04-02 15:57:07.084 CST [channelCmd] update -> INFO 002 Successfully submitted channel update

    Anchor peers updated for org 'Org2MSP' on channel 'mychannel'

    Channel successfully joined

    (5)日志分析

    分析日志,理清楚节点的工作流程。

    排序节点日志

    执行命令:

    [root@localhost test-network]# docker logs -f orderer.example.com

    日志如下:

    2021-04-07 05:42:30.223 UTC [localconfig] completeInitialization -> WARN 001 General.GenesisFile should be replaced by General.BootstrapFile

    2021-04-07 05:42:30.223 UTC [localconfig] completeInitialization -> INFO 002 Kafka.Version unset, setting to 0.10.2.0

    2021-04-07 05:42:30.224 UTC [orderer.common.server] prettyPrintStruct -> INFO 003 Orderer config values:

    排序节点配置信息

    General.ListenAddress = "0.0.0.0"

    General.ListenPort = 7050

    General.TLS.Enabled = true

    General.TLS.PrivateKey = "/var/hyperledger/orderer/tls/server.key"

    General.TLS.Certificate = "/var/hyperledger/orderer/tls/server.crt"

    General.TLS.RootCAs = [/var/hyperledger/orderer/tls/ca.crt]

    General.TLS.ClientAuthRequired = false

    General.TLS.ClientRootCAs = []

    General.TLS.TLSHandshakeTimeShift = 0s

    General.Cluster.ListenAddress = ""

    General.Cluster.ListenPort = 0

    General.Cluster.ServerCertificate = ""

    General.Cluster.ServerPrivateKey = ""

    General.Cluster.ClientCertificate = "/var/hyperledger/orderer/tls/server.crt"

    General.Cluster.ClientPrivateKey = "/var/hyperledger/orderer/tls/server.key"

    General.Cluster.RootCAs = [/var/hyperledger/orderer/tls/ca.crt]

    General.Cluster.DialTimeout = 5s

    General.Cluster.RPCTimeout = 7s

    General.Cluster.ReplicationBufferSize = 20971520

    General.Cluster.ReplicationPullTimeout = 5s

    General.Cluster.ReplicationRetryTimeout = 5s

    General.Cluster.ReplicationBackgroundRefreshInterval = 5m0s

    General.Cluster.ReplicationMaxRetries = 12

    General.Cluster.SendBufferSize = 10

    General.Cluster.CertExpirationWarningThreshold = 168h0m0s

    General.Cluster.TLSHandshakeTimeShift = 0s

    General.Keepalive.ServerMinInterval = 1m0s

    General.Keepalive.ServerInterval = 2h0m0s

    General.Keepalive.ServerTimeout = 20s

    General.ConnectionTimeout = 0s

    General.GenesisMethod = "file"

    创世纪区块文件

    General.GenesisFile = "/var/hyperledger/orderer/orderer.genesis.block"

    General.BootstrapMethod = "file"

    General.BootstrapFile = "/var/hyperledger/orderer/orderer.genesis.block"

    General.Profile.Enabled = false

    General.Profile.Address = "0.0.0.0:6060"

    General.LocalMSPDir = "/var/hyperledger/orderer/msp"

    General.LocalMSPID = "OrdererMSP"

    General.BCCSP.ProviderName = "SW"

    General.BCCSP.SwOpts.SecLevel = 256

    General.BCCSP.SwOpts.HashFamily = "SHA2"

    General.BCCSP.SwOpts.Ephemeral = true

    General.BCCSP.SwOpts.FileKeystore.KeyStorePath = ""

    General.BCCSP.SwOpts.DummyKeystore =

    General.BCCSP.SwOpts.InmemKeystore =

    General.Authentication.TimeWindow = 15m0s

    General.Authentication.NoExpirationChecks = false

    FileLedger.Location = "/var/hyperledger/production/orderer"

    FileLedger.Prefix = "hyperledger-fabric-ordererledger"

    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 = true

    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 = []

    Kafka.TLS.TLSHandshakeTimeShift = 0s

    Kafka.SASLPlain.Enabled = false

    Kafka.SASLPlain.User = ""

    Kafka.SASLPlain.Password = ""

    Kafka.Topic.ReplicationFactor = 1

    Debug.BroadcastTraceDir = ""

    Debug.DeliverTraceDir = ""

    Consensus = map[SnapDir:/var/hyperledger/production/orderer/etcdraft/snapshot WALDir:/var/hyperledger/production/orderer/etcdraft/wal]

    Operations.ListenAddress = "127.0.0.1:8443"

    Operations.TLS.Enabled = false

    Operations.TLS.PrivateKey = ""

    Operations.TLS.Certificate = ""

    Operations.TLS.RootCAs = []

    Operations.TLS.ClientAuthRequired = false

    Operations.TLS.ClientRootCAs = []

    Operations.TLS.TLSHandshakeTimeShift = 0s

    Metrics.Provider = "disabled"

    Metrics.Statsd.Network = "udp"

    Metrics.Statsd.Address = "127.0.0.1:8125"

    Metrics.Statsd.WriteInterval = 30s

    Metrics.Statsd.Prefix = ""

    ChannelParticipation.Enabled = false

    ChannelParticipation.RemoveStorage = false

    TLS启用,TLS安全传输层协议

    2021-04-07 05:42:30.324 UTC [orderer.common.server] initializeServerConfig -> INFO 004 Starting orderer with TLS enabled

    2021-04-07 05:42:30.424 UTC [blkstorage] NewProvider -> INFO 005 Creating new file ledger directory at /var/hyperledger/production/orderer/chains

    2021-04-07 05:42:30.479 UTC [orderer.common.server] Main -> INFO 006 Bootstrapping the system channel

    从区块存储上获取区块信息

    2021-04-07 05:42:30.479 UTC [blkstorage] newBlockfileMgr -> INFO 007 Getting block information from block storage

    2021-04-07 05:42:30.529 UTC [orderer.common.server] selectClusterBootBlock -> INFO 008 Cluster boot block is bootstrap (genesis) block; Blocks Header.Number system-channel=0, bootstrap=0

    一致性类型: etcdraft

    2021-04-07 05:42:30.533 UTC [orderer.common.server] Main -> INFO 009 Starting with system channel: system-channel, consensus type: etcdraft

    2021-04-07 05:42:30.534 UTC [orderer.common.server] Main -> INFO 00a Setting up cluster

    2021-04-07 05:42:30.534 UTC [orderer.common.server] reuseListener -> INFO 00b Cluster listener is not configured, defaulting to use the general listener on port 7050

    2021-04-07 05:42:30.534 UTC [orderer.common.server] reuseListener -> INFO 00c Cluster listener is not configured, defaulting to use the general listener on port 7050

    2021-04-07 05:42:30.556 UTC [orderer.common.cluster] loadVerifier -> INFO 00d Loaded verifier for channel system-channel from config block at index 0

    2021-04-07 05:42:30.559 UTC [certmonitor] trackCertExpiration -> INFO 00e The enrollment certificate will expire on 2022-04-07 05:42:00 +0000 UTC

    2021-04-07 05:42:30.559 UTC [certmonitor] trackCertExpiration -> INFO 00f The server TLS certificate will expire on 2022-04-07 05:42:00 +0000 UTC

    2021-04-07 05:42:30.559 UTC [certmonitor] trackCertExpiration -> INFO 010 The client TLS certificate will expire on 2022-04-07 05:42:00 +0000 UTC

    2021-04-07 05:42:30.671 UTC [orderer.consensus.etcdraft] HandleChain -> INFO 011 EvictionSuspicion not set, defaulting to 10m0s

    没有钱包wallet法相,创建信息的钱包

    2021-04-07 05:42:30.677 UTC [orderer.consensus.etcdraft] createOrReadWAL -> INFO 012 No WAL data found, creating new WAL at path '/var/hyperledger/production/orderer/etcdraft/wal/system-channel' channel=system-channel node=1

    2021-04-07 05:42:30.779 UTC [orderer.commmon.multichannel] Initialize -> INFO 013 Starting system channel 'system-channel' with genesis block hash 7ce1905a312e44be154d1ceaa23c33815b333c365d8040d1702bc5bd8877cbb2 and orderer type etcdraft

    2021-04-07 05:42:30.781 UTC [orderer.consensus.etcdraft] Start -> INFO 014 Starting Raft node channel=system-channel node=1

    2021-04-07 05:42:30.781 UTC [orderer.common.cluster] Configure -> INFO 015 Entering, channel: system-channel, nodes: []

    2021-04-07 05:42:30.781 UTC [orderer.common.cluster] Configure -> INFO 016 Exiting

    2021-04-07 05:42:30.782 UTC [orderer.consensus.etcdraft] start -> INFO 017 Starting raft node as part of a new channel channel=system-channel node=1

    2021-04-07 05:42:30.782 UTC [orderer.consensus.etcdraft] becomeFollower -> INFO 018 1 became follower at term 0 channel=system-channel node=1

    2021-04-07 05:42:30.782 UTC [orderer.consensus.etcdraft] newRaft -> INFO 019 newRaft 1 [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0] channel=system-channel node=1

    2021-04-07 05:42:30.782 UTC [orderer.consensus.etcdraft] becomeFollower -> INFO 01a 1 became follower at term 1 channel=system-channel node=1

    2021-04-07 05:42:30.791 UTC [orderer.consensus.etcdraft] run -> INFO 01b This node is picked to start campaign channel=system-channel node=1

    2021-04-07 05:42:30.796 UTC [orderer.common.server] Main -> INFO 01c Starting orderer:

     Version: 2.2.1

     Commit SHA: 344fda6

     Go version: go1.14.4

     OS/Arch: linux/amd64

    2021-04-07 05:42:30.799 UTC [orderer.common.server] Main -> INFO 01d Beginning to serve requests

    2021-04-07 05:42:30.831 UTC [orderer.consensus.etcdraft] apply -> INFO 01e Applied config change to add node 1, current nodes in channel: [1] channel=system-channel node=1

    2021-04-07 05:42:31.822 UTC [orderer.consensus.etcdraft] Step -> INFO 01f 1 is starting a new election at term 1 channel=system-channel node=1

    2021-04-07 05:42:31.822 UTC [orderer.consensus.etcdraft] becomePreCandidate -> INFO 020 1 became pre-candidate at term 1 channel=system-channel node=1

    2021-04-07 05:42:31.822 UTC [orderer.consensus.etcdraft] poll -> INFO 021 1 received MsgPreVoteResp from 1 at term 1 channel=system-channel node=1

    2021-04-07 05:42:31.822 UTC [orderer.consensus.etcdraft] becomeCandidate -> INFO 022 1 became candidate at term 2 channel=system-channel node=1

    2021-04-07 05:42:31.822 UTC [orderer.consensus.etcdraft] poll -> INFO 023 1 received MsgVoteResp from 1 at term 2 channel=system-channel node=1

    2021-04-07 05:42:31.822 UTC [orderer.consensus.etcdraft] becomeLeader -> INFO 024 1 became leader at term 2 channel=system-channel node=1

    2021-04-07 05:42:31.822 UTC [orderer.consensus.etcdraft] run -> INFO 025 raft.node: 1 elected leader 1 at term 2 channel=system-channel node=1

    2021-04-07 05:42:31.852 UTC [orderer.consensus.etcdraft] run -> INFO 026 Leader 1 is present, quit campaign channel=system-channel node=1

    2021-04-07 05:42:31.853 UTC [orderer.consensus.etcdraft] run -> INFO 027 Raft leader changed: 0 -> 1 channel=system-channel node=1

    2021-04-07 05:42:31.853 UTC [orderer.consensus.etcdraft] run -> INFO 028 Start accepting requests as Raft leader at block [0] channel=system-channel node=1

    2021-04-07 05:43:36.085 UTC [orderer.consensus.etcdraft] propose -> INFO 029 Created block [1], there are 0 blocks in flight channel=system-channel node=1

    2021-04-07 05:43:36.085 UTC [orderer.consensus.etcdraft] run -> INFO 02a Received config transaction, pause accepting transaction till it is committed channel=system-channel node=1

    2021-04-07 05:43:36.104 UTC [comm.grpc.server] 1 -> INFO 02b streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=172.18.0.1:54228 grpc.code=OK grpc.call_duration=183.180666ms

    2021-04-07 05:43:36.105 UTC [comm.grpc.server] 1 -> INFO 02c streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Broadcast grpc.peer_address=172.18.0.1:54232 grpc.code=OK grpc.call_duration=157.935901ms

    写入区块到账本

    2021-04-07 05:43:36.106 UTC [orderer.consensus.etcdraft] writeBlock -> INFO 02d Writing block [1] (Raft index: 3) to ledger channel=system-channel node=1

    2021-04-07 05:43:36.118 UTC [blkstorage] newBlockfileMgr -> INFO 02e Getting block information from block storage

    2021-04-07 05:43:36.163 UTC [orderer.consensus.etcdraft] HandleChain -> INFO 02f EvictionSuspicion not set, defaulting to 10m0s

    2021-04-07 05:43:36.164 UTC [orderer.consensus.etcdraft] createOrReadWAL -> INFO 030 No WAL data found, creating new WAL at path '/var/hyperledger/production/orderer/etcdraft/wal/mychannel' channel=mychannel node=1

    2021-04-07 05:43:36.185 UTC [orderer.commmon.multichannel] newChain -> INFO 031 Created and starting new channel mychannel

    2021-04-07 05:43:36.185 UTC [orderer.consensus.etcdraft] Start -> INFO 032 Starting Raft node channel=mychannel node=1

    2021-04-07 05:43:36.186 UTC [orderer.common.cluster] Configure -> INFO 033 Entering, channel: mychannel, nodes: []

    2021-04-07 05:43:36.186 UTC [orderer.common.cluster] Configure -> INFO 034 Exiting

    2021-04-07 05:43:36.186 UTC [orderer.consensus.etcdraft] start -> INFO 035 Starting raft node as part of a new channel channel=mychannel node=1

    2021-04-07 05:43:36.186 UTC [orderer.consensus.etcdraft] becomeFollower -> INFO 036 1 became follower at term 0 channel=mychannel node=1

    2021-04-07 05:43:36.186 UTC [orderer.consensus.etcdraft] newRaft -> INFO 037 newRaft 1 [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0] channel=mychannel node=1

    2021-04-07 05:43:36.186 UTC [orderer.consensus.etcdraft] becomeFollower -> INFO 038 1 became follower at term 1 channel=mychannel node=1

    2021-04-07 05:43:36.193 UTC [orderer.consensus.etcdraft] run -> INFO 039 This node is picked to start campaign channel=mychannel node=1

    2021-04-07 05:43:36.211 UTC [orderer.consensus.etcdraft] apply -> INFO 03a Applied config change to add node 1, current nodes in channel: [1] channel=mychannel node=1

    2021-04-07 05:43:36.347 UTC [common.deliver] deliverBlocks -> WARN 03b [channel: mychannel] Rejecting deliver request for 172.18.0.1:54236 because of consenter error

    2021-04-07 05:43:36.347 UTC [comm.grpc.server] 1 -> INFO 03c streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=172.18.0.1:54236 grpc.code=OK grpc.call_duration=186.293193ms

    2021-04-07 05:43:36.592 UTC [common.deliver] deliverBlocks -> WARN 03d [channel: mychannel] Rejecting deliver request for 172.18.0.1:54240 because of consenter error

    2021-04-07 05:43:36.592 UTC [comm.grpc.server] 1 -> INFO 03e streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=172.18.0.1:54240 grpc.code=OK grpc.call_duration=202.510577ms

    2021-04-07 05:43:36.827 UTC [common.deliver] deliverBlocks -> WARN 03f [channel: mychannel] Rejecting deliver request for 172.18.0.1:54244 because of consenter error

    2021-04-07 05:43:36.828 UTC [comm.grpc.server] 1 -> INFO 040 streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=172.18.0.1:54244 grpc.code=OK grpc.call_duration=202.487999ms

    2021-04-07 05:43:37.049 UTC [common.deliver] deliverBlocks -> WARN 041 [channel: mychannel] Rejecting deliver request for 172.18.0.1:54248 because of consenter error

    2021-04-07 05:43:37.049 UTC [comm.grpc.server] 1 -> INFO 042 streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=172.18.0.1:54248 grpc.code=OK grpc.call_duration=202.472354ms

    2021-04-07 05:43:37.201 UTC [orderer.consensus.etcdraft] Step -> INFO 043 1 is starting a new election at term 1 channel=mychannel node=1

    2021-04-07 05:43:37.201 UTC [orderer.consensus.etcdraft] becomePreCandidate -> INFO 044 1 became pre-candidate at term 1 channel=mychannel node=1

    2021-04-07 05:43:37.201 UTC [orderer.consensus.etcdraft] poll -> INFO 045 1 received MsgPreVoteResp from 1 at term 1 channel=mychannel node=1

    2021-04-07 05:43:37.201 UTC [orderer.consensus.etcdraft] becomeCandidate -> INFO 046 1 became candidate at term 2 channel=mychannel node=1

    2021-04-07 05:43:37.201 UTC [orderer.consensus.etcdraft] poll -> INFO 047 1 received MsgVoteResp from 1 at term 2 channel=mychannel node=1

    2021-04-07 05:43:37.201 UTC [orderer.consensus.etcdraft] becomeLeader -> INFO 048 1 became leader at term 2 channel=mychannel node=1

    2021-04-07 05:43:37.201 UTC [orderer.consensus.etcdraft] run -> INFO 049 raft.node: 1 elected leader 1 at term 2 channel=mychannel node=1

    2021-04-07 05:43:37.213 UTC [orderer.consensus.etcdraft] run -> INFO 04a Leader 1 is present, quit campaign channel=mychannel node=1

    共识算法发挥做个,重新选leader节点,leader节点0变更为1

    2021-04-07 05:43:37.213 UTC [orderer.consensus.etcdraft] run -> INFO 04b Raft leader changed: 0 -> 1 channel=mychannel node=1

    2021-04-07 05:43:37.213 UTC [orderer.consensus.etcdraft] run -> INFO 04c Start accepting requests as Raft leader at block [0] channel=mychannel node=1

    2021-04-07 05:43:37.320 UTC [common.deliver] Handle -> WARN 04d Error reading from 172.18.0.1:54252: rpc error: code = Canceled desc = context canceled

    2021-04-07 05:43:37.320 UTC [comm.grpc.server] 1 -> INFO 04e streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=172.18.0.1:54252 error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=253.071227ms

    2021-04-07 05:43:48.048 UTC [orderer.consensus.etcdraft] propose -> INFO 04f Created block [1], there are 0 blocks in flight channel=mychannel node=1

    2021-04-07 05:43:48.049 UTC [orderer.consensus.etcdraft] run -> INFO 050 Received config transaction, pause accepting transaction till it is committed channel=mychannel node=1

    2021-04-07 05:43:48.053 UTC [orderer.consensus.etcdraft] writeBlock -> INFO 051 Writing block [1] (Raft index: 3) to ledger channel=mychannel node=1

    2021-04-07 05:43:48.057 UTC [orderer.common.broadcast] Handle -> WARN 052 Error reading from 172.18.0.1:54272: rpc error: code = Canceled desc = context canceled

    2021-04-07 05:43:48.058 UTC [comm.grpc.server] 1 -> INFO 053 streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Broadcast grpc.peer_address=172.18.0.1:54272 error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=27.779646ms

    2021-04-07 05:43:54.281 UTC [orderer.consensus.etcdraft] propose -> INFO 054 Created block [2], there are 0 blocks in flight channel=mychannel node=1

    2021-04-07 05:43:54.281 UTC [orderer.consensus.etcdraft] run -> INFO 055 Received config transaction, pause accepting transaction till it is committed channel=mychannel node=1

    2021-04-07 05:43:54.288 UTC [orderer.consensus.etcdraft] writeBlock -> INFO 056 Writing block [2] (Raft index: 4) to ledger channel=mychannel node=1

    2021-04-07 05:43:54.306 UTC [orderer.common.broadcast] Handle -> WARN 057 Error reading from 172.18.0.1:54280: rpc error: code = Canceled desc = context canceled

    2021-04-07 05:43:54.307 UTC [comm.grpc.server] 1 -> INFO 058 streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Broadcast grpc.peer_address=172.18.0.1:54280 error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=57.886174ms

    组织1对等节点日志

    执行命令:

    docker logs -f peer0.org1.example.com

    日志如下:

    2021-04-07 05:42:31.412 UTC [nodeCmd] serve -> INFO 001 Starting peer:

     Version: 2.2.1

     Commit SHA: 344fda6

     Go version: go1.14.4

     OS/Arch: linux/amd64

     Chaincode:

      Base Docker Label: org.hyperledger.fabric

      Docker Namespace: hyperledger

    2021-04-07 05:42:31.414 UTC [peer] getLocalAddress -> INFO 002 Auto-detected peer address: 172.18.0.6:7051

    2021-04-07 05:42:31.415 UTC [peer] getLocalAddress -> INFO 003 Returning peer0.org1.example.com:7051

    2021-04-07 05:42:31.615 UTC [nodeCmd] initGrpcSemaphores -> INFO 004 concurrency limit for endorser service is 2500

    2021-04-07 05:42:31.615 UTC [nodeCmd] initGrpcSemaphores -> INFO 005 concurrency limit for deliver service is 2500

    2021-04-07 05:42:31.615 UTC [nodeCmd] serve -> INFO 006 Starting peer with TLS enabled

    2021-04-07 05:42:31.744 UTC [certmonitor] trackCertExpiration -> INFO 007 The enrollment certificate will expire on 2022-04-07 05:42:00 +0000 UTC

    2021-04-07 05:42:31.752 UTC [certmonitor] trackCertExpiration -> INFO 008 The server TLS certificate will expire on 2022-04-07 05:42:00 +0000 UTC

    2021-04-07 05:42:31.792 UTC [ledgermgmt] NewLedgerMgr -> INFO 009 Initializing LedgerMgr

    数据库

    2021-04-07 05:42:31.945 UTC [leveldbhelper] openDBAndCheckFormat -> INFO 00a DB is empty Setting db format as 2.0

    2021-04-07 05:42:31.970 UTC [blkstorage] NewProvider -> INFO 00b Creating new file ledger directory at /var/hyperledger/production/ledgersData/chains/chains

    2021-04-07 05:42:32.035 UTC [leveldbhelper] openDBAndCheckFormat -> INFO 00c DB is empty Setting db format as 2.0

    2021-04-07 05:42:32.099 UTC [leveldbhelper] openDBAndCheckFormat -> INFO 00d DB is empty Setting db format as 2.0

    2021-04-07 05:42:32.149 UTC [ledgermgmt] NewLedgerMgr -> INFO 00e Initialized LedgerMgr

    2021-04-07 05:42:32.219 UTC [gossip.service] New -> INFO 00f Initialize gossip with endpoint peer0.org1.example.com:7051

    P2P协议

    2021-04-07 05:42:32.222 UTC [gossip.gossip] New -> INFO 010 Creating gossip service with self membership of Endpoint: peer0.org1.example.com:7051, InternalEndpoint: peer0.org1.example.com:7051, PKI-ID: 7bffefe95aa9aafada7b93e38bd7b0ec1821bb4749297534f3f8401aa69fbeca, Metadata:

    2021-04-07 05:42:32.223 UTC [lifecycle] InitializeLocalChaincodes -> INFO 011 Initialized lifecycle cache with 0 already installed chaincodes

    2021-04-07 05:42:32.224 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 012 Entering computeChaincodeEndpoint with peerHostname: peer0.org1.example.com

    2021-04-07 05:42:32.224 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 013 Exit with ccEndpoint: peer0.org1.example.com:7052

    2021-04-07 05:42:32.230 UTC [gossip.gossip] start -> INFO 014 Gossip instance peer0.org1.example.com:7051 started

    2021-04-07 05:42:32.265 UTC [sccapi] DeploySysCC -> INFO 015 deploying system chaincode 'lscc'

    2021-04-07 05:42:32.266 UTC [sccapi] DeploySysCC -> INFO 016 deploying system chaincode 'cscc'

    2021-04-07 05:42:32.266 UTC [sccapi] DeploySysCC -> INFO 017 deploying system chaincode 'qscc'

    2021-04-07 05:42:32.267 UTC [sccapi] DeploySysCC -> INFO 018 deploying system chaincode '_lifecycle'

    2021-04-07 05:42:32.267 UTC [nodeCmd] serve -> INFO 019 Deployed system chaincodes

    2021-04-07 05:42:32.267 UTC [discovery] NewService -> INFO 01a Created with config TLS: true, authCacheMaxSize: 1000, authCachePurgeRatio: 0.750000

    2021-04-07 05:42:32.267 UTC [nodeCmd] registerDiscoveryService -> INFO 01b Discovery service activated

    2021-04-07 05:42:32.267 UTC [nodeCmd] serve -> INFO 01c Starting peer with ID=[peer0.org1.example.com], network ID=[dev], address=[peer0.org1.example.com:7051]

    2021-04-07 05:42:32.268 UTC [nodeCmd] func6 -> INFO 01d Starting profiling server with listenAddress = 0.0.0.0:6060

    2021-04-07 05:42:32.268 UTC [nodeCmd] serve -> INFO 01e Started peer with ID=[peer0.org1.example.com], network ID=[dev], address=[peer0.org1.example.com:7051]

    2021-04-07 05:42:32.269 UTC [kvledger] LoadPreResetHeight -> INFO 01f Loading prereset height from path [/var/hyperledger/production/ledgersData/chains]

    2021-04-07 05:42:32.269 UTC [blkstorage] preResetHtFiles -> INFO 020 No active channels passed

    使用创世纪区块创建账本

    2021-04-07 05:43:40.684 UTC [ledgermgmt] CreateLedger -> INFO 021 Creating ledger [mychannel] with genesis block

    2021-04-07 05:43:40.717 UTC [blkstorage] newBlockfileMgr -> INFO 022 Getting block information from block storage

    2021-04-07 05:43:40.772 UTC [kvledger] CommitLegacy -> INFO 023 [mychannel] Committed block [0] with 1 transaction(s) in 23ms (state_validation=1ms block_and_pvtdata_commit=9ms state_commit=3ms) commitHash=[]

    2021-04-07 05:43:40.781 UTC [ledgermgmt] CreateLedger -> INFO 024 Created ledger [mychannel] with genesis block

    2021-04-07 05:43:40.788 UTC [peer.orderers] Update -> WARN 025 Config defines both orderer org specific endpoints and global endpoints, global endpoints will be ignored channel=mychannel

    2021-04-07 05:43:40.789 UTC [gossip.gossip] JoinChan -> INFO 026 Joining gossip network of channel mychannel with 2 organizations

    2021-04-07 05:43:40.789 UTC [gossip.gossip] learnAnchorPeers -> INFO 027 No configured anchor peers of Org1MSP for channel mychannel to learn about

    2021-04-07 05:43:40.789 UTC [gossip.gossip] learnAnchorPeers -> INFO 028 No configured anchor peers of Org2MSP for channel mychannel to learn about

    2021-04-07 05:43:40.812 UTC [gossip.state] NewGossipStateProvider -> INFO 029 Updating metadata information for channel mychannel, current ledger sequence is at = 0, next expected block is = 1

    2021-04-07 05:43:40.812 UTC [deliveryClient] StartDeliverForChannel -> INFO 02a This peer will retrieve blocks from ordering service and disseminate to other peers in the organization for channel mychannel

    2021-04-07 05:43:40.829 UTC [endorser] callChaincode -> INFO 02b finished chaincode: cscc duration: 161ms channel= txID=cef47128

    2021-04-07 05:43:40.829 UTC [comm.grpc.server] 1 -> INFO 02c unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.18.0.1:49678 grpc.code=OK grpc.call_duration=168.568798ms

    2021-04-07 05:43:48.084 UTC [gossip.privdata] StoreBlock -> INFO 02d [mychannel] Received block [1] from buffer

    2021-04-07 05:43:48.097 UTC [peer.orderers] Update -> WARN 02e Config defines both orderer org specific endpoints and global endpoints, global endpoints will be ignored channel=mychannel

    加入具有2个组织的P2P网络

    2021-04-07 05:43:48.098 UTC [gossip.gossip] JoinChan -> INFO 02f Joining gossip network of channel mychannel with 2 organizations

    了解到配置的组织1的锚节点

    2021-04-07 05:43:48.098 UTC [gossip.gossip] learnAnchorPeers -> INFO 030 Learning about the configured anchor peers of Org1MSP for channel mychannel: [{peer0.org1.example.com 7051}]

    2021-04-07 05:43:48.098 UTC [gossip.gossip] learnAnchorPeers -> INFO 031 Anchor peer for channel mychannel with same endpoint, skipping connecting to myself

    组织2没有配置锚节点

    2021-04-07 05:43:48.098 UTC [gossip.gossip] learnAnchorPeers -> INFO 032 No configured anchor peers of Org2MSP for channel mychannel to learn about

    2021-04-07 05:43:48.099 UTC [committer.txvalidator] Validate -> INFO 033 [mychannel] Validated block [1] in 14ms

    一次调用完成

    2021-04-07 05:43:48.125 UTC [comm.grpc.server] 1 -> INFO 034 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2021-04-07T05:43:50.124Z grpc.peer_address=172.18.0.7:35102 grpc.peer_subject="CN=peer0,OU=peer,O=Hyperledger,ST=North Carolina,C=US" grpc.code=OK grpc.call_duration=235.203µs

    节点探测我们

    2021-04-07 05:43:48.147 UTC [gossip.comm] GossipStream -> INFO 035 Peer f850bdee22e3bfa395f027390db753d9ca6a1cd78ad60a1f029b38eafeaac205 (172.18.0.7:35102) probed us

    2021-04-07 05:43:48.147 UTC [comm.grpc.server] 1 -> INFO 036 streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2021-04-07T05:43:58.129Z grpc.peer_address=172.18.0.7:35102 grpc.peer_subject="CN=peer0,OU=peer,O=Hyperledger,ST=North Carolina,C=US" grpc.code=OK grpc.call_duration=18.247955ms

    2021-04-07 05:43:48.156 UTC [comm.grpc.server] 1 -> INFO 037 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2021-04-07T05:43:50.155Z grpc.peer_address=172.18.0.7:35104 grpc.peer_subject="CN=peer0,OU=peer,O=Hyperledger,ST=North Carolina,C=US" grpc.code=OK grpc.call_duration=269.332µs

    提交了一次交易

    2021-04-07 05:43:48.163 UTC [kvledger] CommitLegacy -> INFO 038 [mychannel] Committed block [1] with 1 transaction(s) in 56ms (state_validation=0ms block_and_pvtdata_commit=18ms state_commit=31ms) commitHash=[47dc540c94ceb704a23875c11273e16bb0b8a87aed84de911f2133568115f254]

    成员关系改变,在线节点

    2021-04-07 05:43:50.790 UTC [gossip.channel] reportMembershipChanges -> INFO 039 [[mychannel] Membership view has changed. peers went online:  [[peer0.org2.example.com:9051 ]] , current view:  [[peer0.org2.example.com:9051 ]]]

    2021-04-07 05:43:54.406 UTC [gossip.privdata] StoreBlock -> INFO 03a [mychannel] Received block [2] from buffer

    2021-04-07 05:43:54.422 UTC [comm.grpc.server] 1 -> INFO 03b unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2021-04-07T05:43:56.422Z grpc.peer_address=172.18.0.7:35110 grpc.peer_subject="CN=peer0,OU=peer,O=Hyperledger,ST=North Carolina,C=US" grpc.code=OK grpc.call_duration=287.918µs

    2021-04-07 05:43:54.433 UTC [gossip.comm] GossipStream -> INFO 03c Peer f850bdee22e3bfa395f027390db753d9ca6a1cd78ad60a1f029b38eafeaac205 (172.18.0.7:35110) probed us

    2021-04-07 05:43:54.433 UTC [comm.grpc.server] 1 -> INFO 03d streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2021-04-07T05:44:04.428Z grpc.peer_address=172.18.0.7:35110 grpc.peer_subject="CN=peer0,OU=peer,O=Hyperledger,ST=North Carolina,C=US" grpc.code=OK grpc.call_duration=4.387018ms

    2021-04-07 05:43:54.434 UTC [peer.orderers] Update -> WARN 03e Config defines both orderer org specific endpoints and global endpoints, global endpoints will be ignored channel=mychannel

    2021-04-07 05:43:54.435 UTC [gossip.gossip] JoinChan -> INFO 03f Joining gossip network of channel mychannel with 2 organizations

    2021-04-07 05:43:54.443 UTC [gossip.gossip] learnAnchorPeers -> INFO 040 Learning about the configured anchor peers of Org1MSP for channel mychannel: [{peer0.org1.example.com 7051}]

    2021-04-07 05:43:54.448 UTC [gossip.gossip] learnAnchorPeers -> INFO 041 Anchor peer for channel mychannel with same endpoint, skipping connecting to myself

    组织2配置了锚节点

    2021-04-07 05:43:54.448 UTC [gossip.gossip] learnAnchorPeers -> INFO 042 Learning about the configured anchor peers of Org2MSP for channel mychannel: [{peer0.org2.example.com 9051}]

    2021-04-07 05:43:54.450 UTC [committer.txvalidator] Validate -> INFO 043 [mychannel] Validated block [2] in 43ms

    2021-04-07 05:43:54.491 UTC [kvledger] CommitLegacy -> INFO 044 [mychannel] Committed block [2] with 1 transaction(s) in 41ms (state_validation=0ms block_and_pvtdata_commit=11ms state_commit=7ms) commitHash=[5f88b61407b149a48413433f4670c46531e5c4a8febdc339a9536ff8716a559e]

    ③组织2对等节点日志

    执行命令:

    docker logs -f peer0.org2.example.com

    日志如下:

    2021-04-07 05:42:31.868 UTC [nodeCmd] serve -> INFO 001 Starting peer:

     Version: 2.2.1

     Commit SHA: 344fda6

     Go version: go1.14.4

     OS/Arch: linux/amd64

     Chaincode:

      Base Docker Label: org.hyperledger.fabric

      Docker Namespace: hyperledger

    2021-04-07 05:42:31.889 UTC [peer] getLocalAddress -> INFO 002 Auto-detected peer address: 172.18.0.7:9051

    2021-04-07 05:42:31.893 UTC [peer] getLocalAddress -> INFO 003 Returning peer0.org2.example.com:9051

    2021-04-07 05:42:31.929 UTC [nodeCmd] initGrpcSemaphores -> INFO 004 concurrency limit for endorser service is 2500

    2021-04-07 05:42:31.929 UTC [nodeCmd] initGrpcSemaphores -> INFO 005 concurrency limit for deliver service is 2500

    2021-04-07 05:42:31.929 UTC [nodeCmd] serve -> INFO 006 Starting peer with TLS enabled

    2021-04-07 05:42:31.985 UTC [certmonitor] trackCertExpiration -> INFO 007 The enrollment certificate will expire on 2022-04-07 05:42:00 +0000 UTC

    2021-04-07 05:42:31.989 UTC [certmonitor] trackCertExpiration -> INFO 008 The server TLS certificate will expire on 2022-04-07 05:42:00 +0000 UTC

    2021-04-07 05:42:32.027 UTC [ledgermgmt] NewLedgerMgr -> INFO 009 Initializing LedgerMgr

    2021-04-07 05:42:32.089 UTC [leveldbhelper] openDBAndCheckFormat -> INFO 00a DB is empty Setting db format as 2.0

    2021-04-07 05:42:32.094 UTC [blkstorage] NewProvider -> INFO 00b Creating new file ledger directory at /var/hyperledger/production/ledgersData/chains/chains

    2021-04-07 05:42:32.207 UTC [leveldbhelper] openDBAndCheckFormat -> INFO 00c DB is empty Setting db format as 2.0

    2021-04-07 05:42:32.295 UTC [leveldbhelper] openDBAndCheckFormat -> INFO 00d DB is empty Setting db format as 2.0

    2021-04-07 05:42:32.303 UTC [ledgermgmt] NewLedgerMgr -> INFO 00e Initialized LedgerMgr

    2021-04-07 05:42:32.327 UTC [gossip.service] New -> INFO 00f Initialize gossip with endpoint peer0.org2.example.com:9051

    2021-04-07 05:42:32.340 UTC [gossip.gossip] New -> INFO 010 Creating gossip service with self membership of Endpoint: peer0.org2.example.com:9051, InternalEndpoint: peer0.org2.example.com:9051, PKI-ID: f850bdee22e3bfa395f027390db753d9ca6a1cd78ad60a1f029b38eafeaac205, Metadata:

    2021-04-07 05:42:32.342 UTC [lifecycle] InitializeLocalChaincodes -> INFO 011 Initialized lifecycle cache with 0 already installed chaincodes

    2021-04-07 05:42:32.342 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 012 Entering computeChaincodeEndpoint with peerHostname: peer0.org2.example.com

    2021-04-07 05:42:32.343 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 013 Exit with ccEndpoint: peer0.org2.example.com:9052

    2021-04-07 05:42:32.346 UTC [gossip.gossip] start -> INFO 014 Gossip instance peer0.org2.example.com:9051 started

    2021-04-07 05:42:32.361 UTC [sccapi] DeploySysCC -> INFO 015 deploying system chaincode 'lscc'

    2021-04-07 05:42:32.362 UTC [sccapi] DeploySysCC -> INFO 016 deploying system chaincode 'cscc'

    2021-04-07 05:42:32.362 UTC [sccapi] DeploySysCC -> INFO 017 deploying system chaincode 'qscc'

    2021-04-07 05:42:32.363 UTC [sccapi] DeploySysCC -> INFO 018 deploying system chaincode '_lifecycle'

    2021-04-07 05:42:32.363 UTC [nodeCmd] serve -> INFO 019 Deployed system chaincodes

    2021-04-07 05:42:32.363 UTC [discovery] NewService -> INFO 01a Created with config TLS: true, authCacheMaxSize: 1000, authCachePurgeRatio: 0.750000

    2021-04-07 05:42:32.363 UTC [nodeCmd] registerDiscoveryService -> INFO 01b Discovery service activated

    启动节点,网络,节点地址

    2021-04-07 05:42:32.364 UTC [nodeCmd] serve -> INFO 01c Starting peer with ID=[peer0.org2.example.com], network ID=[dev], address=[peer0.org2.example.com:9051]

    2021-04-07 05:42:32.364 UTC [nodeCmd] func6 -> INFO 01d Starting profiling server with listenAddress = 0.0.0.0:6060

    2021-04-07 05:42:32.364 UTC [nodeCmd] serve -> INFO 01e Started peer with ID=[peer0.org2.example.com], network ID=[dev], address=[peer0.org2.example.com:9051]

    2021-04-07 05:42:32.374 UTC [kvledger] LoadPreResetHeight -> INFO 01f Loading prereset height from path [/var/hyperledger/production/ledgersData/chains]

    2021-04-07 05:42:32.374 UTC [blkstorage] preResetHtFiles -> INFO 020 No active channels passed

    2021-04-07 05:43:44.557 UTC [ledgermgmt] CreateLedger -> INFO 021 Creating ledger [mychannel] with genesis block

    2021-04-07 05:43:44.606 UTC [blkstorage] newBlockfileMgr -> INFO 022 Getting block information from block storage

    2021-04-07 05:43:44.660 UTC [kvledger] CommitLegacy -> INFO 023 [mychannel] Committed block [0] with 1 transaction(s) in 26ms (state_validation=0ms block_and_pvtdata_commit=11ms state_commit=12ms) commitHash=[]

    2021-04-07 05:43:44.674 UTC [ledgermgmt] CreateLedger -> INFO 024 Created ledger [mychannel] with genesis block

    2021-04-07 05:43:44.685 UTC [peer.orderers] Update -> WARN 025 Config defines both orderer org specific endpoints and global endpoints, global endpoints will be ignored channel=mychannel

    2021-04-07 05:43:44.685 UTC [gossip.gossip] JoinChan -> INFO 026 Joining gossip network of channel mychannel with 2 organizations

    2021-04-07 05:43:44.686 UTC [gossip.gossip] learnAnchorPeers -> INFO 027 No configured anchor peers of Org1MSP for channel mychannel to learn about

    2021-04-07 05:43:44.686 UTC [gossip.gossip] learnAnchorPeers -> INFO 028 No configured anchor peers of Org2MSP for channel mychannel to learn about

    2021-04-07 05:43:44.750 UTC [gossip.state] NewGossipStateProvider -> INFO 029 Updating metadata information for channel mychannel, current ledger sequence is at = 0, next expected block is = 1

    2021-04-07 05:43:44.770 UTC [deliveryClient] StartDeliverForChannel -> INFO 02a This peer will retrieve blocks from ordering service and disseminate to other peers in the organization for channel mychannel

    2021-04-07 05:43:44.773 UTC [endorser] callChaincode -> INFO 02b finished chaincode: cscc duration: 225ms channel= txID=b7f63cf5

    2021-04-07 05:43:44.773 UTC [comm.grpc.server] 1 -> INFO 02c unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.18.0.1:55592 grpc.code=OK grpc.call_duration=250.134833ms

    2021-04-07 05:43:48.084 UTC [gossip.privdata] StoreBlock -> INFO 02d [mychannel] Received block [1] from buffer

    2021-04-07 05:43:48.097 UTC [peer.orderers] Update -> WARN 02e Config defines both orderer org specific endpoints and global endpoints, global endpoints will be ignored channel=mychannel

    2021-04-07 05:43:48.097 UTC [gossip.gossip] JoinChan -> INFO 02f Joining gossip network of channel mychannel with 2 organizations

    2021-04-07 05:43:48.097 UTC [gossip.gossip] learnAnchorPeers -> INFO 030 Learning about the configured anchor peers of Org1MSP for channel mychannel: [{peer0.org1.example.com 7051}]

    2021-04-07 05:43:48.097 UTC [gossip.gossip] learnAnchorPeers -> INFO 031 No configured anchor peers of Org2MSP for channel mychannel to learn about

    2021-04-07 05:43:48.098 UTC [committer.txvalidator] Validate -> INFO 032 [mychannel] Validated block [1] in 14ms

    2021-04-07 05:43:48.130 UTC [kvledger] CommitLegacy -> INFO 033 [mychannel] Committed block [1] with 1 transaction(s) in 30ms (state_validation=0ms block_and_pvtdata_commit=8ms state_commit=7ms) commitHash=[47dc540c94ceb704a23875c11273e16bb0b8a87aed84de911f2133568115f254]

    2021-04-07 05:43:49.686 UTC [gossip.channel] reportMembershipChanges -> INFO 034 [[mychannel] Membership view has changed. peers went online:  [[peer0.org1.example.com:7051 ]] , current view:  [[peer0.org1.example.com:7051 ]]]

    2021-04-07 05:43:54.377 UTC [gossip.privdata] StoreBlock -> INFO 035 [mychannel] Received block [2] from buffer

    2021-04-07 05:43:54.389 UTC [peer.orderers] Update -> WARN 036 Config defines both orderer org specific endpoints and global endpoints, global endpoints will be ignored channel=mychannel

    2021-04-07 05:43:54.390 UTC [gossip.gossip] JoinChan -> INFO 037 Joining gossip network of channel mychannel with 2 organizations

    2021-04-07 05:43:54.390 UTC [gossip.gossip] learnAnchorPeers -> INFO 038 Learning about the configured anchor peers of Org1MSP for channel mychannel: [{peer0.org1.example.com 7051}]

    2021-04-07 05:43:54.390 UTC [gossip.gossip] learnAnchorPeers -> INFO 039 Learning about the configured anchor peers of Org2MSP for channel mychannel: [{peer0.org2.example.com 9051}]

    2021-04-07 05:43:54.390 UTC [gossip.gossip] learnAnchorPeers -> INFO 03a Anchor peer for channel mychannel with same endpoint, skipping connecting to myself

    2021-04-07 05:43:54.392 UTC [committer.txvalidator] Validate -> INFO 03b [mychannel] Validated block [2] in 14ms

    2021-04-07 05:43:54.465 UTC [comm.grpc.server] 1 -> INFO 03c unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2021-04-07T05:43:56.465Z grpc.peer_address=172.18.0.6:38436 grpc.peer_subject="CN=peer0,OU=peer,O=Hyperledger,ST=North Carolina,C=US" grpc.code=OK grpc.call_duration=257.887µs

    2021-04-07 05:43:54.471 UTC [gossip.comm] GossipStream -> INFO 03d Peer 7bffefe95aa9aafada7b93e38bd7b0ec1821bb4749297534f3f8401aa69fbeca (172.18.0.6:38436) probed us

    2021-04-07 05:43:54.472 UTC [comm.grpc.server] 1 -> INFO 03e streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2021-04-07T05:44:04.468Z grpc.peer_address=172.18.0.6:38436 grpc.peer_subject="CN=peer0,OU=peer,O=Hyperledger,ST=North Carolina,C=US" grpc.code=OK grpc.call_duration=3.013825ms

    2021-04-07 05:43:54.488 UTC [kvledger] CommitLegacy -> INFO 03f [mychannel] Committed block [2] with 1 transaction(s) in 95ms (state_validation=0ms block_and_pvtdata_commit=64ms state_commit=12ms) commitHash=[5f88b61407b149a48413433f4670c46531e5c4a8febdc339a9536ff8716a559e]

  • 相关阅读:
    css学习_css3伸缩布局 flex布局
    css学习_cs3s旋转的图片
    css学习_css3过渡
    css学习_css伪元素的本质
    css学习_css精灵技术、字体图标
    css学习_css用户界面样式
    Python 的 with 语句
    KNN--Python实现
    Python中NumPy(axis=0 与axis=1)
    Python中escape和unescape
  • 原文地址:https://www.cnblogs.com/jiftle/p/15330792.html
Copyright © 2020-2023  润新知