fabric配置文件讲解整理(二) configtx.yaml

本文详细梳理了Fabric区块链网络中configtx.yaml配置文件的各个部分,包括Organizations、Capabilities、Application、Orderer和Channel等,阐述了如何设置组织、策略、通道配置以及排序服务相关参数,为Fabric网络的搭建和维护提供参考。
摘要由CSDN通过智能技术生成

上一篇整理了core.yaml,这篇文章梳理一下configtx.yaml配置文件的内容,都是大概地标注了一下,方便自己日后更改项目配置。如果整理的有错误,欢迎评论和私信!

在生成组织结构与身份证书、密钥之后,接下来使用 configtxgen 工具创建配置网络的文件:创世区块、应用通道配置交易、锚节点更新配置交易。应用通道配置交易在应用通道创建时广播给 orderer;锚节点更新配置交易指定应用通道上每个组织的锚节点。上述信息的配置被定义在 configtx.yaml 文件中。

configtx.yaml文件分为几大section:Organizations, Capabilities, Application,  Orderer, CHANNEL, Profile。

下面是部分注释

##################################################################

#   Section: Organizations

##################################################################

Organizations:

    - &OrdererOrg     //orderer组织配置

        Name: OrdererOrg

        ID: OrdererMSP

        MSPDir: ../organizations/ordererOrganizations/flight.com/msp  //msp配置路径

        Policies:     //定义策略

            Readers:

                Type: Signature

                Rule: "OR('OrdererMSP.member')"

            Writers:

                Type: Signature

                Rule: "OR('OrdererMSP.member')"

            Admins:

                Type: Signature

                Rule: "OR('OrdererMSP.admin')"

        OrdererEndpoints:

            - orderer.flight.com:7050

//下面是具体的各个组织配置

    - &Applicant   

        Name: ApplicantMSP

        ID: ApplicantMSP

        MSPDir: ../organizations/peerOrganizations/applicant.flight.com/msp

        Policies:

            Readers:

                Type: Signature

                Rule: "OR('ApplicantMSP.admin', 'ApplicantMSP.peer', 'ApplicantMSP.client')"

            Writers:

        

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值