hyperledger-fabric - 每个频道的同意者子集 - 每个频道的组织的单独订购者
问题描述
我必须找到一种方法来为每个频道定义同意者的子集。
主要目的是为每个渠道分开组织的订购者。
例如:
* I have Org1 and Org2:
** Org1 has orderes: orderer11, orderer 12
** Org2 has orderer: 21, orderer 22
* I want to create system channel which contains EtcdRaft consenter with all 4 orderers.
* I want to create 2 application channels, each one of them will contain EtcdRaft with 1 orderer from each org in the following way:
** channel1 with orderer11 and orderer 21
** channel2 with orderer12 and orderer 22
我试图在 configtx.yaml 文件上配置理想的配置,但我所有的实验都失败了。
预期配置示例:
Profiles:
/** System Channel **/
mychannel
Organization: OrdererOrg
Orderer:
<<: *OrdererDefaults
OrdererType: etcdraft
EtcdRaft:
Consenters:
- Host: orderer11.example.com
- Host: orderer12.example.com
- Host: orderer21.example.com
- Host: orderer22.example.com
Consortiums:
Organizations:
- *org1
- *org2
/** Application Channels **/
channel1
Orderer:
<<: *OrdererDefaults
OrdererType: etcdraft
EtcdRaft:
Consenters:
- Host: orderer11.example.com
- Host: orderer21.example.com
Consortiums:
Organizations:
- *org1
- *org2
channel2
Orderer:
<<: *OrdererDefaults
OrdererType: etcdraft
EtcdRaft:
Consenters:
- Host: orderer12.example.com
- Host: orderer22.example.com
Consortiums:
Organizations:
- *org1
- *org2
如何应用预期的配置?
解决方案
排序服务使用系统通道作为模板来创建应用程序通道。系统频道中定义的排序服务节点成为新频道的默认同意者集,排序服务的管理员成为频道的排序者管理员。
所以你Orderer
在 Profile 应用程序通道部分定义是没用的
但是可以通过更新应用程序通道配置在通道中添加或删除排序节点
因此,如果您想为每个通道使用单独的订购者,在创建应用程序通道后,删除您的应用程序通道配置的同意者集,您可以参考https://hyperledger-fabric.readthedocs.io/en/release-2.2/config_update.html
https://kctheservant.medium.com/add-an-orderer-to-a-running-raft-based-orderer-cluster-b6a432da138c
我在 1.4.2 版成功使用了每个频道的单独订购者,我认为 2.3.x 版更容易。因为您可以在没有系统通道的情况下设置您的结构网络。
推荐阅读
- python - 如何使用具有不同特征的两个模型的集成学习作为输入?
- ffmpeg - 使用 ffmpeg 库转换流格式
- docker - 如何在 docker-compose.yml 中运行多个 shell 脚本
- jpa - 如何为不提供列名的存储过程调用定义 JPA SqlResultSetMapping?
- math - 线性回归 2 个因变量
- bash - 我需要通过 gitlab-ci 中的 ssh 将一个环境变量传递给 docker
- python - python REPL:仅显示完成选择的相关部分
- angular - 如何使用 AngularFire 从 FireBase 存储中获取文件列表
- c++ - Pybind11:如何为结构成员变量分配默认值?
- python - Kivy:如何检查拖动行为项的位置