Fabric二进制添加排序节点

目录

  • 一、准备orderer1
    • 1.1、注册orderer1
    • 1.2、登记orderer1
    • 1.3、登记orderer1的tls
  • 二、添加orderer1的tls到系统通道
  • 三、获取最新的系统通道配置
  • 四、启动orderer1
  • 五、添加orderer1的endpoint到系统通道
  • 六、添加orderer1的tls到应用通道
  • 七、添加orderer1的endpoint到应用通道
  • 八、请求orderer1发交易

书接上回,在 Fabric二进制建链 或 Fabric二进制添加对等节点 的基础上,继续通过二进制命令行的方式,添加一个新的排序节点orderer1。

一、准备orderer1

新增orderer1的目录:

mkdir -p ~/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com

1.1、注册orderer1

注册新排序节点orderer1:

fabric-ca-client register --caname ca-org1 --id.name orderer1 --id.secret orderer1pw --id.type orderer --tls.certfiles /home/songzehao/fabric/ca-cert.pem

日志:

2023/11/01 15:05:06 [INFO] Configuration file location: /home/songzehao/fabric/fabric-ca-client/fabric-ca-client-config.yaml
2023/11/01 15:05:06 [INFO] TLS Enabled
2023/11/01 15:05:06 [INFO] TLS Enabled
Password: orderer1pw

1.2、登记orderer1

登记新排序节点orderer1:

fabric-ca-client enroll -u https://orderer1:orderer1pw@192.168.3.128:7054 --caname ca-org1 -M /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/msp --tls.certfiles /home/songzehao/fabric/ca-cert.pem

日志:

2023/11/01 15:07:48 [INFO] TLS Enabled
2023/11/01 15:07:48 [INFO] generating key: &{A:ecdsa S:256}
2023/11/01 15:07:48 [INFO] encoded CSR
2023/11/01 15:07:48 [INFO] Stored client certificate at /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/msp/signcerts/cert.pem
2023/11/01 15:07:48 [INFO] Stored root CA certificate at /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/msp/cacerts/192-168-3-128-7054-ca-org1.pem
2023/11/01 15:07:48 [INFO] Stored Issuer public key at /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/msp/IssuerPublicKey
2023/11/01 15:07:48 [INFO] Stored Issuer revocation public key at /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/msp/IssuerRevocationPublicKey

为orderer1拷贝msp配置:

cp /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/msp/config.yaml /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/msp/config.yaml

1.3、登记orderer1的tls

登记orderer1的tls:

fabric-ca-client enroll -u https://orderer1:orderer1pw@192.168.3.128:7054 --caname ca-org1 -M /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls --enrollment.profile tls --csr.hosts orderer1.org1.example.com --csr.hosts 192.168.3.128 --tls.certfiles /home/songzehao/fabric/ca-cert.pem

日志:

2023/11/01 15:08:30 [INFO] TLS Enabled
2023/11/01 15:08:30 [INFO] generating key: &{A:ecdsa S:256}
2023/11/01 15:08:30 [INFO] encoded CSR
2023/11/01 15:08:30 [INFO] Stored client certificate at /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/signcerts/cert.pem
2023/11/01 15:08:30 [INFO] Stored TLS root CA certificate at /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/tlscacerts/tls-192-168-3-128-7054-ca-org1.pem
2023/11/01 15:08:30 [INFO] Stored Issuer public key at /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/IssuerPublicKey
2023/11/01 15:08:30 [INFO] Stored Issuer revocation public key at /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/IssuerRevocationPublicKey

为方便查看名称,重命名tls相关文件名:

cp /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/tlscacerts/* /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/ca.crt
cp /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/signcerts/* /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/server.crt
cp /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/keystore/* /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/server.key

拷贝该tlsca证书到orderer1节点目录下msp/tlscacerts目录:

mkdir -p /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/msp/tlscacerts
cp /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/tlscacerts/* /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem

配置环境变量,下面需要使用orderer0节点的身份信息:

export CORE_PEER_LOCALMSPID="OrdererOrg1MSP"
export CORE_PEER_TLS_ROOTCERT_FILE=/home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem
export CORE_PEER_MSPCONFIGPATH=/home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/users/Admin@org1.example.com/msp

二、添加orderer1的tls到系统通道

获取系统通道的最新配置:

peer channel fetch config /home/songzehao/fabric/config/channel-artifacts/config_block_v3.pb -o 192.168.3.128:7050 -c system-channel --tls --cafile /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem

日志:

2023-11-01 15:09:33.701 CST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2023-11-01 15:09:33.703 CST [cli.common] readBlock -> INFO 002 Received block: 1
2023-11-01 15:09:33.703 CST [channelCmd] fetch -> INFO 003 Retrieving last config block: 0
2023-11-01 15:09:33.704 CST [cli.common] readBlock -> INFO 004 Received block: 0

将系统通道配置转为json格式:

configtxlator proto_decode --input /home/songzehao/fabric/config/channel-artifacts/config_block_v3.pb --type common.Block | jq .data.data[0].payload.data.config > /home/songzehao/fabric/config/channel-artifacts/config_v3.json

抽取orderer1的endpoint和tls证书内容:

echo '{"client_tls_cert":"'$(cat /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/server.crt | base64 -w 0)'","host":"192.168.3.128","port":7057,"server_tls_cert":"'$(cat /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/server.crt | base64 -w 0)'"}' > /home/songzehao/fabric/config/channel-artifacts/org1consenter_v3.json

将其追加到json配置中:

jq --argfile consenterFile /home/songzehao/fabric/config/channel-artifacts/org1consenter_v3.json '.channel_group.groups.Orderer.values.ConsensusType.value.metadata.consenters += [$consenterFile]' /home/songzehao/fabric/config/channel-artifacts/config_v3.json > /home/songzehao/fabric/config/channel-artifacts/modified_config_v3.json

原配置转化为pb:

configtxlator proto_encode --input /home/songzehao/fabric/config/channel-artifacts/config_v3.json --type common.Config --output /home/songzehao/fabric/config/channel-artifacts/config_v3.pb

更改后的配置转化为pb:

configtxlator proto_encode --input /home/songzehao/fabric/config/channel-artifacts/modified_config_v3.json --type common.Config --output /home/songzehao/fabric/config/channel-artifacts/modified_config_v3.pb

计算更新配置pb:

configtxlator compute_update --channel_id system-channel --original /home/songzehao/fabric/config/channel-artifacts/config_v3.pb --updated /home/songzehao/fabric/config/channel-artifacts/modified_config_v3.pb --output /home/songzehao/fabric/config/channel-artifacts/config_update_v3.pb

更新配置转化为json格式:

configtxlator proto_decode --input /home/songzehao/fabric/config/channel-artifacts/config_update_v3.pb --type common.ConfigUpdate --output /home/songzehao/fabric/config/channel-artifacts/config_update_v3.json

包装更新配置文件:

echo '{"payload":{"header":{"channel_header":{"channel_id":"system-channel", "type":2}},"data":{"config_update":'$(cat /home/songzehao/fabric/config/channel-artifacts/config_update_v3.json)'}}}' | jq . > /home/songzehao/fabric/config/channel-artifacts/config_update_v3_in_envelope.json

再次转为pb:

configtxlator proto_encode --input /home/songzehao/fabric/config/channel-artifacts/config_update_v3_in_envelope.json --type common.Envelope --output /home/songzehao/fabric/config/channel-artifacts/config_update_v3_in_envelope.pb

提交配置更新:

peer channel update -f /home/songzehao/fabric/config/channel-artifacts/config_update_v3_in_envelope.pb -c system-channel -o 192.168.3.128:7050 --tls true --cafile /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem

日志:

2023-11-01 15:12:04.967 CST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2023-11-01 15:12:04.979 CST [channelCmd] update -> INFO 002 Successfully submitted channel update

三、获取最新的系统通道配置

仍旧保持上一节的环境变量不变,获取最新的系统通道配置:

peer channel fetch config /home/songzehao/fabric/config/system-genesis-block/latest_config.block -o 192.168.3.128:7050 -c system-channel --tls --cafile /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem

日志:

2023-11-01 15:12:26.289 CST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2023-11-01 15:12:26.292 CST [cli.common] readBlock -> INFO 002 Received block: 2
2023-11-01 15:12:26.292 CST [channelCmd] fetch -> INFO 003 Retrieving last config block: 2
2023-11-01 15:12:26.293 CST [cli.common] readBlock -> INFO 004 Received block: 2

四、启动orderer1

更改orderer1的节点配置文件,注意设置General.BootstrapFile: /home/songzehao/fabric/config/system-genesis-block/latest_config.block。最终的orderer.yaml:

# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#---
################################################################################
#
#   Orderer Configuration
#
#   - This controls the type and configuration of the orderer.
#
################################################################################
General:# Listen address: The IP on which to bind to listen.ListenAddress: 192.168.3.128# Listen port: The port on which to bind to listen.ListenPort: 7057# TLS: TLS settings for the GRPC server.TLS:Enabled: true# PrivateKey governs the file location of the private key of the TLS certificate.PrivateKey: /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/server.key# Certificate governs the file location of the server TLS certificate.Certificate: /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/server.crtRootCAs:- /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/ca.crtClientAuthRequired: falseClientRootCAs:# Keepalive settings for the GRPC server.Keepalive:# ServerMinInterval is the minimum permitted time between client pings.# If clients send pings more frequently, the server will# disconnect them.ServerMinInterval: 60s# ServerInterval is the time between pings to clients.ServerInterval: 7200s# ServerTimeout is the duration the server waits for a response from# a client before closing the connection.ServerTimeout: 20s# Cluster settings for ordering service nodes that communicate with other ordering service nodes# such as Raft based ordering service.Cluster:# SendBufferSize is the maximum number of messages in the egress buffer.# Consensus messages are dropped if the buffer is full, and transaction# messages are waiting for space to be freed.SendBufferSize: 10# ClientCertificate governs the file location of the client TLS certificate# used to establish mutual TLS connections with other ordering service nodes.ClientCertificate: /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/server.crt# ClientPrivateKey governs the file location of the private key of the client TLS certificate.ClientPrivateKey: /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/server.key# The below 4 properties should be either set together, or be unset together.# If they are set, then the orderer node uses a separate listener for intra-cluster# communication. If they are unset, then the general orderer listener is used.# This is useful if you want to use a different TLS server certificates on the# client-facing and the intra-cluster listeners.# ListenPort defines the port on which the cluster listens to connections.ListenPort:# ListenAddress defines the IP on which to listen to intra-cluster communication.ListenAddress:# ServerCertificate defines the file location of the server TLS certificate used for intra-cluster# communication.ServerCertificate:# ServerPrivateKey defines the file location of the private key of the TLS certificate.ServerPrivateKey:# Bootstrap method: The method by which to obtain the bootstrap block# system channel is specified. The option can be one of:#   "file" - path to a file containing the genesis block or config block of system channel#   "none" - allows an orderer to start without a system channel configurationBootstrapMethod: file# Bootstrap file: The file containing the bootstrap block to use when# initializing the orderer system channel and BootstrapMethod is set to# "file".  The bootstrap file can be the genesis block, and it can also be# a config block for late bootstrap of some consensus methods like Raft.# Generate a genesis block by updating $FABRIC_CFG_PATH/configtx.yaml and# using configtxgen command with "-outputBlock" option.# Defaults to file "genesisblock" (in $FABRIC_CFG_PATH directory) if not specified.BootstrapFile: /home/songzehao/fabric/config/system-genesis-block/latest_config.block# LocalMSPDir is where to find the private crypto material needed by the# orderer. It is set relative here as a default for dev environments but# should be changed to the real location in production.LocalMSPDir: /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/msp# LocalMSPID is the identity to register the local MSP material with the MSP# manager. IMPORTANT: The local MSP ID of an orderer needs to match the MSP# ID of one of the organizations defined in the orderer system channel's# /Channel/Orderer configuration. The sample organization defined in the# sample configuration provided has an MSP ID of "SampleOrg".LocalMSPID: OrdererOrg1MSP# Enable an HTTP service for Go "pprof" profiling as documented at:# https://golang.org/pkg/net/http/pprofProfile:Enabled: falseAddress: 0.0.0.0:6067# BCCSP configures the blockchain crypto service providers.BCCSP:# Default specifies the preferred blockchain crypto service provider# to use. If the preferred provider is not available, the software# based provider ("SW") will be used.# Valid providers are:#  - SW: a software based crypto provider#  - PKCS11: a CA hardware security module crypto provider.Default: SW# SW configures the software based blockchain crypto provider.SW:# TODO: The default Hash and Security level needs refactoring to be# fully configurable. Changing these defaults requires coordination# SHA2 is hardcoded in several places, not only BCCSPHash: SHA2Security: 256# Location of key store. If this is unset, a location will be# chosen using: 'LocalMSPDir'/keystoreFileKeyStore:KeyStore:# Settings for the PKCS#11 crypto provider (i.e. when DEFAULT: PKCS11)PKCS11:# Location of the PKCS11 module libraryLibrary:# Token LabelLabel:# User PINPin:Hash:Security:FileKeyStore:KeyStore:# Authentication contains configuration parameters related to authenticating# client messagesAuthentication:# the acceptable difference between the current server time and the# client's time as specified in a client request messageTimeWindow: 15m################################################################################
#
#   SECTION: File Ledger
#
#   - This section applies to the configuration of the file or json ledgers.
#
################################################################################
FileLedger:# Location: The directory to store the blocks in.# NOTE: If this is unset, a new temporary location will be chosen every time# the orderer is restarted, using the prefix specified by Prefix.Location: /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/hyperledger/production/orderer# The prefix to use when generating a ledger directory in temporary space.# Otherwise, this value is ignored.Prefix: hyperledger-fabric-ordererledger################################################################################
#
#   SECTION: Kafka
#
#   - This section applies to the configuration of the Kafka-based orderer, and
#     its interaction with the Kafka cluster.
#
################################################################################
Kafka:# Retry: What do if a connection to the Kafka cluster cannot be established,# or if a metadata request to the Kafka cluster needs to be repeated.Retry:# When a new channel is created, or when an existing channel is reloaded# (in case of a just-restarted orderer), the orderer interacts with the# Kafka cluster in the following ways:# 1. It creates a Kafka producer (writer) for the Kafka partition that# corresponds to the channel.# 2. It uses that producer to post a no-op CONNECT message to that# partition# 3. It creates a Kafka consumer (reader) for that partition.# If any of these steps fail, they will be re-attempted every# <ShortInterval> for a total of <ShortTotal>, and then every# <LongInterval> for a total of <LongTotal> until they succeed.# Note that the orderer will be unable to write to or read from a# channel until all of the steps above have been completed successfully.ShortInterval: 5sShortTotal: 10mLongInterval: 5mLongTotal: 12h# Affects the socket timeouts when waiting for an initial connection, a# response, or a transmission. See Config.Net for more info:# https://godoc.org/github.com/Shopify/sarama#ConfigNetworkTimeouts:DialTimeout: 10sReadTimeout: 10sWriteTimeout: 10s# Affects the metadata requests when the Kafka cluster is in the middle# of a leader election.See Config.Metadata for more info:# https://godoc.org/github.com/Shopify/sarama#ConfigMetadata:RetryBackoff: 250msRetryMax: 3# What to do if posting a message to the Kafka cluster fails. See# Config.Producer for more info:# https://godoc.org/github.com/Shopify/sarama#ConfigProducer:RetryBackoff: 100msRetryMax: 3# What to do if reading from the Kafka cluster fails. See# Config.Consumer for more info:# https://godoc.org/github.com/Shopify/sarama#ConfigConsumer:RetryBackoff: 2s# Settings to use when creating Kafka topics.  Only applies when# Kafka.Version is v0.10.1.0 or higherTopic:# The number of Kafka brokers across which to replicate the topicReplicationFactor: 3# Verbose: Enable logging for interactions with the Kafka cluster.Verbose: false# TLS: TLS settings for the orderer's connection to the Kafka cluster.TLS:# Enabled: Use TLS when connecting to the Kafka cluster.Enabled: false# PrivateKey: PEM-encoded private key the orderer will use for# authentication.PrivateKey:# As an alternative to specifying the PrivateKey here, uncomment the# following "File" key and specify the file name from which to load the# value of PrivateKey.#File: path/to/PrivateKey# Certificate: PEM-encoded signed public key certificate the orderer will# use for authentication.Certificate:# As an alternative to specifying the Certificate here, uncomment the# following "File" key and specify the file name from which to load the# value of Certificate.#File: path/to/Certificate# RootCAs: PEM-encoded trusted root certificates used to validate# certificates from the Kafka cluster.RootCAs:# As an alternative to specifying the RootCAs here, uncomment the# following "File" key and specify the file name from which to load the# value of RootCAs.#File: path/to/RootCAs# SASLPlain: Settings for using SASL/PLAIN authentication with Kafka brokersSASLPlain:# Enabled: Use SASL/PLAIN to authenticate with Kafka brokersEnabled: false# User: Required when Enabled is set to trueUser:# Password: Required when Enabled is set to truePassword:# Kafka protocol version used to communicate with the Kafka cluster brokers# (defaults to 0.10.2.0 if not specified)Version:################################################################################
#
#   Debug Configuration
#
#   - This controls the debugging options for the orderer
#
################################################################################
Debug:# BroadcastTraceDir when set will cause each request to the Broadcast service# for this orderer to be written to a file in this directoryBroadcastTraceDir:# DeliverTraceDir when set will cause each request to the Deliver service# for this orderer to be written to a file in this directoryDeliverTraceDir:################################################################################
#
#   Operations Configuration
#
#   - This configures the operations server endpoint for the orderer
#
################################################################################
Operations:# host and port for the operations serverListenAddress: 192.168.3.128:8447# TLS configuration for the operations endpointTLS:# TLS enabledEnabled: false# Certificate is the location of the PEM encoded TLS certificateCertificate:# PrivateKey points to the location of the PEM-encoded keyPrivateKey:# Most operations service endpoints require client authentication when TLS# is enabled. ClientAuthRequired requires client certificate authentication# at the TLS layer to access all resources.ClientAuthRequired: false# Paths to PEM encoded ca certificates to trust for client authenticationClientRootCAs: []################################################################################
#
#   Metrics  Configuration
#
#   - This configures metrics collection for the orderer
#
################################################################################
Metrics:# The metrics provider is one of statsd, prometheus, or disabledProvider: disabled# The statsd configurationStatsd:# network type: tcp or udpNetwork: udp# the statsd server addressAddress: 192.168.3.128:8127# The interval at which locally cached counters and gauges are pushed# to statsd; timings are pushed immediatelyWriteInterval: 30s# The prefix is prepended to all emitted statsd metricsPrefix:################################################################################
#
#   Consensus Configuration
#
#   - This section contains config options for a consensus plugin. It is opaque
#     to orderer, and completely up to consensus implementation to make use of.
#
################################################################################
Consensus:# The allowed key-value pairs here depend on consensus plugin. For etcd/raft,# we use following options:# WALDir specifies the location at which Write Ahead Logs for etcd/raft are# stored. Each channel will have its own subdir named after channel ID.WALDir: /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/hyperledger/production/orderer/etcdraft/wal# SnapDir specifies the location at which snapshots for etcd/raft are# stored. Each channel will have its own subdir named after channel ID.SnapDir: /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/hyperledger/production/orderer/etcdraft/snapshot

启动orderer1:

orderer start

日志:

2023-11-01 15:15:23.688 CST [localconfig] completeInitialization -> INFO 001 Kafka.Version unset, setting to 0.10.2.0
2023-11-01 15:15:23.688 CST [orderer.common.server] prettyPrintStruct -> INFO 002 Orderer config values:General.ListenAddress = "192.168.3.128"General.ListenPort = 7057General.TLS.Enabled = trueGeneral.TLS.PrivateKey = "/home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/server.key"General.TLS.Certificate = "/home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/server.crt"General.TLS.RootCAs = [/home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/ca.crt]General.TLS.ClientAuthRequired = falseGeneral.TLS.ClientRootCAs = []General.Cluster.ListenAddress = ""General.Cluster.ListenPort = 0General.Cluster.ServerCertificate = ""General.Cluster.ServerPrivateKey = ""General.Cluster.ClientCertificate = "/home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/server.crt"General.Cluster.ClientPrivateKey = "/home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/server.key"General.Cluster.RootCAs = []General.Cluster.DialTimeout = 5sGeneral.Cluster.RPCTimeout = 7sGeneral.Cluster.ReplicationBufferSize = 20971520General.Cluster.ReplicationPullTimeout = 5sGeneral.Cluster.ReplicationRetryTimeout = 5sGeneral.Cluster.ReplicationBackgroundRefreshInterval = 5m0sGeneral.Cluster.ReplicationMaxRetries = 12General.Cluster.SendBufferSize = 10General.Cluster.CertExpirationWarningThreshold = 168h0m0sGeneral.Cluster.TLSHandshakeTimeShift = 0sGeneral.Keepalive.ServerMinInterval = 1m0sGeneral.Keepalive.ServerInterval = 2h0m0sGeneral.Keepalive.ServerTimeout = 20sGeneral.ConnectionTimeout = 0sGeneral.GenesisMethod = ""General.GenesisFile = ""General.BootstrapMethod = "file"General.BootstrapFile = "/home/songzehao/fabric/config/system-genesis-block/latest_config.block"General.Profile.Enabled = falseGeneral.Profile.Address = "0.0.0.0:6067"General.LocalMSPDir = "/home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/msp"General.LocalMSPID = "OrdererOrg1MSP"General.BCCSP.ProviderName = "SW"General.BCCSP.SwOpts.SecLevel = 256General.BCCSP.SwOpts.HashFamily = "SHA2"General.BCCSP.SwOpts.Ephemeral = trueGeneral.BCCSP.SwOpts.FileKeystore.KeyStorePath = ""General.BCCSP.SwOpts.DummyKeystore =General.BCCSP.SwOpts.InmemKeystore =General.Authentication.TimeWindow = 15m0sGeneral.Authentication.NoExpirationChecks = falseFileLedger.Location = "/home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/hyperledger/production/orderer"FileLedger.Prefix = "hyperledger-fabric-ordererledger"Kafka.Retry.ShortInterval = 5sKafka.Retry.ShortTotal = 10m0sKafka.Retry.LongInterval = 5m0sKafka.Retry.LongTotal = 12h0m0sKafka.Retry.NetworkTimeouts.DialTimeout = 10sKafka.Retry.NetworkTimeouts.ReadTimeout = 10sKafka.Retry.NetworkTimeouts.WriteTimeout = 10sKafka.Retry.Metadata.RetryMax = 3Kafka.Retry.Metadata.RetryBackoff = 250msKafka.Retry.Producer.RetryMax = 3Kafka.Retry.Producer.RetryBackoff = 100msKafka.Retry.Consumer.RetryBackoff = 2sKafka.Verbose = falseKafka.Version = 0.10.2.0Kafka.TLS.Enabled = falseKafka.TLS.PrivateKey = ""Kafka.TLS.Certificate = ""Kafka.TLS.RootCAs = []Kafka.TLS.ClientAuthRequired = falseKafka.TLS.ClientRootCAs = []Kafka.SASLPlain.Enabled = falseKafka.SASLPlain.User = ""Kafka.SASLPlain.Password = ""Kafka.Topic.ReplicationFactor = 3Debug.BroadcastTraceDir = ""Debug.DeliverTraceDir = ""Consensus = map[SnapDir:/home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/hyperledger/production/orderer/etcdraft/snapshot WALDir:/home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/hyperledger/production/orderer/etcdraft/wal]Operations.ListenAddress = "192.168.3.128:8447"Operations.TLS.Enabled = falseOperations.TLS.PrivateKey = ""Operations.TLS.Certificate = ""Operations.TLS.RootCAs = []Operations.TLS.ClientAuthRequired = falseOperations.TLS.ClientRootCAs = []Metrics.Provider = "disabled"Metrics.Statsd.Network = "udp"Metrics.Statsd.Address = "192.168.3.128:8127"Metrics.Statsd.WriteInterval = 30sMetrics.Statsd.Prefix = ""ChannelParticipation.Enabled = falseChannelParticipation.RemoveStorage = false
2023-11-01 15:15:23.699 CST [orderer.common.server] initializeServerConfig -> INFO 003 Starting orderer with TLS enabled
2023-11-01 15:15:23.705 CST [blkstorage] NewProvider -> INFO 004 Creating new file ledger directory at /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/hyperledger/production/orderer/chains
2023-11-01 15:15:23.707 CST [orderer.common.server] Main -> INFO 005 Not bootstrapping the system channel because the bootstrap block number is 2 (>0), replication is needed
2023-11-01 15:15:23.708 CST [orderer.common.server] Main -> INFO 006 Starting with system channel: system-channel, consensus type: etcdraft
2023-11-01 15:15:23.708 CST [orderer.common.server] Main -> INFO 007 Setting up cluster
2023-11-01 15:15:23.708 CST [orderer.common.server] reuseListener -> INFO 008 Cluster listener is not configured, defaulting to use the general listener on port 7057
2023-11-01 15:15:23.710 CST [blkstorage] newBlockfileMgr -> INFO 009 Getting block information from block storage
2023-11-01 15:15:23.711 CST [orderer.common.cluster] replicateNeededChannels -> INFO 00a Will now replicate chains
2023-11-01 15:15:23.717 CST [orderer.common.cluster.replication] fetchLastBlockSeq -> INFO 00b 192.168.3.128:7050 is at block sequence of 2 channel=system-channel
2023-11-01 15:15:23.717 CST [orderer.common.cluster.replication] connectToSomeEndpoint -> INFO 00c Connected to 192.168.3.128:7050 with last block seq of 2 channel=system-channel
2023-11-01 15:15:23.718 CST [orderer.common.cluster.replication] obtainStream -> INFO 00d Sending request for block [0] to 192.168.3.128:7050 channel=system-channel
2023-11-01 15:15:23.720 CST [orderer.common.cluster.replication] pullBlocks -> INFO 00e Got block [0] of size 13 KB from 192.168.3.128:7050 channel=system-channel
2023-11-01 15:15:23.720 CST [orderer.common.cluster.replication] pullBlocks -> INFO 00f Got block [1] of size 19 KB from 192.168.3.128:7050 channel=system-channel
2023-11-01 15:15:23.720 CST [orderer.common.cluster.replication] pullBlocks -> INFO 010 Got block [2] of size 24 KB from 192.168.3.128:7050 channel=system-channel
2023-11-01 15:15:23.721 CST [orderer.common.cluster] Channels -> INFO 011 Block 0 doesn't contain a new channel
2023-11-01 15:15:23.721 CST [orderer.common.cluster] Channels -> INFO 012 Block 1 contains channel channel1
2023-11-01 15:15:23.721 CST [orderer.common.cluster] discoverChannels -> INFO 013 Discovered 1 channels: [channel1]
2023-11-01 15:15:23.721 CST [orderer.common.cluster] channelsToPull -> INFO 014 Evaluating channels to pull: [channel1]
2023-11-01 15:15:23.721 CST [orderer.common.cluster] channelsToPull -> INFO 015 Probing whether I should pull channel channel1
2023-11-01 15:15:23.726 CST [orderer.common.cluster.replication] fetchLastBlockSeq -> INFO 016 192.168.3.128:7050 is at block sequence of 14 channel=system-channel
2023-11-01 15:15:23.727 CST [orderer.common.cluster.replication] HeightsByEndpoints -> INFO 017 Returning the heights of OSNs mapped by endpoints map[192.168.3.128:7050:15] channel=system-channel
2023-11-01 15:15:23.731 CST [orderer.common.cluster.replication] fetchLastBlockSeq -> INFO 018 192.168.3.128:7050 is at block sequence of 14 channel=system-channel
2023-11-01 15:15:23.731 CST [orderer.common.cluster.replication] connectToSomeEndpoint -> INFO 019 Connected to 192.168.3.128:7050 with last block seq of 14 channel=system-channel
2023-11-01 15:15:23.731 CST [orderer.common.cluster.replication] obtainStream -> INFO 01a Sending request for block [14] to 192.168.3.128:7050 channel=system-channel
2023-11-01 15:15:23.733 CST [orderer.common.cluster.replication] pullBlocks -> INFO 01b Got block [14] of size 5 KB from 192.168.3.128:7050 channel=system-channel
2023-11-01 15:15:23.738 CST [orderer.common.cluster.replication] fetchLastBlockSeq -> INFO 01c 192.168.3.128:7050 is at block sequence of 14 channel=system-channel
2023-11-01 15:15:23.738 CST [orderer.common.cluster.replication] connectToSomeEndpoint -> INFO 01d Connected to 192.168.3.128:7050 with last block seq of 14 channel=system-channel
2023-11-01 15:15:23.739 CST [orderer.common.cluster.replication] obtainStream -> INFO 01e Sending request for block [8] to 192.168.3.128:7050 channel=system-channel
2023-11-01 15:15:23.740 CST [orderer.common.cluster.replication] pullBlocks -> INFO 01f Got block [8] of size 18 KB from 192.168.3.128:7050 channel=system-channel
2023-11-01 15:15:23.742 CST [orderer.common.cluster] channelsToPull -> INFO 020 I do not belong to channel channel1 or am forbidden pulling it (not in the channel), skipping chain retrieval
2023-11-01 15:15:23.742 CST [orderer.common.cluster] ReplicateChains -> INFO 021 Found myself in 0 channels out of 1 : {[] [{channel1 0xc0000bf500}]}
2023-11-01 15:15:23.743 CST [blkstorage] newBlockfileMgr -> INFO 022 Getting block information from block storage
2023-11-01 15:15:23.748 CST [orderer.common.cluster] appendBlock -> INFO 023 Committed block [0] for channel channel1
2023-11-01 15:15:23.748 CST [orderer.common.cluster] PullChannel -> INFO 024 Pulling channel system-channel
2023-11-01 15:15:23.752 CST [orderer.common.cluster.replication] fetchLastBlockSeq -> INFO 025 192.168.3.128:7050 is at block sequence of 2 channel=system-channel
2023-11-01 15:15:23.752 CST [orderer.common.cluster.replication] HeightsByEndpoints -> INFO 026 Returning the heights of OSNs mapped by endpoints map[192.168.3.128:7050:3] channel=system-channel
2023-11-01 15:15:23.752 CST [orderer.common.cluster] PullChannel -> INFO 027 Latest block height for channel system-channel is 3
2023-11-01 15:15:23.757 CST [orderer.common.cluster.replication] fetchLastBlockSeq -> INFO 028 192.168.3.128:7050 is at block sequence of 2 channel=system-channel
2023-11-01 15:15:23.757 CST [orderer.common.cluster.replication] connectToSomeEndpoint -> INFO 029 Connected to 192.168.3.128:7050 with last block seq of 2 channel=system-channel
2023-11-01 15:15:23.757 CST [orderer.common.cluster.replication] obtainStream -> INFO 02a Sending request for block [0] to 192.168.3.128:7050 channel=system-channel
2023-11-01 15:15:23.759 CST [orderer.common.cluster.replication] pullBlocks -> INFO 02b Got block [0] of size 13 KB from 192.168.3.128:7050 channel=system-channel
2023-11-01 15:15:23.760 CST [orderer.common.cluster.replication] pullBlocks -> INFO 02c Got block [1] of size 19 KB from 192.168.3.128:7050 channel=system-channel
2023-11-01 15:15:23.760 CST [orderer.common.cluster.replication] pullBlocks -> INFO 02d Got block [2] of size 24 KB from 192.168.3.128:7050 channel=system-channel
2023-11-01 15:15:23.763 CST [orderer.common.cluster] appendBlock -> INFO 02e Committed block [0] for channel system-channel
2023-11-01 15:15:23.765 CST [orderer.common.cluster] appendBlock -> INFO 02f Committed block [1] for channel system-channel
2023-11-01 15:15:23.767 CST [orderer.common.cluster] appendBlock -> INFO 030 Committed block [2] for channel system-channel
2023-11-01 15:15:23.771 CST [orderer.consensus.etcdraft] detectSelfID -> WARN 031 Could not find -----BEGIN CERTIFICATE-----
MIIC4DCCAoagAwIBAgIUKVTS7CLoIzKbcsz64RAkgaPPel4wCgYIKoZIzj0EAwIw
cDELMAkGA1UEBhMCVVMxFzAVBgNVBAgTDk5vcnRoIENhcm9saW5hMQ8wDQYDVQQH
EwZEdXJoYW0xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh
Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjMxMTAxMDcwNDAwWhcNMjQxMDMxMDcwOTAw
WjBhMQswCQYDVQQGEwJVUzEXMBUGA1UECBMOTm9ydGggQ2Fyb2xpbmExFDASBgNV
BAoTC0h5cGVybGVkZ2VyMRAwDgYDVQQLEwdvcmRlcmVyMREwDwYDVQQDEwhvcmRl
cmVyMTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABIumaxt0nP75HwHrYggr7iV4
ZxVHevJ1Oi7gNvKLTCR9wTPeKP5jxTFLWdtic4EsWw9m3ozdzCo+YNN/N4/BKKqj
ggELMIIBBzAOBgNVHQ8BAf8EBAMCA6gwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsG
AQUFBwMCMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFOGJiaQgrzPfKJoMzMxcq6wp
ZPPkMB8GA1UdIwQYMBaAFP9/nIinRvdeboVtu6g6s7OBjNWiMCoGA1UdEQQjMCGC
GW9yZGVyZXIxLm9yZzEuZXhhbXBsZS5jb22HBMCoA4AwXAYIKgMEBQYHCAEEUHsi
YXR0cnMiOnsiaGYuQWZmaWxpYXRpb24iOiIiLCJoZi5FbnJvbGxtZW50SUQiOiJv
cmRlcmVyMSIsImhmLlR5cGUiOiJvcmRlcmVyIn19MAoGCCqGSM49BAMCA0gAMEUC
IQDupdU3UrDYL1zUuBhWWQ9H8uIdo9MfUvUOlzCZz8ZHDwIgKXTerdk4ZRiffTol
MgFtMrLA+uaqb05/xS0Ctu6p9gE=
-----END CERTIFICATE-----among [-----BEGIN CERTIFICATE-----
MIICwzCCAmmgAwIBAgIUDyHjRyRQAKRBmANka44MQqxhb5UwCgYIKoZIzj0EAwIw
cDELMAkGA1UEBhMCVVMxFzAVBgNVBAgTDk5vcnRoIENhcm9saW5hMQ8wDQYDVQQH
EwZEdXJoYW0xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh
Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjMxMTAxMDMxMTAwWhcNMjQxMDMxMDMxNjAw
WjBhMQswCQYDVQQGEwJVUzEXMBUGA1UECBMOTm9ydGggQ2Fyb2xpbmExFDASBgNV
BAoTC0h5cGVybGVkZ2VyMRAwDgYDVQQLEwdvcmRlcmVyMREwDwYDVQQDEwhvcmRl
cmVyMDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJ/8BDSyIwgsGhBm707HfKPH
YXX386THlAsgrLpeX5hODg/WCT88iNg9LGXuIkDyKReeZrfOKxhvqU8ia0s3m92j
ge8wgewwDgYDVR0PAQH/BAQDAgOoMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEF
BQcDAjAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBQv/xyhe7uAZgQBaTMAbcYJ8Odq
WzAfBgNVHSMEGDAWgBT/f5yIp0b3Xm6FbbuoOrOzgYzVojAPBgNVHREECDAGhwTA
qAOAMFwGCCoDBAUGBwgBBFB7ImF0dHJzIjp7ImhmLkFmZmlsaWF0aW9uIjoiIiwi
aGYuRW5yb2xsbWVudElEIjoib3JkZXJlcjAiLCJoZi5UeXBlIjoib3JkZXJlciJ9
fTAKBggqhkjOPQQDAgNIADBFAiEA8lsW64U+m4h7J3f4LhvuoZK5wLAfhxmid5Sy
JBw/NucCIBgOpDoiRK9keWr3WxJf0hasAqCY2yR/PeZ0lGFnmlcn
-----END CERTIFICATE-----
]
2023-11-01 15:15:23.772 CST [orderer.common.onboarding] TrackChain -> INFO 032 Adding channel1 to the set of chains to track
2023-11-01 15:15:23.775 CST [orderer.consensus.etcdraft] HandleChain -> INFO 033 EvictionSuspicion not set, defaulting to 10m0s
2023-11-01 15:15:23.775 CST [orderer.consensus.etcdraft] createOrReadWAL -> INFO 034 No WAL data found, creating new WAL at path '/home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/hyperledger/production/orderer/etcdraft/wal/system-channel' channel=system-channel node=2
2023-11-01 15:15:23.778 CST [orderer.commmon.multichannel] Initialize -> INFO 035 Starting system channel 'system-channel' with genesis block hash cf0eea12e3ad0e100746fab436a756f291a683dd76e17d4b63b1eb2ce40fe407 and orderer type etcdraft
2023-11-01 15:15:23.779 CST [orderer.consensus.etcdraft] Start -> INFO 036 Starting Raft node channel=system-channel node=2
2023-11-01 15:15:23.779 CST [orderer.common.cluster] Configure -> INFO 037 Entering, channel: system-channel, nodes: [ID: 1,
Endpoint: 192.168.3.128:7050,
ServerTLSCert:-----BEGIN CERTIFICATE-----
MIICwzCCAmmgAwIBAgIUDyHjRyRQAKRBmANka44MQqxhb5UwCgYIKoZIzj0EAwIw
cDELMAkGA1UEBhMCVVMxFzAVBgNVBAgTDk5vcnRoIENhcm9saW5hMQ8wDQYDVQQH
EwZEdXJoYW0xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh
Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjMxMTAxMDMxMTAwWhcNMjQxMDMxMDMxNjAw
WjBhMQswCQYDVQQGEwJVUzEXMBUGA1UECBMOTm9ydGggQ2Fyb2xpbmExFDASBgNV
BAoTC0h5cGVybGVkZ2VyMRAwDgYDVQQLEwdvcmRlcmVyMREwDwYDVQQDEwhvcmRl
cmVyMDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJ/8BDSyIwgsGhBm707HfKPH
YXX386THlAsgrLpeX5hODg/WCT88iNg9LGXuIkDyKReeZrfOKxhvqU8ia0s3m92j
ge8wgewwDgYDVR0PAQH/BAQDAgOoMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEF
BQcDAjAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBQv/xyhe7uAZgQBaTMAbcYJ8Odq
WzAfBgNVHSMEGDAWgBT/f5yIp0b3Xm6FbbuoOrOzgYzVojAPBgNVHREECDAGhwTA
qAOAMFwGCCoDBAUGBwgBBFB7ImF0dHJzIjp7ImhmLkFmZmlsaWF0aW9uIjoiIiwi
aGYuRW5yb2xsbWVudElEIjoib3JkZXJlcjAiLCJoZi5UeXBlIjoib3JkZXJlciJ9
fTAKBggqhkjOPQQDAgNIADBFAiEA8lsW64U+m4h7J3f4LhvuoZK5wLAfhxmid5Sy
JBw/NucCIBgOpDoiRK9keWr3WxJf0hasAqCY2yR/PeZ0lGFnmlcn
-----END CERTIFICATE-----
, ClientTLSCert:-----BEGIN CERTIFICATE-----
MIICwzCCAmmgAwIBAgIUDyHjRyRQAKRBmANka44MQqxhb5UwCgYIKoZIzj0EAwIw
cDELMAkGA1UEBhMCVVMxFzAVBgNVBAgTDk5vcnRoIENhcm9saW5hMQ8wDQYDVQQH
EwZEdXJoYW0xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh
Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjMxMTAxMDMxMTAwWhcNMjQxMDMxMDMxNjAw
WjBhMQswCQYDVQQGEwJVUzEXMBUGA1UECBMOTm9ydGggQ2Fyb2xpbmExFDASBgNV
BAoTC0h5cGVybGVkZ2VyMRAwDgYDVQQLEwdvcmRlcmVyMREwDwYDVQQDEwhvcmRl
cmVyMDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJ/8BDSyIwgsGhBm707HfKPH
YXX386THlAsgrLpeX5hODg/WCT88iNg9LGXuIkDyKReeZrfOKxhvqU8ia0s3m92j
ge8wgewwDgYDVR0PAQH/BAQDAgOoMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEF
BQcDAjAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBQv/xyhe7uAZgQBaTMAbcYJ8Odq
WzAfBgNVHSMEGDAWgBT/f5yIp0b3Xm6FbbuoOrOzgYzVojAPBgNVHREECDAGhwTA
qAOAMFwGCCoDBAUGBwgBBFB7ImF0dHJzIjp7ImhmLkFmZmlsaWF0aW9uIjoiIiwi
aGYuRW5yb2xsbWVudElEIjoib3JkZXJlcjAiLCJoZi5UeXBlIjoib3JkZXJlciJ9
fTAKBggqhkjOPQQDAgNIADBFAiEA8lsW64U+m4h7J3f4LhvuoZK5wLAfhxmid5Sy
JBw/NucCIBgOpDoiRK9keWr3WxJf0hasAqCY2yR/PeZ0lGFnmlcn
-----END CERTIFICATE-----
]
2023-11-01 15:15:23.779 CST [orderer.common.cluster] updateStubInMapping -> INFO 038 Allocating a new stub for node 1 with endpoint of 192.168.3.128:7050 for channel system-channel
2023-11-01 15:15:23.779 CST [orderer.common.cluster] updateStubInMapping -> INFO 039 Deactivating node 1 in channel system-channel with endpoint of 192.168.3.128:7050 due to TLS certificate change
2023-11-01 15:15:23.779 CST [orderer.common.cluster] applyMembershipConfig -> INFO 03a 1 exists in both old and new membership for channel system-channel , skipping its deactivation
2023-11-01 15:15:23.780 CST [orderer.common.cluster] Configure -> INFO 03b Exiting
2023-11-01 15:15:23.780 CST [orderer.consensus.etcdraft] start -> INFO 03c Starting raft node to join an existing channel channel=system-channel node=2
2023-11-01 15:15:23.780 CST [orderer.consensus.etcdraft] becomeFollower -> INFO 03d 2 became follower at term 0 channel=system-channel node=2
2023-11-01 15:15:23.780 CST [orderer.consensus.etcdraft] newRaft -> INFO 03e newRaft 2 [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0] channel=system-channel node=2
2023-11-01 15:15:23.780 CST [orderer.consensus.etcdraft] becomeFollower -> INFO 03f 2 became follower at term 1 channel=system-channel node=2
2023-11-01 15:15:23.780 CST [orderer.common.server] Main -> INFO 040 Starting orderer:Version: 2.2.0Commit SHA: 5ea85bc54Go version: go1.14.4OS/Arch: linux/amd64
2023-11-01 15:15:23.780 CST [orderer.common.server] Main -> INFO 041 Beginning to serve requests
2023-11-01 15:15:33.771 CST [orderer.common.onboarding] replicateDisabledChains -> INFO 042 Found 1 inactive chains: [channel1]
2023-11-01 15:15:33.771 CST [orderer.common.cluster] ReplicateChains -> INFO 043 Will now replicate chains [channel1]
2023-11-01 15:15:33.773 CST [orderer.common.cluster] discoverChannels -> INFO 044 Discovered 1 channels: [channel1]
2023-11-01 15:15:33.773 CST [orderer.common.cluster] channelsToPull -> INFO 045 Evaluating channels to pull: [channel1]
2023-11-01 15:15:33.773 CST [orderer.common.cluster] channelsToPull -> INFO 046 Probing whether I should pull channel channel1
2023-11-01 15:15:33.780 CST [orderer.common.cluster.replication] fetchLastBlockSeq -> INFO 047 192.168.3.128:7050 is at block sequence of 14 channel=system-channel
2023-11-01 15:15:33.780 CST [orderer.common.cluster.replication] HeightsByEndpoints -> INFO 048 Returning the heights of OSNs mapped by endpoints map[192.168.3.128:7050:15] channel=system-channel
2023-11-01 15:15:33.787 CST [orderer.common.cluster.replication] fetchLastBlockSeq -> INFO 049 192.168.3.128:7050 is at block sequence of 14 channel=system-channel
2023-11-01 15:15:33.787 CST [orderer.common.cluster.replication] connectToSomeEndpoint -> INFO 04a Connected to 192.168.3.128:7050 with last block seq of 14 channel=system-channel
2023-11-01 15:15:33.787 CST [orderer.common.cluster.replication] obtainStream -> INFO 04b Sending request for block [14] to 192.168.3.128:7050 channel=system-channel
2023-11-01 15:15:33.789 CST [orderer.common.cluster.replication] pullBlocks -> INFO 04c Got block [14] of size 5 KB from 192.168.3.128:7050 channel=system-channel
2023-11-01 15:15:33.793 CST [orderer.common.cluster.replication] fetchLastBlockSeq -> INFO 04d 192.168.3.128:7050 is at block sequence of 14 channel=system-channel
2023-11-01 15:15:33.793 CST [orderer.common.cluster.replication] connectToSomeEndpoint -> INFO 04e Connected to 192.168.3.128:7050 with last block seq of 14 channel=system-channel
2023-11-01 15:15:33.793 CST [orderer.common.cluster.replication] obtainStream -> INFO 04f Sending request for block [8] to 192.168.3.128:7050 channel=system-channel
2023-11-01 15:15:33.795 CST [orderer.common.cluster.replication] pullBlocks -> INFO 050 Got block [8] of size 18 KB from 192.168.3.128:7050 channel=system-channel
2023-11-01 15:15:33.797 CST [orderer.common.cluster] channelsToPull -> INFO 051 I do not belong to channel channel1 or am forbidden pulling it (not in the channel), skipping chain retrieval
2023-11-01 15:15:33.797 CST [orderer.common.cluster] ReplicateChains -> INFO 052 Found myself in 0 channels out of 1 : {[] [{channel1 0xc000616080}]}
2023-11-01 15:15:33.797 CST [orderer.common.cluster] appendBlock -> INFO 053 Skipping commit of block [0] for channel channel1 because height is at 1
2023-11-01 15:15:33.797 CST [orderer.common.cluster] PullChannel -> INFO 054 Channel system-channel shouldn't be pulled. Skipping it
2023-11-01 15:15:33.797 CST [orderer.common.onboarding] replicateDisabledChains -> INFO 055 Successfully replicated 0 chains: []
2023-11-01 15:15:53.772 CST [orderer.common.onboarding] replicateDisabledChains -> INFO 056 Found 1 inactive chains: [channel1]
2023-11-01 15:15:53.772 CST [orderer.common.cluster] ReplicateChains -> INFO 057 Will now replicate chains [channel1]
2023-11-01 15:15:53.773 CST [orderer.common.cluster] discoverChannels -> INFO 058 Discovered 1 channels: [channel1]
2023-11-01 15:15:53.773 CST [orderer.common.cluster] channelsToPull -> INFO 059 Evaluating channels to pull: [channel1]
2023-11-01 15:15:53.773 CST [orderer.common.cluster] channelsToPull -> INFO 05a Probing whether I should pull channel channel1
2023-11-01 15:15:53.776 CST [orderer.common.cluster.replication] fetchLastBlockSeq -> INFO 05b 192.168.3.128:7050 is at block sequence of 14 channel=system-channel
2023-11-01 15:15:53.776 CST [orderer.common.cluster.replication] HeightsByEndpoints -> INFO 05c Returning the heights of OSNs mapped by endpoints map[192.168.3.128:7050:15] channel=system-channel
2023-11-01 15:15:53.780 CST [orderer.common.cluster.replication] fetchLastBlockSeq -> INFO 05d 192.168.3.128:7050 is at block sequence of 14 channel=system-channel
2023-11-01 15:15:53.780 CST [orderer.common.cluster.replication] connectToSomeEndpoint -> INFO 05e Connected to 192.168.3.128:7050 with last block seq of 14 channel=system-channel
2023-11-01 15:15:53.780 CST [orderer.common.cluster.replication] obtainStream -> INFO 05f Sending request for block [14] to 192.168.3.128:7050 channel=system-channel
2023-11-01 15:15:53.781 CST [orderer.common.cluster.replication] pullBlocks -> INFO 060 Got block [14] of size 5 KB from 192.168.3.128:7050 channel=system-channel
2023-11-01 15:15:53.785 CST [orderer.common.cluster.replication] fetchLastBlockSeq -> INFO 061 192.168.3.128:7050 is at block sequence of 14 channel=system-channel
2023-11-01 15:15:53.785 CST [orderer.common.cluster.replication] connectToSomeEndpoint -> INFO 062 Connected to 192.168.3.128:7050 with last block seq of 14 channel=system-channel
2023-11-01 15:15:53.785 CST [orderer.common.cluster.replication] obtainStream -> INFO 063 Sending request for block [8] to 192.168.3.128:7050 channel=system-channel
2023-11-01 15:15:53.786 CST [orderer.common.cluster.replication] pullBlocks -> INFO 064 Got block [8] of size 18 KB from 192.168.3.128:7050 channel=system-channel
2023-11-01 15:15:53.787 CST [orderer.common.cluster] channelsToPull -> INFO 065 I do not belong to channel channel1 or am forbidden pulling it (not in the channel), skipping chain retrieval
2023-11-01 15:15:53.787 CST [orderer.common.cluster] ReplicateChains -> INFO 066 Found myself in 0 channels out of 1 : {[] [{channel1 0xc000616080}]}
2023-11-01 15:15:53.787 CST [orderer.common.cluster] appendBlock -> INFO 067 Skipping commit of block [0] for channel channel1 because height is at 1
2023-11-01 15:15:53.787 CST [orderer.common.cluster] PullChannel -> INFO 068 Channel system-channel shouldn't be pulled. Skipping it
2023-11-01 15:15:53.787 CST [orderer.common.onboarding] replicateDisabledChains -> INFO 069 Successfully replicated 0 chains: []
2023-11-01 15:16:33.772 CST [orderer.common.onboarding] replicateDisabledChains -> INFO 06a Found 1 inactive chains: [channel1]
2023-11-01 15:16:33.772 CST [orderer.common.cluster] ReplicateChains -> INFO 06b Will now replicate chains [channel1]
2023-11-01 15:16:33.774 CST [orderer.common.cluster] discoverChannels -> INFO 06c Discovered 1 channels: [channel1]
2023-11-01 15:16:33.774 CST [orderer.common.cluster] channelsToPull -> INFO 06d Evaluating channels to pull: [channel1]
2023-11-01 15:16:33.774 CST [orderer.common.cluster] channelsToPull -> INFO 06e Probing whether I should pull channel channel1
2023-11-01 15:16:33.777 CST [orderer.common.cluster.replication] fetchLastBlockSeq -> INFO 06f 192.168.3.128:7050 is at block sequence of 14 channel=system-channel
2023-11-01 15:16:33.777 CST [orderer.common.cluster.replication] HeightsByEndpoints -> INFO 070 Returning the heights of OSNs mapped by endpoints map[192.168.3.128:7050:15] channel=system-channel
2023-11-01 15:16:33.780 CST [orderer.common.cluster.replication] fetchLastBlockSeq -> INFO 071 192.168.3.128:7050 is at block sequence of 14 channel=system-channel
2023-11-01 15:16:33.780 CST [orderer.common.cluster.replication] connectToSomeEndpoint -> INFO 072 Connected to 192.168.3.128:7050 with last block seq of 14 channel=system-channel
2023-11-01 15:16:33.780 CST [orderer.common.cluster.replication] obtainStream -> INFO 073 Sending request for block [14] to 192.168.3.128:7050 channel=system-channel
2023-11-01 15:16:33.781 CST [orderer.common.cluster.replication] pullBlocks -> INFO 074 Got block [14] of size 5 KB from 192.168.3.128:7050 channel=system-channel
2023-11-01 15:16:33.786 CST [orderer.common.cluster.replication] fetchLastBlockSeq -> INFO 075 192.168.3.128:7050 is at block sequence of 14 channel=system-channel
2023-11-01 15:16:33.786 CST [orderer.common.cluster.replication] connectToSomeEndpoint -> INFO 076 Connected to 192.168.3.128:7050 with last block seq of 14 channel=system-channel
2023-11-01 15:16:33.786 CST [orderer.common.cluster.replication] obtainStream -> INFO 077 Sending request for block [8] to 192.168.3.128:7050 channel=system-channel
2023-11-01 15:16:33.787 CST [orderer.common.cluster.replication] pullBlocks -> INFO 078 Got block [8] of size 18 KB from 192.168.3.128:7050 channel=system-channel
2023-11-01 15:16:33.789 CST [orderer.common.cluster] channelsToPull -> INFO 079 I do not belong to channel channel1 or am forbidden pulling it (not in the channel), skipping chain retrieval
2023-11-01 15:16:33.790 CST [orderer.common.cluster] ReplicateChains -> INFO 07a Found myself in 0 channels out of 1 : {[] [{channel1 0xc000616080}]}
2023-11-01 15:16:33.790 CST [orderer.common.cluster] appendBlock -> INFO 07b Skipping commit of block [0] for channel channel1 because height is at 1
2023-11-01 15:16:33.790 CST [orderer.common.cluster] PullChannel -> INFO 07c Channel system-channel shouldn't be pulled. Skipping it
2023-11-01 15:16:33.790 CST [orderer.common.onboarding] replicateDisabledChains -> INFO 07d Successfully replicated 0 chains: []
2023-11-01 15:17:22.793 CST [orderer.consensus.etcdraft] Step -> INFO 07e 2 [logterm: 0, index: 0, vote: 0] cast MsgPreVote for 1 [logterm: 2, index: 5] at term 1 channel=system-channel node=2
2023-11-01 15:17:22.794 CST [orderer.consensus.etcdraft] Step -> INFO 07f 2 [term: 1] received a MsgVote message with higher term from 1 [term: 3] channel=system-channel node=2
2023-11-01 15:17:22.794 CST [orderer.consensus.etcdraft] becomeFollower -> INFO 080 2 became follower at term 3 channel=system-channel node=2
2023-11-01 15:17:22.794 CST [orderer.consensus.etcdraft] Step -> INFO 081 2 [logterm: 0, index: 0, vote: 0] cast MsgVote for 1 [logterm: 2, index: 5] at term 3 channel=system-channel node=2
2023-11-01 15:17:22.796 CST [orderer.consensus.etcdraft] run -> INFO 082 raft.node: 2 elected leader 1 at term 3 channel=system-channel node=2
2023-11-01 15:17:22.797 CST [orderer.consensus.etcdraft] run -> INFO 083 Raft leader changed: 0 -> 1 channel=system-channel node=2
2023-11-01 15:17:22.801 CST [orderer.consensus.etcdraft] apply -> INFO 084 Applied config change to add node 1, current nodes in channel: [1] channel=system-channel node=2
2023-11-01 15:17:22.801 CST [orderer.consensus.etcdraft] writeBlock -> INFO 085 Got block [2], expect block [3], this node was forced to catch up channel=system-channel node=2
2023-11-01 15:17:22.801 CST [orderer.consensus.etcdraft] apply -> INFO 086 Applied config change to add node 2, current nodes in channel: [1 2] channel=system-channel node=2

注意到此时已经有应用通道channel1的目录:

/home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/hyperledger/production/orderer/chains/
├── channel1
│   └── blockfile_000000
└── system-channel└── blockfile_0000002 directories, 2 files

五、添加orderer1的endpoint到系统通道

配置环境变量,下面需要使用orderer0节点的身份信息:

export CORE_PEER_LOCALMSPID="OrdererOrg1MSP"
export CORE_PEER_TLS_ROOTCERT_FILE=/home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem
export CORE_PEER_MSPCONFIGPATH=/home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/users/Admin@org1.example.com/msp

获取最新的系统通道配置:

peer channel fetch config /home/songzehao/fabric/config/channel-artifacts/config_block_v4.pb -o 192.168.3.128:7050 -c system-channel --tls --cafile /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem

日志:

2023-11-01 15:21:47.259 CST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2023-11-01 15:21:47.260 CST [cli.common] readBlock -> INFO 002 Received block: 2
2023-11-01 15:21:47.260 CST [channelCmd] fetch -> INFO 003 Retrieving last config block: 2
2023-11-01 15:21:47.262 CST [cli.common] readBlock -> INFO 004 Received block: 2

将系统通道配置转为json格式:

configtxlator proto_decode --input /home/songzehao/fabric/config/channel-artifacts/config_block_v4.pb --type common.Block | jq .data.data[0].payload.data.config > /home/songzehao/fabric/config/channel-artifacts/config_v4.json

追加orderer1的endpoint到排序节点地址列表:

jq '.channel_group.values.OrdererAddresses.value.addresses += ["192.168.3.128:7057"]' /home/songzehao/fabric/config/channel-artifacts/config_v4.json > /home/songzehao/fabric/config/channel-artifacts/modified_config_v4.json

原配置转化为pb:

configtxlator proto_encode --input /home/songzehao/fabric/config/channel-artifacts/config_v4.json --type common.Config --output /home/songzehao/fabric/config/channel-artifacts/config_v4.pb

更改后的配置转化为pb:

configtxlator proto_encode --input /home/songzehao/fabric/config/channel-artifacts/modified_config_v4.json --type common.Config --output /home/songzehao/fabric/config/channel-artifacts/modified_config_v4.pb

计算更新配置pb:

configtxlator compute_update --channel_id system-channel --original /home/songzehao/fabric/config/channel-artifacts/config_v4.pb --updated /home/songzehao/fabric/config/channel-artifacts/modified_config_v4.pb --output /home/songzehao/fabric/config/channel-artifacts/config_update_v4.pb

更新配置转化为json格式:

configtxlator proto_decode --input /home/songzehao/fabric/config/channel-artifacts/config_update_v4.pb --type common.ConfigUpdate --output /home/songzehao/fabric/config/channel-artifacts/config_update_v4.json

包装更新配置文件:

echo '{"payload":{"header":{"channel_header":{"channel_id":"system-channel", "type":2}},"data":{"config_update":'$(cat /home/songzehao/fabric/config/channel-artifacts/config_update_v4.json)'}}}' | jq . > /home/songzehao/fabric/config/channel-artifacts/config_update_v4_in_envelope.json

再次转为pb:

configtxlator proto_encode --input /home/songzehao/fabric/config/channel-artifacts/config_update_v4_in_envelope.json --type common.Envelope --output /home/songzehao/fabric/config/channel-artifacts/config_update_v4_in_envelope.pb

提交配置更新:

peer channel update -f /home/songzehao/fabric/config/channel-artifacts/config_update_v4_in_envelope.pb -c system-channel -o 192.168.3.128:7050 --tls true --cafile /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem

日志:

2023-11-01 15:23:45.634 CST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2023-11-01 15:23:45.641 CST [channelCmd] update -> INFO 002 Successfully submitted channel update

六、添加orderer1的tls到应用通道

获取应用通道的最新配置:

peer channel fetch config /home/songzehao/fabric/config/channel-artifacts/config_block_v5.pb -o 192.168.3.128:7050 -c channel1 --tls --cafile /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem

日志:

2023-11-01 15:24:03.635 CST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2023-11-01 15:24:03.639 CST [cli.common] readBlock -> INFO 002 Received block: 14
2023-11-01 15:24:03.639 CST [channelCmd] fetch -> INFO 003 Retrieving last config block: 8
2023-11-01 15:24:03.641 CST [cli.common] readBlock -> INFO 004 Received block: 8

将应用通道配置转为json格式:

configtxlator proto_decode --input /home/songzehao/fabric/config/channel-artifacts/config_block_v5.pb --type common.Block | jq .data.data[0].payload.data.config > /home/songzehao/fabric/config/channel-artifacts/config_v5.json

抽取orderer1的endpoint和tls证书内容:

echo '{"client_tls_cert":"'$(cat /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/server.crt | base64 -w 0)'","host":"192.168.3.128","port":7057,"server_tls_cert":"'$(cat /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/tls/server.crt | base64 -w 0)'"}' > /home/songzehao/fabric/config/channel-artifacts/org1consenter_v5.json

将其追加到json配置中:

jq --argfile consenterFile /home/songzehao/fabric/config/channel-artifacts/org1consenter_v5.json '.channel_group.groups.Orderer.values.ConsensusType.value.metadata.consenters += [$consenterFile]' /home/songzehao/fabric/config/channel-artifacts/config_v5.json > /home/songzehao/fabric/config/channel-artifacts/modified_config_v5.json

原配置转化为pb:

configtxlator proto_encode --input /home/songzehao/fabric/config/channel-artifacts/config_v5.json --type common.Config --output /home/songzehao/fabric/config/channel-artifacts/config_v5.pb

更改后的配置转化为pb:

configtxlator proto_encode --input /home/songzehao/fabric/config/channel-artifacts/modified_config_v5.json --type common.Config --output /home/songzehao/fabric/config/channel-artifacts/modified_config_v5.pb

计算更新配置pb:

configtxlator compute_update --channel_id channel1 --original /home/songzehao/fabric/config/channel-artifacts/config_v5.pb --updated /home/songzehao/fabric/config/channel-artifacts/modified_config_v5.pb --output /home/songzehao/fabric/config/channel-artifacts/config_update_v5.pb

更新配置转化为json格式:

configtxlator proto_decode --input /home/songzehao/fabric/config/channel-artifacts/config_update_v5.pb --type common.ConfigUpdate --output /home/songzehao/fabric/config/channel-artifacts/config_update_v5.json

包装更新配置文件:

echo '{"payload":{"header":{"channel_header":{"channel_id":"channel1", "type":2}},"data":{"config_update":'$(cat /home/songzehao/fabric/config/channel-artifacts/config_update_v5.json)'}}}' | jq . > /home/songzehao/fabric/config/channel-artifacts/config_update_v5_in_envelope.json

再次转为pb:

configtxlator proto_encode --input /home/songzehao/fabric/config/channel-artifacts/config_update_v5_in_envelope.json --type common.Envelope --output /home/songzehao/fabric/config/channel-artifacts/config_update_v5_in_envelope.pb

提交配置更新:

peer channel update -f /home/songzehao/fabric/config/channel-artifacts/config_update_v5_in_envelope.pb -c channel1 -o 192.168.3.128:7050 --tls true --cafile /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem

日志:

2023-11-01 15:25:52.446 CST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2023-11-01 15:25:52.455 CST [channelCmd] update -> INFO 002 Successfully submitted channel update

七、添加orderer1的endpoint到应用通道

获取应用通道的最新配置:

peer channel fetch config /home/songzehao/fabric/config/channel-artifacts/config_block_v6.pb -o 192.168.3.128:7050 -c channel1 --tls --cafile /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem

日志:

2023-11-01 15:26:15.084 CST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2023-11-01 15:26:15.086 CST [cli.common] readBlock -> INFO 002 Received block: 15
2023-11-01 15:26:15.086 CST [channelCmd] fetch -> INFO 003 Retrieving last config block: 15
2023-11-01 15:26:15.087 CST [cli.common] readBlock -> INFO 004 Received block: 15

将应用通道配置转为json格式:

configtxlator proto_decode --input /home/songzehao/fabric/config/channel-artifacts/config_block_v6.pb --type common.Block | jq .data.data[0].payload.data.config > /home/songzehao/fabric/config/channel-artifacts/config_v6.json

追加orderer1的endpoint到排序节点地址列表:

jq '.channel_group.values.OrdererAddresses.value.addresses += ["192.168.3.128:7057"]' /home/songzehao/fabric/config/channel-artifacts/config_v6.json > /home/songzehao/fabric/config/channel-artifacts/modified_config_v6.json

原配置转化为pb:

configtxlator proto_encode --input /home/songzehao/fabric/config/channel-artifacts/config_v6.json --type common.Config --output /home/songzehao/fabric/config/channel-artifacts/config_v6.pb

更改后的配置转化为pb:

configtxlator proto_encode --input /home/songzehao/fabric/config/channel-artifacts/modified_config_v6.json --type common.Config --output /home/songzehao/fabric/config/channel-artifacts/modified_config_v6.pb

计算更新配置pb:

configtxlator compute_update --channel_id channel1 --original /home/songzehao/fabric/config/channel-artifacts/config_v6.pb --updated /home/songzehao/fabric/config/channel-artifacts/modified_config_v6.pb --output /home/songzehao/fabric/config/channel-artifacts/config_update_v6.pb

更新配置转化为json格式:

configtxlator proto_decode --input /home/songzehao/fabric/config/channel-artifacts/config_update_v6.pb --type common.ConfigUpdate --output /home/songzehao/fabric/config/channel-artifacts/config_update_v6.json

包装更新配置文件:

echo '{"payload":{"header":{"channel_header":{"channel_id":"channel1", "type":2}},"data":{"config_update":'$(cat /home/songzehao/fabric/config/channel-artifacts/config_update_v6.json)'}}}' | jq . > /home/songzehao/fabric/config/channel-artifacts/config_update_v6_in_envelope.json

再次转为pb:

configtxlator proto_encode --input /home/songzehao/fabric/config/channel-artifacts/config_update_v6_in_envelope.json --type common.Envelope --output /home/songzehao/fabric/config/channel-artifacts/config_update_v6_in_envelope.pb

提交配置更新:

peer channel update -f /home/songzehao/fabric/config/channel-artifacts/config_update_v6_in_envelope.pb -c channel1 -o 192.168.3.128:7050 --tls true --cafile /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem

日志:

2023-11-01 15:30:51.973 CST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2023-11-01 15:30:51.982 CST [channelCmd] update -> INFO 002 Successfully submitted channel update

**注意:**根据官方文档(https://hyperledger-fabric.readthedocs.io/en/release-2.2/raft_configuration.html?highlight=five%20minutes#reconfiguration)说明,可能需要等待默认的5min,要么需要重启节点,才能保证检测到新通道:

It is possible to add a node that is already running (and participates in some channels already) to a channel while the node itself is running. To do this, simply add the node’s certificate to the channel config of the channel. The node will autonomously detect its addition to the new channel (the default value here is five minutes, but if you want the node to detect the new channel more quickly, reboot the node) and will pull the channel blocks from an orderer in the channel, and then start the Raft instance for that chain.

八、请求orderer1发交易

配置环境变量,连接peer0或者peer1节点,这里举例连接peer0:

export FABRIC_CA_CLIENT_HOME=/home/songzehao/fabric/fabric-ca-client
export PATH=/home/songzehao/fabric/bin:$PATH
export FABRIC_CFG_PATH=/home/songzehao/fabric/config
#export FABRIC_LOGGING_SPEC=DEBUGexport CORE_PEER_TLS_ENABLED=true
export CORE_PEER_LOCALMSPID="Org1MSP"
export CORE_PEER_TLS_ROOTCERT_FILE=/home/songzehao/fabric/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
export CORE_PEER_MSPCONFIGPATH=/home/songzehao/fabric/organizations/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
export CORE_PEER_ADDRESS="192.168.3.128:7051"
export CORE_PEER_GOSSIP_EXTERNALENDPOINT="192.168.3.128:7051"

请求orderer1来查询:

peer chaincode invoke -o 192.168.3.128:7057 -C channel1 -n basic --peerAddresses 192.168.3.128:7051 --tlsRootCertFiles /home/songzehao/fabric/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --tls --cafile /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem -c '{"function":"GetAllAssets","Args":[]}'

日志:

2023-11-01 15:46:58.733 CST [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 001 Chaincode invoke successful. result: status:200 payload:"[{\"appraisedValue\":300,\"assetID\":\"asset1\",\"color\":\"blue\",\"owner\":\"Tomoko\",\"size\":5},{\"appraisedValue\":400,\"assetID\":\"asset2\",\"color\":\"red\",\"owner\":\"Brad\",\"size\":5},{\"appraisedValue\":500,\"assetID\":\"asset3\",\"color\":\"green\",\"owner\":\"Jin Soo\",\"size\":10},{\"appraisedValue\":600,\"assetID\":\"asset4\",\"color\":\"yellow\",\"owner\":\"Max\",\"size\":10},{\"appraisedValue\":700,\"assetID\":\"asset5\",\"color\":\"black\",\"owner\":\"Adrian\",\"size\":15},{\"appraisedValue\":700,\"assetID\":\"asset6\",\"color\":\"white\",\"owner\":\"Michel\",\"size\":15},{\"appraisedValue\":800,\"assetID\":\"asset7\",\"color\":\"pink\",\"owner\":\"Jay\",\"size\":18},{\"appraisedValue\":127,\"assetID\":\"asset8\",\"color\":\"gold\",\"owner\":\"Song\",\"size\":27}]"

请求orderer1来发交易:

peer chaincode invoke -o 192.168.3.128:7057 -C channel1 -n basic --peerAddresses 192.168.3.128:7051 --tlsRootCertFiles /home/songzehao/fabric/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --tls --cafile /home/songzehao/fabric/organizations/ordererOrganizations/org1.example.com/orderers/orderer1.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem -c '{"function":"CreateAsset","Args":["asset9", "silver", "28", "Foo", "700"]}'

日志:

2023-11-01 15:54:17.814 CST [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 001 Chaincode invoke successful. result: status:200 payload:"{\"owner\":\"Foo\",\"color\":\"silver\",\"size\":28,\"appraisedValue\":700,\"assetID\":\"asset9\"}"

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/127041.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【案例】3D地球(vue+three.js)

需要下载插件 <template><div class"demo"><div id"container" ref"content"></div></div> </template> <script> import * as THREE from three; // import mapJSON from ../map.json; import { Or…

pytorch 笔记:KLDivLoss

1 介绍 对于具有相同形状的张量 ypred​ 和 ytrue&#xff08;ypred​ 是输入&#xff0c;ytrue​ 是目标&#xff09;&#xff0c;定义逐点KL散度为&#xff1a; 为了在计算时避免下溢问题&#xff0c;此KLDivLoss期望输入在对数空间中。如果log_targetTrue&#xff0c;则目标…

【mediasoup-sfu-cpp】4: SfuDemo:join并发布视频创建RTCTransport流程分析

【mediasoup-sfu-cpp】3: SfuDemo:加入会议 有点卡,在本篇进行日志流程分析。demo\controller/RoomsController.hpp 创建router create() config.mediasoup.routerOptions++++++:OnSuccess D:\XTRANS\soup\mediasoup-sfu-cpp\demo\controller/RoomsController.hpp: Line 71: …

数据库高速缓存配置

数据库一般都配置数据高速缓存&#xff0c;并且可以高速缓存中按页大小分不同的缓冲池。 Oracle&#xff1a; db_cache_size是指db_block_size对应的缓冲池&#xff0c;也可以指定非db_block_size的缓冲池&#xff0c;一般也都会再配置一个32K的缓冲池&#xff0c;两个缓冲池加…

(CV)论文列表

CNN卷积神经网络之SKNet及代码 https://blog.csdn.net/qq_41917697/article/details/122791002 【CVPR2022 oral】MixFormer: Mixing Features across Windows and Dimensions 【精选】【CVPR2022 oral】MixFormer: Mixing Features across Windows and Dimensions-CSDN博客

软考考前提醒:准考证打印、注意事项!

一、准考证打印 打印时间&#xff1a;10月30日~11月3日 重要提醒&#xff1a;打印入口即将关闭&#xff0c;还没打印的朋友要抓紧时间&#xff0c;以免无法参加考试&#xff01;&#xff01;&#xff01; 准考证打印流程 登录中国计算机技术职业资格网&#xff0c;点击【报…

新一代构建工具Vite-xyphf

一、什么vite? vite:是一款思维比较前卫而且先进的构建工具,他解决了一些webpack解决不了的问题——在开发环境下可以实现按需编译&#xff0c;加快了开发速度。而在生产环境下&#xff0c;它使用Rollup进行打包&#xff0c;提供更好的tree-shaking、代码压缩和性能优化&…

grafana docker安装

grafana docker安装 Grafana是一款用Go语言开发的开源数据可视化工具&#xff0c;可以做数据监控和数据统计&#xff0c;带有告警功能。目前使用grafana的公司有很多&#xff0c;如paypal、ebay、intel等。 Grafana 是 Graphite 和 InfluxDB 仪表盘和图形编辑器。Grafana 是开…

基于开源IM即时通讯框架MobileIMSDK:RainbowChat-iOS端v8.0版已发布

关于MobileIMSDK MobileIMSDK 是一套专门为移动端开发的开源IM即时通讯框架&#xff0c;超轻量级、高度提炼&#xff0c;一套API优雅支持 UDP 、TCP 、WebSocket 三种协议&#xff0c;支持 iOS、Android、H5、标准Java、小程序、Uniapp&#xff0c;服务端基于Netty编写。 工程…

计算机网络-应用层

文章目录 应用层协议原理万维网和HTTP协议万维网概述统一资源定位符HTML文档 超文本传输协议&#xff08;HTTP&#xff09;HTTP报文格式请求报文响应报文cookie 万维网缓存与代理服务器 DNS系统域名空间域名服务器和资源记录域名解析过程递归查询迭代查询 动态主机配置协议&…

每日刷题_

前k个高频元素 347. 前 K 个高频元素 给你一个整数数组 nums 和一个整数 k &#xff0c;请你返回其中出现频率前 k 高的元素。你可以按 任意顺序 返回答案。 一共有三种不同的题解&#xff1a; 1、把数据存到哈希表中&#xff0c;然后通过哈希表来排序&#xff0c;时间复杂度…

SpringCloud Alibaba Demo(Nacos,OpenFeign,Gatway,Sentinel)

开源地址&#xff1a; ma/springcloud-alibaba-demo 简介 参考&#xff1a;https://www.cnblogs.com/zys2019/p/12682628.html SpringBoot、SpringCloud 、SpringCloud Alibaba 以及各种组件存在版本对应关系。可参考下面 版本对应 项目前期准备 启动nacos. ./startup.c…

数据结构(超详细讲解!!)第十八节 串(堆串)

1.定义 假设以一维数组heap &#xff3b;MAXSIZE&#xff3d; 表示可供字符串进行动态分配的存储空间&#xff0c;并设 int start 指向heap 中未分配区域的开始地址(初始化时start 0) 。在程序执行过程中&#xff0c;当生成一个新串时&#xff0c;就从start指示的位置起&#…

AQS 框架、JUC常见并发包 简述

AQS&#xff08;AbstractQueuedSynchronizer&#xff09;是 Java 中的一个强大的同步框架&#xff0c;为我们提供了实现各种同步器的基础。在本篇博客中&#xff0c;我们将介绍 AQS 框架的基本原理&#xff0c;并探讨几个常见的 AQS 实现&#xff1a;ReentrantLock、CountDownL…

kotlin中集合操作符

集合操作符 1.总数操作符 any —— 判断集合中 是否有满足条件 的元素&#xff1b; all —— 判断集合中的元素 是否都满足条件&#xff1b; none —— 判断集合中是否 都不满足条件&#xff0c;是则返回true&#xff1b; count —— 查询集合中 满足条件 的 元素个数&#x…

python科研绘图:条形图

条形图&#xff08;bar chart&#xff09;是一种以条形或柱状排列数据的图形表示形式&#xff0c;可以显示各项目之间的比较。它通常用于展示不同类别的数据&#xff0c;例如在分类问题中的不同类别、不同产品或不同年份的销售数据等。 条形图中的每个条形代表一个类别或一个数…

easyexcel根据模板导出Excel文件,表格自动填充问题

背景 同事在做easyexcel导出Excel&#xff0c;根据模板导出的时候&#xff0c;发现导出的表格&#xff0c;总会覆盖落款的内容。 这就很尴尬了&#xff0c;表格居然不能自动填充&#xff0c;直接怒喷工具&#xff0c;哈哈。 然后一起看了一下这个问题。 分析原因 我找了自…

MySQL - 系统库之 performance_schema

performance_schema &#xff1a;用于收集和存储关于数据库性能和资源利用情况的信息&#xff0c;可用于监控、分析和优化数据库的性能&#xff1a; 用途&#xff1a; 性能监控&#xff1a;performance_schema 用于监控数据库的性能。它提供了有关查询执行、锁等待、I/O操作、…

基于goframe2.5.4、vue3、tdesign-vue-next开发的全栈前后端分离的管理系统

goframe-admin goframe-admin V1.0.0 平台简介 基于goframe2.5.4、vue3、tdesign-vue-next开发的全栈前后端分离的管理系统。前端采用tdesign-vue-next-starter 、vue3、pinia、tdesign-vue-next。 特征 高生产率&#xff1a;几分钟即可搭建一个后台管理系统认证机制&#x…

华为云资源搭建过程

网络搭建 EIP&#xff1a; 弹性EIP&#xff0c;支持IPv4和IPv6。 弹性公网IP&#xff08;Elastic IP&#xff09;提供独立的公网IP资源&#xff0c;包括公网IP地址与公网出口带宽服务。可以与弹性云服务器、裸金属服务器、虚拟IP、弹性负载均衡、NAT网关等资源灵活地绑定及解绑…