Hyperledger fabric configtxgen失败:错误003找不到配置文件
因此,我正在尝试启动/引导一个具有一些自定义对等/组织的Hyperledger结构网络,我的configtx.yaml如下所示:Hyperledger fabric configtxgen失败:错误003找不到配置文件,hyperledger-fabric,hyperledger,Hyperledger Fabric,Hyperledger,因此,我正在尝试启动/引导一个具有一些自定义对等/组织的Hyperledger结构网络,我的configtx.yaml如下所示: Organizations: - &orderer Name: orderer ID: ordererMsp MSPDir: crypto-config/ordererOrganizations/orderer/msp #For now I keep the basic/default
Organizations:
- &orderer
Name: orderer
ID: ordererMsp
MSPDir: crypto-config/ordererOrganizations/orderer/msp
#For now I keep the basic/default policies here, we need to find out what is needed later.
Policies:
Readers:
Type: Signature
Rule: "OR('ordererMsp.member')"
Writers:
Type: Signature
Rule: "OR('ordererMsp.member')"
Admins:
Type: Signature
Rule: "OR('ordererMsp.admin')"
- &org1
# DefaultOrg defines the organization which is used in the sampleconfig
# of the fabric.git development environment
Name: org1
# ID to load the MSP definition as
ID: org1_MSP
MSPDir: crypto-config/peerOrganizations/org1/msp
# Policies defines the set of policies at this level of the config tree
# For organization policies, their canonical path is usually
# /Channel/<Application|Orderer>/<OrgName>/<PolicyName>
Policies:
Readers:
Type: Signature
Rule: "OR('org1_MSP.admin', 'org1_MSP.peer', 'org1_MSP.client')"
Writers:
Type: Signature
Rule: "OR('org1_MSP.admin', 'org1_MSP.client')"
Admins:
Type: Signature
Rule: "OR('org1_MSP.admin')"
# leave this flag set to true.
AnchorPeers:
# AnchorPeers defines the location of peers which can be used
# for cross org gossip communication. Note, this value is only
# encoded in the genesis block in the Application section context
- Host: ANCHOR_HOST
Port: 1000
- &org2
# DefaultOrg defines the organization which is used in the sampleconfig
# of the fabric.git development environment
Name: org2
# ID to load the MSP definition as
ID: org2_MSP
MSPDir: crypto-config/peerOrganizations/org2/msp
# Policies defines the set of policies at this level of the config tree
# For organization policies, their canonical path is usually
# /Channel/<Application|Orderer>/<OrgName>/<PolicyName>
Policies:
Readers:
Type: Signature
Rule: "OR('org2_MSP.admin', 'org2_MSP.peer', 'org2_MSP.client')"
Writers:
Type: Signature
Rule: "OR('org2_MSP.admin', 'org2_MSP.client')"
Admins:
Type: Signature
Rule: "OR('org2_MSP.admin')"
# leave this flag set to true.
AnchorPeers:
# AnchorPeers defines the location of peers which can be used
# for cross org gossip communication. Note, this value is only
# encoded in the genesis block in the Application section context
- Host: ANCHOR_HOST
Port: 1000
- &org3
# DefaultOrg defines the organization which is used in the sampleconfig
# of the fabric.git development environment
Name: org3
# ID to load the MSP definition as
ID: org3_MSP
MSPDir: crypto-config/peerOrganizations/org3/msp
# Policies defines the set of policies at this level of the config tree
# For organization policies, their canonical path is usually
# /Channel/<Application|Orderer>/<OrgName>/<PolicyName>
Policies:
Readers:
Type: Signature
Rule: "OR('org3_MSP.admin', 'org3_MSP.peer', 'org3_MSP.client')"
Writers:
Type: Signature
Rule: "OR('org3_MSP.admin', 'org3_MSP.client')"
Admins:
Type: Signature
Rule: "OR('org3_MSP.admin')"
# leave this flag set to true.
AnchorPeers:
# AnchorPeers defines the location of peers which can be used
# for cross org gossip communication. Note, this value is only
# encoded in the genesis block in the Application section context
- Host: ANCHOR_HOST
Port: 1000
- &org4
# DefaultOrg defines the organization which is used in the sampleconfig
# of the fabric.git development environment
Name: org4
# ID to load the MSP definition as
ID: org4_MSP
MSPDir: crypto-config/peerOrganizations/org4/msp
# Policies defines the set of policies at this level of the config tree
# For organization policies, their canonical path is usually
# /Channel/<Application|Orderer>/<OrgName>/<PolicyName>
Policies:
Readers:
Type: Signature
Rule: "OR('org4_MSP.admin', 'org4_MSP.peer', 'org4_MSP.client')"
Writers:
Type: Signature
Rule: "OR('org4_MSP.admin', 'org4_MSP.client')"
Admins:
Type: Signature
Rule: "OR('org4_MSP.admin')"
# leave this flag set to true.
AnchorPeers:
# AnchorPeers defines the location of peers which can be used
# for cross org gossip communication. Note, this value is only
# encoded in the genesis block in the Application section context
- Host: ANCHOR_HOST
Port: 1000
---
Capabilities:
# Channel capabilities apply to both the orderers and the peers and must be
# supported by both.
# Set the value of the capability to true to require it.
Channel: &ChannelCapabilities
# V1.4.2 for Channel is a catchall flag for behavior which has been
# determined to be desired for all orderers and peers running at the v1.4.2
# level, but which would be incompatible with orderers and peers from
# prior releases.
# Prior to enabling V1.4.2 channel capabilities, ensure that all
# orderers and peers on a channel are at v1.4.2 or later.
V1_4_2: true
# Orderer capabilities apply only to the orderers, and may be safely
# used with prior release peers.
# Set the value of the capability to true to require it.
Orderer: &OrdererCapabilities
# V1.4.2 for Orderer is a catchall flag for behavior which has been
# determined to be desired for all orderers running at the v1.4.2
# level, but which would be incompatible with orderers from prior releases.
# Prior to enabling V1.4.2 orderer capabilities, ensure that all
# orderers on a channel are at v1.4.2 or later.
V1_4_2: true
# Application capabilities apply only to the peer network, and may be safely
# used with prior release orderers.
# Set the value of the capability to true to require it.
Application: &ApplicationCapabilities
# V1.4.2 for Application enables the new non-backwards compatible
# features and fixes of fabric v1.4.2.
V1_4_2: true
# V1.3 for Application enables the new non-backwards compatible
# features and fixes of fabric v1.3.
V1_3: false
# V1.2 for Application enables the new non-backwards compatible
# features and fixes of fabric v1.2 (note, this need not be set if
# later version capabilities are set)
V1_2: false
# V1.1 for Application enables the new non-backwards compatible
# features and fixes of fabric v1.1 (note, this need not be set if
# later version capabilities are set).
V1_1: false
---
Application: &ApplicationDefaults
# Organizations is the list of orgs which are defined as participants on
# the application side of the network
Organizations:
# Policies defines the set of policies at this level of the config tree
# For Application policies, their canonical path is
# /Channel/Application/<PolicyName>
Policies:
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
Capabilities:
<<: *ApplicationCapabilities
Orderer: &OrdererDefaults
# Orderer Type: The orderer implementation to start
# Available types are "solo" and "kafka"
OrdererType: solo
Addresses:
- orderer_orderer.com:6000
# Batch Timeout: The amount of time to wait before creating a batch
BatchTimeout: 2s
# Batch Size: Controls the number of messages batched into a block
BatchSize:
# Max Message Count: The maximum number of messages to permit in a batch
MaxMessageCount: 10
# Absolute Max Bytes: The absolute maximum number of bytes allowed for
# the serialized messages in a batch.
AbsoluteMaxBytes: 99 MB
# Preferred Max Bytes: The preferred maximum number of bytes allowed for
# the serialized messages in a batch. A message larger than the preferred
# max bytes will result in a batch larger than preferred max bytes.
PreferredMaxBytes: 512 KB
Kafka:
# Brokers: A list of Kafka brokers to which the orderer connects
# NOTE: Use IP:port notation
Brokers:
- 127.0.0.1:9092
# Organizations is the list of orgs which are defined as participants on
# the orderer side of the network
Organizations:
# Policies defines the set of policies at this level of the config tree
# For Orderer policies, their canonical path is
# /Channel/Orderer/<PolicyName>
Policies:
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
# BlockValidation specifies what signatures must be included in the block
# from the orderer for the peer to validate it.
BlockValidation:
Type: ImplicitMeta
Rule: "ANY Writers"
---
Channel: &ChannelDefaults
# Policies defines the set of policies at this level of the config tree
# For Channel policies, their canonical path is
# /Channel/<PolicyName>
Policies:
# Who may invoke the 'Deliver' API
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
# Who may invoke the 'Broadcast' API
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
# By default, who may modify elements at this config level
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
# Capabilities describes the channel level capabilities, see the
# dedicated Capabilities section elsewhere in this file for a full
# description
Capabilities:
<<: *ChannelCapabilities
---
Profiles:
DefaultOrgsChannelGenesis:
<<: *ChannelDefaults
Orderer:
<<: *OrdererDefaults
Organizations:
- *orderer
Capabilities:
<<: *OrdererCapabilities
Consortiums:
SampleConsortium:
Organizations:
- *org1
- *org2
- *org3
- *org4
DefaultOrgsChannel:
Consortium: SampleConsortium
Application:
<<: *ApplicationDefaults
Organizations:
- *org1
- *org2
- *org3
- *org4
Capabilities:
<<: *ApplicationCapabilities
组织:
-订购者(&O)
名称:订购方
ID:ordermsp
MSPDir:crypto-config/order-organizations/order/msp
#现在,我将基本/默认策略保留在这里,我们需要了解以后需要什么。
政策:
读者:
类型:签名
规则:“或('ordermsp.member')”
作者:
类型:签名
规则:“或('ordermsp.member')”
管理员:
类型:签名
规则:“或('ordermsp.admin')”
-&org1
#DefaultOrg定义sampleconfig中使用的组织
#fabric.git开发环境的
姓名:org1
#将MSP定义加载为的ID
ID:org1_MSP
MSPDir:crypto-config/peerOrganizations/org1/msp
#策略在配置树的这个级别定义策略集
#对于组织策略,其规范路径通常为
#/频道///
政策:
读者:
类型:签名
规则:“或('org1_MSP.admin'、'org1_MSP.peer'、'org1_MSP.client')”
作者:
类型:签名
规则:“或('org1_MSP.admin'、'org1_MSP.client')”
管理员:
类型:签名
规则:“或('org1_MSP.admin')”
#将此标志设置为true。
主持人:
#主持人定义可以使用的对等点的位置
#用于跨组织的闲聊交流。注意,此值仅为
#编码在应用程序部分上下文中的genesis块中
-主持人:主持人
港口:1000
-&org2
#DefaultOrg定义sampleconfig中使用的组织
#fabric.git开发环境的
姓名:org2
#将MSP定义加载为的ID
ID:org2_MSP
MSPDir:crypto-config/peerOrganizations/org2/msp
#策略在配置树的这个级别定义策略集
#对于组织策略,其规范路径通常为
#/频道///
政策:
读者:
类型:签名
规则:“或('org2_MSP.admin'、'org2_MSP.peer'、'org2_MSP.client')”
作者:
类型:签名
规则:“或('org2_MSP.admin'、'org2_MSP.client')”
管理员:
类型:签名
规则:“或('org2_MSP.admin')”
#将此标志设置为true。
主持人:
#主持人定义可以使用的对等点的位置
#用于跨组织的闲聊交流。注意,此值仅为
#编码在应用程序部分上下文中的genesis块中
-主持人:主持人
港口:1000
-&org3
#DefaultOrg定义sampleconfig中使用的组织
#fabric.git开发环境的
姓名:org3
#将MSP定义加载为的ID
ID:org3\u MSP
MSPDir:crypto-config/peerOrganizations/org3/msp
#策略在配置树的这个级别定义策略集
#对于组织策略,其规范路径通常为
#/频道///
政策:
读者:
类型:签名
规则:“或('org3_MSP.admin'、'org3_MSP.peer'、'org3_MSP.client')”
作者:
类型:签名
规则:“或('org3_MSP.admin'、'org3_MSP.client')”
管理员:
类型:签名
规则:“或('org3_MSP.admin')”
#将此标志设置为true。
主持人:
#主持人定义可以使用的对等点的位置
#用于跨组织的闲聊交流。注意,此值仅为
#编码在应用程序部分上下文中的genesis块中
-主持人:主持人
港口:1000
-&org4
#DefaultOrg定义sampleconfig中使用的组织
#fabric.git开发环境的
姓名:org4
#将MSP定义加载为的ID
ID:org4_MSP
MSPDir:crypto-config/peerOrganizations/org4/msp
#策略在配置树的这个级别定义策略集
#对于组织策略,其规范路径通常为
#/频道///
政策:
读者:
类型:签名
规则:“或('org4_MSP.admin'、'org4_MSP.peer'、'org4_MSP.client')”
作者:
类型:签名
规则:“或('org4_MSP.admin'、'org4_MSP.client')”
管理员:
类型:签名
规则:“或('org4_MSP.admin')”
#将此标志设置为true。
主持人:
#主持人定义可以使用的对等点的位置
#用于跨组织的闲聊交流。注意,此值仅为
#编码在应用程序部分上下文中的genesis块中
-主持人:主持人
港口:1000
---
能力:
#渠道功能适用于订购方和对等方,并且必须
#双方都支持。
#将该功能的值设置为true以需要它。
通道:&通道功能
#V1.4.2 for Channel是一个catchall标志,用于已被修改的行为
#确定在v1.4.2上运行的所有订购方和对等方都需要
#级别,但与来自的订购者和对等方不兼容
#以前的版本。
#在启用V1.4.2通道功能之前,请确保
#作战需求
export FABRIC_CFG_PATH = path_to_your_configtx.yaml