单点订购器可以处理多个通道吗?
这是订购器的.yaml配置:
orderer_example_com:
container_name: orderer.example.com
image: hyperledger/fabric-orderer
environment:
- ORDERER_GENERAL_LOGLEVEL=debug
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis1.block
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/crypto/orderer/msp
- ORDERER_GENERAL_TLS_ENABLED=true
- ORDERER_GENERAL_TLS_PRIVATEKEY=/etc/hyperledger/crypto/orderer/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/etc/hyperledger/crypto/orderer/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/etc/hyperledger/crypto/orderer/tls/ca.crt, /etc/hyperledger/crypto/peerOrg1/tls/ca.crt, /etc/hyperledger/crypto/peerOrg2/tls/ca.crt, /etc/hyperledger/crypto/peerOrg3/tls/ca.crt]
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderers
command: orderer
ports:
- 7050:7050
volumes:
- ./channel:/etc/hyperledger/configtx
- ./channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/:/etc/hyperledger/crypto/orderer
- ./channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/:/etc/hyperledger/crypto/peerOrg1
- ./channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/:/etc/hyperledger/crypto/peerOrg2
- ./channel/crypto-config/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/:/etc/hyperledger/crypto/peerOrg3
networks:
chfn:
aliases:
- orderer.example.com
i对于每个通道和属性Orderer_general_genesisfile的Genesis文件仅设置为其中之一。我应该为每个频道定义订购器吗?
如果您查看configtx.yaml
文件,该文件实际上包含了要编码为订购服务Genesis块的所有相关信息,例如组织,它定义了所有知识组织在引导阶段,可能会形成一个联盟来启动通道。实际上,configtxgen
将相关的加密材料编码为Genesis块,以便订购者能够验证试图提交交易或连接以交付新块的同行的身份。
################################################################################
#
# Section: Organizations
#
# - This section defines the different organizational identities which will
# be referenced later in the configuration.
#
################################################################################
Organizations:
# SampleOrg defines an MSP using the sampleconfig. It should never be used
# in production but may be used as a template for other definitions
- &OrdererOrg
# DefaultOrg defines the organization which is used in the sampleconfig
# of the fabric.git development environment
Name: OrdererOrg
# ID to load the MSP definition as
ID: OrdererMSP
# MSPDir is the filesystem path which contains the MSP configuration
MSPDir: crypto-config/ordererOrganizations/example.com/msp
虽然该创世纪块与使用新通道创建的创世纪块无关。因此,对于您的问题,一个订购服务只要由知识组织组成,就可以处理多个渠道。您可以为configtxgen
工具定义配置文件,以指定要编码为特定渠道财团的组织列表,例如:
Orgs12Channel:
Consortium: SampleConsortium
Application:
<<: *ApplicationDefaults
Organizations:
- *Org1
- *Org2
定义了两个组织Org1
和Org2
的渠道,而
Orgs13Channel:
Consortium: SampleConsortium
Application:
<<: *ApplicationDefaults
Organizations:
- *Org1
- *Org3
可以定义Org1
和Org3
的附加通道。在所有用于定义财团的订购服务的配置之后,并列出了所有可以定义渠道的组织。
OrdererGenesis:
Orderer:
<<: *OrdererDefaults
Organizations:
- *OrdererOrg
Consortiums:
SampleConsortium:
Organizations:
- *Org1
- *Org2
- *Org3
是。我们可以单订单多个通道。但是我们应该有很多订单以保持系统可用。
@artem的响应是肯定的,在hyperledger面料中的订购服务可以处理多个通道。
订单服务器服务可能具有多个节点,以提供某些容错协议(例如Paxos,Raft, *bft等)实施的服务的弹性,对于Kafka订单器,我们当前支持崩溃的容错容忍。
。面料还支持具有多个不同订单服务器服务的拓扑模型,每种都支持一组非重叠的渠道。
对等节点可以参与多个渠道,而这些渠道 由不同的订购服务器服务支持。