Hyperledger Fabric学习笔记——crypto-config配置文件

在运行test-network案例时,使用了network.sh脚本来启动区块链网络,该脚本默认通过organizations/cryptogen文件夹中的配置文件(crypto-config-orderer.yaml、crypto-config-org1.yaml和crypto-config-org2.yaml)来使用cryptogen工具生成相应组织的证书和密钥,下面是精简过后的配置文件:

OrdererOrgs:
  - Name: Orderer
    Domain: example.com
    EnableNodeOUs: true
    Specs:
      - Hostname: orderer

PeerOrgs:
  - Name: Org1
    Domain: org1.example.com
    EnableNodeOUs: true
    Template:
      Count: 1
      SANS:
        - localhost
    Users:
      Count: 1

PeerOrgs:
  - Name: Org2
    Domain: org2.example.com
    EnableNodeOUs: true
    Template:
      Count: 1
      SANS:
        - localhost
    Users:
      Count: 1
  • Domain:相应组织的顶级域名
  • EnableNodeOUs:启用节点OU划分
  • Template.Count:表示组织下有几个节点,默认名字为peer0、peer1依次类推
  • Users.Count:表示组织下有几个User,默认有一个Admin,User命名从User1开始
发布了23 篇原创文章 · 获赞 0 · 访问量 1263

猜你喜欢

转载自blog.csdn.net/Nemoosi/article/details/104635088