Hyperledger fabric 通道创建策略

Hyperledger fabric's ChannelCreationPolicy

我正在努力编写创建频道的策略 (ChannelCreationPolicy) 这是我的 configtx.yaml

---
Organizations:
- &OrdererOrg
  Name: OrdererOrg
  ID: OrdererMSP
  MSPDir: ../crypto-config/ordererOrganizations/orderer-org/msp
- &ShopOrg
  Name: ShopOrgMSP
  ID: ShopOrgMSP
  MSPDir: ../crypto-config/peerOrganizations/shop-org/msp
  AnchorPeers:
  - Host: shop-peer-0
    Port: 7051


Orderer: &OrdererDefaults
  OrdererType: solo
  Addresses:
  - orderer0:7050
  BatchTimeout: 2s
  BatchSize:
    MaxMessageCount: 10
    AbsoluteMaxBytes: 99 MB
    PreferredMaxBytes: 512 KB
  Organizations:

Application: &ApplicationDefaults
  Organizations:

Profiles:
  TwoOrgGenesis:
    Orderer:
      <<: *OrdererDefaults
      Organizations:
      - *OrdererOrg
    Consortiums:
      InsuranceConsortium:
        # ChannelCreationPolicy:
        #   Admins:
        #     Type: Signature
        #     Rule: "OR('ShopOrgMSP.admin')"
        Organizations:
        - *ShopOrg
  TwoOrgChannel:
    Consortium: InsuranceConsortium
    Application:
      <<: *ApplicationDefaults
      Organizations:
      - *ShopOrg

我试图将 ChannelCreationPolicy 块放在上面的评论区,但它说:'Profiles[TwoOrgGenesis].Consortiums[InsuranceConsortium]' has invalid keys: ChannelCreationPolicy

我在该 .yaml 中找不到 ChannelCreationPolicy 的位置。那么我该如何编写策略,例如,只有 ShopOrgMSP 管理员才能创建频道?

查看 the source for configtxgen,该工具似乎不支持频道创建策略。您需要将此更改作为配置更新事务提交。

不幸的是,这是一个非常重要的过程,但至少有一个示例(用于将组织添加到频道)here