From e2f4f20bd68ddfdb1d2d89bb079e9cfe8810fcd9 Mon Sep 17 00:00:00 2001 From: Matthew Sykes Date: Thu, 17 May 2018 08:41:05 -0400 Subject: [PATCH] [FAB-10176] Fix invalid configtx.yaml documents Change-Id: Ibf52f9380ed3b724c594b53550321a12475e9860 Signed-off-by: Matthew Sykes --- .../artifacts/channel/configtx.yaml | 126 ++++++++-------- basic-network/configtx.yaml | 123 ++++++++-------- first-network/configtx.yaml | 138 +++++++++--------- 3 files changed, 194 insertions(+), 193 deletions(-) diff --git a/balance-transfer/artifacts/channel/configtx.yaml b/balance-transfer/artifacts/channel/configtx.yaml index 4cf7ffe98f..17822296f4 100644 --- a/balance-transfer/artifacts/channel/configtx.yaml +++ b/balance-transfer/artifacts/channel/configtx.yaml @@ -6,31 +6,48 @@ --- ################################################################################ # -# Profile +# SECTION: Orderer # -# - Different configuration profiles may be encoded here to be specified -# as parameters to the configtxgen tool +# - This section defines the values to encode into a config transaction or +# genesis block for orderer related parameters # ################################################################################ -Profiles: +Orderer: &OrdererDefaults - TwoOrgsOrdererGenesis: - Orderer: - <<: *OrdererDefaults - Organizations: - - *OrdererOrg - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - TwoOrgsChannel: - Consortium: SampleConsortium - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 + # Orderer Type: The orderer implementation to start + # Available types are "solo" and "kafka" + OrdererType: solo + + Addresses: + - orderer.example.com:7050 + + # Batch Timeout: The amount of time to wait before creating a batch + BatchTimeout: 2s + + # Batch Size: Controls the number of messages batched into a block + BatchSize: + + # Max Message Count: The maximum number of messages to permit in a batch + MaxMessageCount: 10 + + # Absolute Max Bytes: The absolute maximum number of bytes allowed for + # the serialized messages in a batch. + AbsoluteMaxBytes: 98 MB + + # Preferred Max Bytes: The preferred maximum number of bytes allowed for + # the serialized messages in a batch. A message larger than the preferred + # max bytes will result in a batch larger than preferred max bytes. + PreferredMaxBytes: 512 KB + + Kafka: + # Brokers: A list of Kafka brokers to which the orderer connects + # NOTE: Use IP:port notation + Brokers: + - 127.0.0.1:9092 + + # Organizations is the list of orgs which are defined as participants on + # the orderer side of the network + Organizations: ################################################################################ # @@ -91,59 +108,42 @@ Organizations: ################################################################################ # -# SECTION: Orderer +# SECTION: Application # # - This section defines the values to encode into a config transaction or -# genesis block for orderer related parameters +# genesis block for application related parameters # ################################################################################ -Orderer: &OrdererDefaults - - # Orderer Type: The orderer implementation to start - # Available types are "solo" and "kafka" - OrdererType: solo - - Addresses: - - orderer.example.com:7050 - - # Batch Timeout: The amount of time to wait before creating a batch - BatchTimeout: 2s - - # Batch Size: Controls the number of messages batched into a block - BatchSize: - - # Max Message Count: The maximum number of messages to permit in a batch - MaxMessageCount: 10 - - # Absolute Max Bytes: The absolute maximum number of bytes allowed for - # the serialized messages in a batch. - AbsoluteMaxBytes: 98 MB - - # Preferred Max Bytes: The preferred maximum number of bytes allowed for - # the serialized messages in a batch. A message larger than the preferred - # max bytes will result in a batch larger than preferred max bytes. - PreferredMaxBytes: 512 KB - - Kafka: - # Brokers: A list of Kafka brokers to which the orderer connects - # NOTE: Use IP:port notation - Brokers: - - 127.0.0.1:9092 +Application: &ApplicationDefaults # Organizations is the list of orgs which are defined as participants on - # the orderer side of the network + # the application side of the network Organizations: ################################################################################ # -# SECTION: Application +# Profile # -# - This section defines the values to encode into a config transaction or -# genesis block for application related parameters +# - Different configuration profiles may be encoded here to be specified +# as parameters to the configtxgen tool # ################################################################################ -Application: &ApplicationDefaults +Profiles: - # Organizations is the list of orgs which are defined as participants on - # the application side of the network - Organizations: + TwoOrgsOrdererGenesis: + Orderer: + <<: *OrdererDefaults + Organizations: + - *OrdererOrg + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + TwoOrgsChannel: + Consortium: SampleConsortium + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 diff --git a/basic-network/configtx.yaml b/basic-network/configtx.yaml index f157db2040..a4e11ea76f 100644 --- a/basic-network/configtx.yaml +++ b/basic-network/configtx.yaml @@ -6,29 +6,48 @@ --- ################################################################################ # -# Profile +# SECTION: Orderer # -# - Different configuration profiles may be encoded here to be specified -# as parameters to the configtxgen tool +# - This section defines the values to encode into a config transaction or +# genesis block for orderer related parameters # ################################################################################ -Profiles: +Orderer: &OrdererDefaults - OneOrgOrdererGenesis: - Orderer: - <<: *OrdererDefaults - Organizations: - - *OrdererOrg - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - OneOrgChannel: - Consortium: SampleConsortium - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 + # Orderer Type: The orderer implementation to start + # Available types are "solo" and "kafka" + OrdererType: solo + + Addresses: + - orderer.example.com:7050 + + # Batch Timeout: The amount of time to wait before creating a batch + BatchTimeout: 2s + + # Batch Size: Controls the number of messages batched into a block + BatchSize: + + # Max Message Count: The maximum number of messages to permit in a batch + MaxMessageCount: 10 + + # Absolute Max Bytes: The absolute maximum number of bytes allowed for + # the serialized messages in a batch. + AbsoluteMaxBytes: 99 MB + + # Preferred Max Bytes: The preferred maximum number of bytes allowed for + # the serialized messages in a batch. A message larger than the preferred + # max bytes will result in a batch larger than preferred max bytes. + PreferredMaxBytes: 512 KB + + Kafka: + # Brokers: A list of Kafka brokers to which the orderer connects + # NOTE: Use IP:port notation + Brokers: + - 127.0.0.1:9092 + + # Organizations is the list of orgs which are defined as participants on + # the orderer side of the network + Organizations: ################################################################################ # @@ -72,59 +91,41 @@ Organizations: ################################################################################ # -# SECTION: Orderer +# SECTION: Application # # - This section defines the values to encode into a config transaction or -# genesis block for orderer related parameters +# genesis block for application related parameters # ################################################################################ -Orderer: &OrdererDefaults - - # Orderer Type: The orderer implementation to start - # Available types are "solo" and "kafka" - OrdererType: solo - - Addresses: - - orderer.example.com:7050 - - # Batch Timeout: The amount of time to wait before creating a batch - BatchTimeout: 2s - - # Batch Size: Controls the number of messages batched into a block - BatchSize: - - # Max Message Count: The maximum number of messages to permit in a batch - MaxMessageCount: 10 - - # Absolute Max Bytes: The absolute maximum number of bytes allowed for - # the serialized messages in a batch. - AbsoluteMaxBytes: 99 MB - - # Preferred Max Bytes: The preferred maximum number of bytes allowed for - # the serialized messages in a batch. A message larger than the preferred - # max bytes will result in a batch larger than preferred max bytes. - PreferredMaxBytes: 512 KB - - Kafka: - # Brokers: A list of Kafka brokers to which the orderer connects - # NOTE: Use IP:port notation - Brokers: - - 127.0.0.1:9092 +Application: &ApplicationDefaults # Organizations is the list of orgs which are defined as participants on - # the orderer side of the network + # the application side of the network Organizations: ################################################################################ # -# SECTION: Application +# Profile # -# - This section defines the values to encode into a config transaction or -# genesis block for application related parameters +# - Different configuration profiles may be encoded here to be specified +# as parameters to the configtxgen tool # ################################################################################ -Application: &ApplicationDefaults +Profiles: + + OneOrgOrdererGenesis: + Orderer: + <<: *OrdererDefaults + Organizations: + - *OrdererOrg + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + OneOrgChannel: + Consortium: SampleConsortium + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 - # Organizations is the list of orgs which are defined as participants on - # the application side of the network - Organizations: diff --git a/first-network/configtx.yaml b/first-network/configtx.yaml index 31c545c371..daa59ec207 100644 --- a/first-network/configtx.yaml +++ b/first-network/configtx.yaml @@ -6,37 +6,52 @@ --- ################################################################################ # -# Profile +# SECTION: Capabilities # -# - Different configuration profiles may be encoded here to be specified -# as parameters to the configtxgen tool +# - This section defines the capabilities of fabric network. This is a new +# concept as of v1.1.0 and should not be utilized in mixed networks with +# v1.0.x peers and orderers. Capabilities define features which must be +# present in a fabric binary for that binary to safely participate in the +# fabric network. For instance, if a new MSP type is added, newer binaries +# might recognize and validate the signatures from this type, while older +# binaries without this support would be unable to validate those +# transactions. This could lead to different versions of the fabric binaries +# having different world states. Instead, defining a capability for a channel +# informs those binaries without this capability that they must cease +# processing transactions until they have been upgraded. For v1.0.x if any +# capabilities are defined (including a map with all capabilities turned off) +# then the v1.0.x peer will deliberately crash. # ################################################################################ -Profiles: +Capabilities: + # Channel capabilities apply to both the orderers and the peers and must be + # supported by both. Set the value of the capability to true to require it. + Global: &ChannelCapabilities + # V1.1 for Global is a catchall flag for behavior which has been + # determined to be desired for all orderers and peers running v1.0.x, + # but the modification of which would cause incompatibilities. Users + # should leave this flag set to true. + V1_1: true - TwoOrgsOrdererGenesis: - Capabilities: - <<: *ChannelCapabilities - Orderer: - <<: *OrdererDefaults - Organizations: - - *OrdererOrg - Capabilities: - <<: *OrdererCapabilities - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - TwoOrgsChannel: - Consortium: SampleConsortium - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 - Capabilities: - <<: *ApplicationCapabilities + # Orderer capabilities apply only to the orderers, and may be safely + # manipulated without concern for upgrading peers. Set the value of the + # capability to true to require it. + Orderer: &OrdererCapabilities + # V1.1 for Order is a catchall flag for behavior which has been + # determined to be desired for all orderers running v1.0.x, but the + # modification of which would cause incompatibilities. Users should + # leave this flag set to true. + V1_1: true + + # Application capabilities apply only to the peer network, and may be safely + # manipulated without concern for upgrading orderers. Set the value of the + # capability to true to require it. + Application: &ApplicationCapabilities + # V1.1 for Application is a catchall flag for behavior which has been + # determined to be desired for all peers running v1.0.x, but the + # modification of which would cause incompatibilities. Users should + # leave this flag set to true. + V1_1: true ################################################################################ # @@ -156,49 +171,34 @@ Application: &ApplicationDefaults ################################################################################ # -# SECTION: Capabilities +# Profile # -# - This section defines the capabilities of fabric network. This is a new -# concept as of v1.1.0 and should not be utilized in mixed networks with -# v1.0.x peers and orderers. Capabilities define features which must be -# present in a fabric binary for that binary to safely participate in the -# fabric network. For instance, if a new MSP type is added, newer binaries -# might recognize and validate the signatures from this type, while older -# binaries without this support would be unable to validate those -# transactions. This could lead to different versions of the fabric binaries -# having different world states. Instead, defining a capability for a channel -# informs those binaries without this capability that they must cease -# processing transactions until they have been upgraded. For v1.0.x if any -# capabilities are defined (including a map with all capabilities turned off) -# then the v1.0.x peer will deliberately crash. +# - Different configuration profiles may be encoded here to be specified +# as parameters to the configtxgen tool # ################################################################################ -Capabilities: - # Channel capabilities apply to both the orderers and the peers and must be - # supported by both. Set the value of the capability to true to require it. - Global: &ChannelCapabilities - # V1.1 for Global is a catchall flag for behavior which has been - # determined to be desired for all orderers and peers running v1.0.x, - # but the modification of which would cause incompatibilities. Users - # should leave this flag set to true. - V1_1: true - - # Orderer capabilities apply only to the orderers, and may be safely - # manipulated without concern for upgrading peers. Set the value of the - # capability to true to require it. - Orderer: &OrdererCapabilities - # V1.1 for Order is a catchall flag for behavior which has been - # determined to be desired for all orderers running v1.0.x, but the - # modification of which would cause incompatibilities. Users should - # leave this flag set to true. - V1_1: true +Profiles: - # Application capabilities apply only to the peer network, and may be safely - # manipulated without concern for upgrading orderers. Set the value of the - # capability to true to require it. - Application: &ApplicationCapabilities - # V1.1 for Application is a catchall flag for behavior which has been - # determined to be desired for all peers running v1.0.x, but the - # modification of which would cause incompatibilities. Users should - # leave this flag set to true. - V1_1: true + TwoOrgsOrdererGenesis: + Capabilities: + <<: *ChannelCapabilities + Orderer: + <<: *OrdererDefaults + Organizations: + - *OrdererOrg + Capabilities: + <<: *OrdererCapabilities + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + TwoOrgsChannel: + Consortium: SampleConsortium + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 + Capabilities: + <<: *ApplicationCapabilities