我是Fabric的新手。我试图生成创世块,为此我创建了自定义configtx.yaml和crypto-config.yaml文件。
执行
cryptogen generate --config=./crypto-config.yaml
我得到了预期的结果。 我设置
export FABRIC_CFG_PATH=$PWD
然后我做了
configtxgen -profile ComposerOrdererGenesis -outputBlock ./composer-genesis.block
我得到
加载-> PANI 003找不到配置文件:ComposerOrdererGenesis
func1-> ERRO 004找不到配置文件:ComposerOrdererGenesis。 请确保将FABRIC_CFG_PATH或-configPath设置为路径 其中包含具有指定配置文件的configtx.yaml
我确实通过提供完整路径将-configPath设置为当前目录。 因此,我将fabric-dev-servers中提供的configtx.yaml替换为我的工作目录。
但是错误仍然存在。
我的configtx.yaml
Organizations:
- &OrdererOrg
Name: OrdererOrg
ID: OrdererMSP
MSPDir: crypto-config/ordererOrganizations/example.com/msp
AdminPrincipal: Role.MEMBER
- &Org1
Name: Org1
ID: Org1MSP
MSPDir: crypto-config/peerOrganizations/org1.example.com/msp
AdminPrincipal: Role.MEMBER
AnchorPeers:
- Host: peer0.org1.example.com
Port: 7051
Orderer: &OrdererDefaults
OrdererType: solo
Addresses:
- orderer.example.com:7050
BatchTimeout: 2s
BatchSize:
MaxMessageCount: 10
AbsoluteMaxBytes: 98 MB
PreferredMaxBytes: 512 KB
Kafka:
Brokers:
- 127.0.0.1:9092
Organizations:
Application: &ApplicationDefaults
Organizations:
Profiles:
ComposerOrdererGenesis:
Orderer:
<<: *OrdererDefaults
Organizations:
- *OrdererOrg
Consortiums:
ComposerConsortium:
Organizations:
- *Org1
ComposerChannel:
Consortium: ComposerConsortium
Application:
<<: *ApplicationDefaults
Organizations:
- *Org1
SampleDevModeSoloV1_1:
Capabilities:
<<: *ChannelCapabilities
Orderer:
<<: *OrdererDefaults
Organizations:
- <<: *SampleOrg
AdminPrincipal: Role.MEMBER
Capabilities:
<<: *OrdererCapabilities
Application:
<<: *ApplicationDefaults
Organizations:
- <<: *SampleOrg
AdminPrincipal: Role.MEMBER
Capabilities:
<<: *ApplicationCapabilities
Consortiums:
SampleConsortium:
Organizations:
- <<: *SampleOrg
AdminPrincipal: Role.MEMBER