Hyperledger之Fabric 手动配置(二)
fabric 核心模块
peer 主节点模块。负责存储区块链数据,运行维护链码
order 交易打包,排序模块
cryptogen 组织和证书生成模块
configtxgen 区块和生成交易模块
configxlotar 区块和交易解析模块
创建模板
cryptogen showtemplate >cryptogen-config.yaml
修改模板
生成模板:cryptogen generate --config=cryptogen-config.yaml
(生成文件msp)
配置文件中的组织:
在first-network文件夹下,cp configtx.yaml ~/itcast/
修改里面所需要更改的组织文件
执行命令生成文件
生成创世块文件:configtxgen -profile ItcastOrgsOrdererGenesis -outputBlock ./genesis.block
生成通道文件:configtxgen -profile ItcastOrgsChannel -outputCreateChannelTx channel.tx --channelID itcastchannel
生成锚节点:
configtxgen -profile ItcastOrgsChannel -outputAnchorPeersUpdate GoMSPanchors.tx -channelID itcastchannel -asOrg OrgGoMSP
configtxgen -profile ItcastOrgsChannel -outputAnchorPeersUpdate CppMSPanchors.tx -channelID itcastchannel -asOrg OrgCppMSP
docker-compose文件的编写
客户端角色需要使用的环境变量
编辑peer-base.yaml