Creating the configtx file

Refer to the configtx.yaml file in the repository. The configtx file defines the elements that will be used by the network to create the channel artifacts, including the genesis block (first block). The configtx file is the input to the configtxgen utility, which uses the file to generate the artifacts.

Open the configtx.yaml file. You'll notice it is divided into five sections, as follows:

  • Organizations define the organizations that are defined as part of the network. It is used to define the Membership Service Provider (MSP) that implements access controls on our blockchain ledger. Each organization has the following attributes:
    • Name of the organization.
    • Identity of the organization.
    • Policies that define which identities can read and write, and the admin identity.
    • The local directory (MSPDir), where the inputs for creating the MSP are available.
    • The anchor peers for the organization (that is, the node that broadcasts the block to all other peers of the organization).
  • Orderer is used to defining the ordering mechanism, the block parameters, and the block-creation parameters for our network. Additionally, you can use it to configure a broker network if you are using a Kafka ordering mechanism.
  • Capabilities define the versions of Hyperledger Fabric binaries that are supported by our channel. They allow you to configure individual compatible versions for channels, orderers, and applications that will interact with, or be a part of, our network.
  • Applications define the values that must be encoded into a config transaction or genesis block for application parameters.
  • Channels define the values that must be encoded into a config transaction or genesis block for channel parameters.
  • The Profile section is used to define a set of network profiles that can be used to launch a network. We will be using the TwoOrgsOrdererGenesis network profile to launch our network. This profile creates a two-organization, solo-ordering service network. 

That wraps up the configtx file. Next, let's look at the docker-compose files that define the containers that will host each component of the network.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.223.123