What does each definition in configtx.yaml means in Hyperledger fabric v1.0?

允我心安 提交于 2019-12-03 04:01:54

My questions:

What is the role of Consortium?

A consortium consists of organizations. And organization contains peers or orderer. one channel is matched with one consortium but one consortium can be matched many consortiums.

Can a Consortium entity would have peer nodes running for it's own? If yes, how to configure in this yaml file?

No, but if you want to define consortium, you have to get MSPs about organizations.

What is the meaning of <<: line?

It's a YAML grammar.

What is Application in this context?

channel application like Node.js Application. But now My channel works without the section.

Can I define multiple profiles in this yaml file?

sorry, I don't understand what you want to define profile for.

to reply to "Can I define multiple profiles in this yaml file?" the answer is yes. As you can see in this sample file, multiple profiles are here defined.

Profiles are used to defines the configuration of the genesis block and to define the first channel configuration transaction. In the code that you provide TwoOrgsOrdererGenesis should be used as parameter for the configtxgen command

configtxgen -profile SampleSingleMSPSolo -channelID sys-channel -outputBlock ./channel-artifacts/genesis.block

while the second is used to generate the artifacts for the channel transaction

configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID channel-name

In the above file you can check some different configurations... I think it is a good starting point to understand the network configuration which is still something I'm trying to fully figure out.

Ravikumar

Regarding the question "What is the meaning of <<: line?"

yaml files syntax :-

The & marks an alias for the node (in your example &default aliases the development node as "default") and the * references the aliased node with the name "default". The <<: inserts the content of that node.

This type reference are used when - Repeated nodes (objects) are first identified by an anchor (marked with the ampersand - “&”), and are then aliased (referenced with an asterisk - “*”) thereafter.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!