主题
fabric-x-orderer · 配置
顶层 — Configuration
来源:config/config.go:41-43。
go
type Configuration struct {
LocalConfig *LocalConfig
SharedConfig *protos.SharedConfig
}加载:ReadConfig()(config/config.go:47),返回 (*Configuration, *common.Block, error);支持 YAML bootstrap(config/config.go:72-80)。
NodeLocalConfig
来源:config/local_config.go:29-48。
| 字段 | yaml tag |
|---|---|
PartyID | PartyID |
GeneralConfig | General |
FileStore | FileStore |
RouterParams | Router |
BatcherParams | Batcher |
ConsensusParams | Consensus |
AssemblerParams | Assembler |
OperationsConfig | Operations |
MetricsConfig | Metrics |
GeneralConfig
来源:config/local_config.go:75-104。
| 字段 | yaml tag / 用途 |
|---|---|
ListenAddress | ListenAddress |
ListenPort | ListenPort |
TLSConfig | TLS |
KeepaliveSettings、BackoffSettings、MaxRecvMsgSize、MaxSendMsgSize | — |
Bootstrap | Bootstrap(支持 yaml 方法) |
LocalMSPDir、LocalMSPID、BCCSP | — |
LogSpec | 节点日志级别 |
PartyConfig(shared)
来源:config/party_shared_config.go:11-26。
| 字段 | yaml tag |
|---|---|
PartyID | PartyID(types.PartyID) |
CACerts | CACerts |
TLSCACerts | TLSCACerts |
RouterConfig | RouterConfig |
BatchersConfig | BatchersConfig([]) |
ConsenterConfig | ConsenterConfig |
AssemblerConfig | AssemblerConfig |
各角色 NodeConfig
来源:config/party_shared_config.go:28-68。
RouterNodeConfig(28-35)
TLSCert、Host、Port。
BatcherNodeConfig(37-48)
ShardID(types.ShardID)、SignCert、TLSCert、Host、Port。
ConsenterNodeConfig(50-59)
SignCert、TLSCert、Host、Port。
AssemblerNodeConfig(61-68)
TLSCert、Host、Port。
默认 armageddon 配置
来源:common/tools/armageddon/armageddon.go:46-75。
- 4 Party(ID 1-4)
- 每 Party:1 assembler + 1 consenter + 1 router + 2 batchers
- 端点:
127.0.0.1:7050-7069(每 Party 5 个连续端口,依次为 assembler/consenter/router/batcher×2)
共享类型
来源:common/types/types.go。
ShardID uint16(:15)、PartyID uint16(:21)、BatchID(接口,:34)。
TLS 与 MSP
GeneralConfig.TLSConfig、LocalMSPDir、LocalMSPID、BCCSP(config/local_config.go:75-104)。具体子字段 [未核]。
部署样本
来源:deployment/vms/sample-config。具体 yaml 样例 [未核]。