From 64cbfdd40fc1c01461f832087d1c03733e0657b2 Mon Sep 17 00:00:00 2001 From: Jannes Klee Date: Sun, 5 Nov 2023 12:30:33 +0100 Subject: [PATCH 1/2] Update create_channel_test_net.md Exchange TwoOrgsApplicationGenesis to ChannelUsingRaft Signed-off-by: Jannes Klee --- .../create_channel/create_channel_test_net.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/source/create_channel/create_channel_test_net.md b/docs/source/create_channel/create_channel_test_net.md index b36e69e6d29..56b11fa545f 100644 --- a/docs/source/create_channel/create_channel_test_net.md +++ b/docs/source/create_channel/create_channel_test_net.md @@ -95,12 +95,19 @@ This `configtx.yaml` file contains the following information that we will use to ServerTLSCert: ../organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt ``` - **Channel policies** Different sections of the file work together to define the policies that will govern how organizations interact with the channel and which organizations need to approve channel updates. For the purposes of this tutorial, we will use the default policies used by Fabric. -- **Channel profiles** Each channel profile references information from other sections of the `configtx.yaml` file to build a channel configuration. The profiles are used to create the genesis block of application channel. Notice that the `configtx.yaml` file in the test network includes a single profile named `TwoOrgsApplicationGenesis` that we will use to generate the create channel transaction. +- **Channel profiles** Each channel profile references information from other sections of the `configtx.yaml` file to build a channel configuration. The profiles are used to create the genesis block of application channel. Notice that the `configtx.yaml` file in the test network includes a single profile named `ChannelUsingRaft` that we will use to generate the create channel transaction. ```yaml - TwoOrgsApplicationGenesis: + ChannelUsingRaft: <<: *ChannelDefaults Orderer: <<: *OrdererDefaults + OrdererType: etcdraft + EtcdRaft: + Consenters: + - Host: orderer.example.com + Port: 7050 + ClientTLSCert: ../organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt + ServerTLSCert: ../organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt Organizations: - *OrdererOrg Capabilities: *OrdererCapabilities @@ -122,10 +129,10 @@ Because we have started the Fabric test network, we are ready to create a new ch Run the following command to create the channel genesis block for `channel1`: ``` -configtxgen -profile TwoOrgsApplicationGenesis -outputBlock ./channel-artifacts/channel1.block -channelID channel1 +configtxgen -profile ChannelUsingRaft -outputBlock ./channel-artifacts/channel1.block -channelID channel1 ``` -- **`-profile`**: The command uses the `-profile` flag to reference the `TwoOrgsApplicationGenesis:` profile from `configtx.yaml` that is used by the test network to create application channels. +- **`-profile`**: The command uses the `-profile` flag to reference the `ChannelUsingRaft:` profile from `configtx.yaml` that is used by the test network to create application channels. - **`-outputBlock`**: The output of this command is the channel genesis block that is written to `-outputBlock ./channel-artifacts/channel1.block`. - **`-channelID`**: The `-channelID` parameter will be the name of the future channel. You can specify any name you want for your channel but for illustration purposes in this tutorial we use `channel1`. Channel names must be all lowercase, fewer than 250 characters long and match the regular expression ``[a-z][a-z0-9.-]*``. From 60f8cf19385de988a6a9cf4cf6ae63c6086b4536 Mon Sep 17 00:00:00 2001 From: Jannes Klee Date: Mon, 6 Nov 2023 18:15:41 +0100 Subject: [PATCH 2/2] DOC / change TwoOrgsApplicationGenesis to ChannelUsingRaft --- .../create_channel/create_channel_config.md | 15 +++++++++++---- docs/source/test_network.md | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/docs/source/create_channel/create_channel_config.md b/docs/source/create_channel/create_channel_config.md index 05ee7ea908e..aefe71ddf5b 100644 --- a/docs/source/create_channel/create_channel_config.md +++ b/docs/source/create_channel/create_channel_config.md @@ -140,13 +140,20 @@ The test network uses the default policies provided by Fabric, which require tha The `configtxgen` tool reads the channel profiles in the **Profiles** section to build a channel configuration. Each profile uses YAML syntax to gather data from other sections of the file. The `configtxgen` tool uses this configuration to create a genesis block for joining orderers to a new channel via the channel participation API. To learn more about YAML syntax, [Wikipedia](https://en.wikipedia.org/wiki/YAML) provides a good place to get started. -The `configtx.yaml` used by the test network contains one channel profile `TwoOrgsApplicationGenesis`. -The `TwoOrgsApplicationGenesis` profile is used by the test network to create application channels: +The `configtx.yaml` used by the test network contains one channel profile `ChannelUsingRaft`. +The `ChannelUsingRaft` profile is used by the test network to create application channels: ```yaml -TwoOrgsApplicationGenesis: +ChannelUsingRaft: <<: *ChannelDefaults Orderer: <<: *OrdererDefaults + OrdererType: etcdraft + EtcdRaft: + Consenters: + - Host: orderer.example.com + Port: 7050 + ClientTLSCert: ../organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt + ServerTLSCert: ../organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt Organizations: - *OrdererOrg Capabilities: *OrdererCapabilities @@ -185,4 +192,4 @@ SampleAppChannelEtcdRaft: Type: Signature Rule: "OR('SampleOrg.member')" ``` -Check out the [Create a channel](create_channel_participation.html) tutorial to learn more about channel creation. \ No newline at end of file +Check out the [Create a channel](create_channel_participation.html) tutorial to learn more about channel creation. diff --git a/docs/source/test_network.md b/docs/source/test_network.md index ba0ea511d2c..b2b1af3f71d 100644 --- a/docs/source/test_network.md +++ b/docs/source/test_network.md @@ -537,7 +537,7 @@ below provide a guided tour of what happens when you issue the command of - If you use the `createChannel` subcommand, `./network.sh` runs the `createChannel.sh` script in the `scripts` folder to create a channel using the supplied channel name. The script uses the `configtxgen` tool to create the channel genesis block - based on the `TwoOrgsApplicationGenesis` channel profile in the `configtx/configtx.yaml` file. After creating the channel, the script uses the peer cli to join ``peer0.org1.example.com`` and ``peer0.org2.example.com`` to the channel, and make both of the peers anchor peers. + based on the `ChannelUsingRaft` channel profile in the `configtx/configtx.yaml` file. After creating the channel, the script uses the peer cli to join ``peer0.org1.example.com`` and ``peer0.org2.example.com`` to the channel, and make both of the peers anchor peers. - If you issue the `deployCC` command, `./network.sh` runs the ``deployCC.sh`` script to install the **asset-transfer (basic)** chaincode on both peers and then define then