github.com/hechain20/hechain@v0.0.0-20220316014945-b544036ba106/sampleconfig/orderer.yaml (about)

     1  # Copyright hechain. All Rights Reserved.
     2  #
     3  # SPDX-License-Identifier: Apache-2.0
     4  #
     5  
     6  ---
     7  ################################################################################
     8  #
     9  #   Orderer Configuration
    10  #
    11  #   - This controls the type and configuration of the orderer.
    12  #
    13  ################################################################################
    14  General:
    15      # Listen address: The IP on which to bind to listen.
    16      ListenAddress: 127.0.0.1
    17  
    18      # Listen port: The port on which to bind to listen.
    19      ListenPort: 7050
    20  
    21      # TLS: TLS settings for the GRPC server.
    22      TLS:
    23          # Require server-side TLS
    24          Enabled: false
    25          # PrivateKey governs the file location of the private key of the TLS certificate.
    26          PrivateKey: tls/server.key
    27          # Certificate governs the file location of the server TLS certificate.
    28          Certificate: tls/server.crt
    29          # RootCAs contains a list of additional root certificates used for verifying certificates
    30          # of other orderer nodes during outbound connections.
    31          # It is not required to be set, but can be used to augment the set of TLS CA certificates
    32          # available from the MSPs of each channel’s configuration.
    33          RootCAs:
    34            - tls/ca.crt
    35          # Require client certificates / mutual TLS for inbound connections.
    36          ClientAuthRequired: false
    37          # If mutual TLS is enabled, ClientRootCAs contains a list of additional root certificates
    38          # used for verifying certificates of client connections.
    39          # It is not required to be set, but can be used to augment the set of TLS CA certificates
    40          # available from the MSPs of each channel’s configuration.
    41          ClientRootCAs:
    42      # Keepalive settings for the GRPC server.
    43      Keepalive:
    44          # ServerMinInterval is the minimum permitted time between client pings.
    45          # If clients send pings more frequently, the server will
    46          # disconnect them.
    47          ServerMinInterval: 60s
    48          # ServerInterval is the time between pings to clients.
    49          ServerInterval: 7200s
    50          # ServerTimeout is the duration the server waits for a response from
    51          # a client before closing the connection.
    52          ServerTimeout: 20s
    53  
    54      # Since all nodes should be consistent it is recommended to keep
    55      # the default value of 100MB for MaxRecvMsgSize & MaxSendMsgSize
    56      # Max message size in bytes the GRPC server and client can receive
    57      MaxRecvMsgSize: 104857600
    58      # Max message size in bytes the GRPC server and client can send
    59      MaxSendMsgSize: 104857600
    60  
    61      # Cluster settings for ordering service nodes that communicate with other ordering service nodes
    62      # such as Raft based ordering service.
    63      Cluster:
    64          # SendBufferSize is the maximum number of messages in the egress buffer.
    65          # Consensus messages are dropped if the buffer is full, and transaction
    66          # messages are waiting for space to be freed.
    67          SendBufferSize: 10
    68  
    69          # ClientCertificate governs the file location of the client TLS certificate
    70          # used to establish mutual TLS connections with other ordering service nodes.
    71          # If not set, the server General.TLS.Certificate is re-used.
    72          ClientCertificate:
    73          # ClientPrivateKey governs the file location of the private key of the client TLS certificate.
    74          # If not set, the server General.TLS.PrivateKey is re-used.
    75          ClientPrivateKey:
    76  
    77          # The below 4 properties should be either set together, or be unset together.
    78          # If they are set, then the orderer node uses a separate listener for intra-cluster
    79          # communication. If they are unset, then the general orderer listener is used.
    80          # This is useful if you want to use a different TLS server certificates on the
    81          # client-facing and the intra-cluster listeners.
    82  
    83          # ListenPort defines the port on which the cluster listens to connections.
    84          ListenPort:
    85          # ListenAddress defines the IP on which to listen to intra-cluster communication.
    86          ListenAddress:
    87          # ServerCertificate defines the file location of the server TLS certificate used for intra-cluster
    88          # communication.
    89          ServerCertificate:
    90          # ServerPrivateKey defines the file location of the private key of the TLS certificate.
    91          ServerPrivateKey:
    92  
    93      # Bootstrap method: The method by which to obtain the bootstrap block
    94      # system channel is specified. The option can be one of:
    95      #   "file" - path to a file containing the genesis block or config block of system channel
    96      #   "none" - allows an orderer to start without a system channel configuration
    97      BootstrapMethod: file
    98  
    99      # Bootstrap file: The file containing the bootstrap block to use when
   100      # initializing the orderer system channel and BootstrapMethod is set to
   101      # "file".  The bootstrap file can be the genesis block, and it can also be
   102      # a config block for late bootstrap of some consensus methods like Raft.
   103      # Generate a genesis block by updating $FABRIC_CFG_PATH/configtx.yaml and
   104      # using configtxgen command with "-outputBlock" option.
   105      # Defaults to file "genesisblock" (in $FABRIC_CFG_PATH directory) if not specified.
   106      BootstrapFile:
   107  
   108      # LocalMSPDir is where to find the private crypto material needed by the
   109      # orderer. It is set relative here as a default for dev environments but
   110      # should be changed to the real location in production.
   111      LocalMSPDir: msp
   112  
   113      # LocalMSPID is the identity to register the local MSP material with the MSP
   114      # manager. IMPORTANT: The local MSP ID of an orderer needs to match the MSP
   115      # ID of one of the organizations defined in the orderer system channel's
   116      # /Channel/Orderer configuration. The sample organization defined in the
   117      # sample configuration provided has an MSP ID of "SampleOrg".
   118      LocalMSPID: SampleOrg
   119  
   120      # Enable an HTTP service for Go "pprof" profiling as documented at:
   121      # https://golang.org/pkg/net/http/pprof
   122      Profile:
   123          Enabled: false
   124          Address: 0.0.0.0:6060
   125  
   126      # BCCSP configures the blockchain crypto service providers.
   127      BCCSP:
   128          # Default specifies the preferred blockchain crypto service provider
   129          # to use. If the preferred provider is not available, the software
   130          # based provider ("SW") will be used.
   131          # Valid providers are:
   132          #  - SW: a software based crypto provider
   133          #  - PKCS11: a CA hardware security module crypto provider.
   134          Default: SW
   135  
   136          # SW configures the software based blockchain crypto provider.
   137          SW:
   138              # TODO: The default Hash and Security level needs refactoring to be
   139              # fully configurable. Changing these defaults requires coordination
   140              # SHA2 is hardcoded in several places, not only BCCSP
   141              Hash: SHA2
   142              Security: 256
   143              # Location of key store. If this is unset, a location will be
   144              # chosen using: 'LocalMSPDir'/keystore
   145              FileKeyStore:
   146                  KeyStore:
   147  
   148          # Settings for the PKCS#11 crypto provider (i.e. when DEFAULT: PKCS11)
   149          PKCS11:
   150              # Location of the PKCS11 module library
   151              Library:
   152              # Token Label
   153              Label:
   154              # User PIN
   155              Pin:
   156              Hash:
   157              Security:
   158              FileKeyStore:
   159                  KeyStore:
   160  
   161      # Authentication contains configuration parameters related to authenticating
   162      # client messages
   163      Authentication:
   164          # the acceptable difference between the current server time and the
   165          # client's time as specified in a client request message
   166          TimeWindow: 15m
   167  
   168  
   169  ################################################################################
   170  #
   171  #   SECTION: File Ledger
   172  #
   173  #   - This section applies to the configuration of the file ledger.
   174  #
   175  ################################################################################
   176  FileLedger:
   177  
   178      # Location: The directory to store the blocks in.
   179      Location: /var/hyperledger/production/orderer
   180  
   181  ################################################################################
   182  #
   183  #   SECTION: Kafka
   184  #
   185  #   - This section applies to the configuration of the Kafka-based orderer, and
   186  #     its interaction with the Kafka cluster.
   187  #
   188  ################################################################################
   189  Kafka:
   190  
   191      # Retry: What do if a connection to the Kafka cluster cannot be established,
   192      # or if a metadata request to the Kafka cluster needs to be repeated.
   193      Retry:
   194          # When a new channel is created, or when an existing channel is reloaded
   195          # (in case of a just-restarted orderer), the orderer interacts with the
   196          # Kafka cluster in the following ways:
   197          # 1. It creates a Kafka producer (writer) for the Kafka partition that
   198          # corresponds to the channel.
   199          # 2. It uses that producer to post a no-op CONNECT message to that
   200          # partition
   201          # 3. It creates a Kafka consumer (reader) for that partition.
   202          # If any of these steps fail, they will be re-attempted every
   203          # <ShortInterval> for a total of <ShortTotal>, and then every
   204          # <LongInterval> for a total of <LongTotal> until they succeed.
   205          # Note that the orderer will be unable to write to or read from a
   206          # channel until all of the steps above have been completed successfully.
   207          ShortInterval: 5s
   208          ShortTotal: 10m
   209          LongInterval: 5m
   210          LongTotal: 12h
   211          # Affects the socket timeouts when waiting for an initial connection, a
   212          # response, or a transmission. See Config.Net for more info:
   213          # https://godoc.org/github.com/Shopify/sarama#Config
   214          NetworkTimeouts:
   215              DialTimeout: 10s
   216              ReadTimeout: 10s
   217              WriteTimeout: 10s
   218          # Affects the metadata requests when the Kafka cluster is in the middle
   219          # of a leader election.See Config.Metadata for more info:
   220          # https://godoc.org/github.com/Shopify/sarama#Config
   221          Metadata:
   222              RetryBackoff: 250ms
   223              RetryMax: 3
   224          # What to do if posting a message to the Kafka cluster fails. See
   225          # Config.Producer for more info:
   226          # https://godoc.org/github.com/Shopify/sarama#Config
   227          Producer:
   228              RetryBackoff: 100ms
   229              RetryMax: 3
   230          # What to do if reading from the Kafka cluster fails. See
   231          # Config.Consumer for more info:
   232          # https://godoc.org/github.com/Shopify/sarama#Config
   233          Consumer:
   234              RetryBackoff: 2s
   235      # Settings to use when creating Kafka topics.  Only applies when
   236      # Kafka.Version is v0.10.1.0 or higher
   237      Topic:
   238          # The number of Kafka brokers across which to replicate the topic
   239          ReplicationFactor: 3
   240      # Verbose: Enable logging for interactions with the Kafka cluster.
   241      Verbose: false
   242  
   243      # TLS: TLS settings for the orderer's connection to the Kafka cluster.
   244      TLS:
   245  
   246        # Enabled: Use TLS when connecting to the Kafka cluster.
   247        Enabled: false
   248  
   249        # PrivateKey: PEM-encoded private key the orderer will use for
   250        # authentication.
   251        PrivateKey:
   252          # As an alternative to specifying the PrivateKey here, uncomment the
   253          # following "File" key and specify the file name from which to load the
   254          # value of PrivateKey.
   255          #File: path/to/PrivateKey
   256  
   257        # Certificate: PEM-encoded signed public key certificate the orderer will
   258        # use for authentication.
   259        Certificate:
   260          # As an alternative to specifying the Certificate here, uncomment the
   261          # following "File" key and specify the file name from which to load the
   262          # value of Certificate.
   263          #File: path/to/Certificate
   264  
   265        # RootCAs: PEM-encoded trusted root certificates used to validate
   266        # certificates from the Kafka cluster.
   267        RootCAs:
   268          # As an alternative to specifying the RootCAs here, uncomment the
   269          # following "File" key and specify the file name from which to load the
   270          # value of RootCAs.
   271          #File: path/to/RootCAs
   272  
   273      # SASLPlain: Settings for using SASL/PLAIN authentication with Kafka brokers
   274      SASLPlain:
   275        # Enabled: Use SASL/PLAIN to authenticate with Kafka brokers
   276        Enabled: false
   277        # User: Required when Enabled is set to true
   278        User:
   279        # Password: Required when Enabled is set to true
   280        Password:
   281  
   282      # Kafka protocol version used to communicate with the Kafka cluster brokers
   283      # (defaults to 0.10.2.0 if not specified)
   284      Version:
   285  
   286  ################################################################################
   287  #
   288  #   Debug Configuration
   289  #
   290  #   - This controls the debugging options for the orderer
   291  #
   292  ################################################################################
   293  Debug:
   294  
   295      # BroadcastTraceDir when set will cause each request to the Broadcast service
   296      # for this orderer to be written to a file in this directory
   297      BroadcastTraceDir:
   298  
   299      # DeliverTraceDir when set will cause each request to the Deliver service
   300      # for this orderer to be written to a file in this directory
   301      DeliverTraceDir:
   302  
   303  ################################################################################
   304  #
   305  #   Operations Configuration
   306  #
   307  #   - This configures the operations server endpoint for the orderer
   308  #
   309  ################################################################################
   310  Operations:
   311      # host and port for the operations server
   312      ListenAddress: 127.0.0.1:8443
   313  
   314      # TLS configuration for the operations endpoint
   315      TLS:
   316          # TLS enabled
   317          Enabled: false
   318  
   319          # Certificate is the location of the PEM encoded TLS certificate
   320          Certificate:
   321  
   322          # PrivateKey points to the location of the PEM-encoded key
   323          PrivateKey:
   324  
   325          # Most operations service endpoints require client authentication when TLS
   326          # is enabled. ClientAuthRequired requires client certificate authentication
   327          # at the TLS layer to access all resources.
   328          ClientAuthRequired: false
   329  
   330          # Paths to PEM encoded ca certificates to trust for client authentication
   331          ClientRootCAs: []
   332  
   333  ################################################################################
   334  #
   335  #   Metrics Configuration
   336  #
   337  #   - This configures metrics collection for the orderer
   338  #
   339  ################################################################################
   340  Metrics:
   341      # The metrics provider is one of statsd, prometheus, or disabled
   342      Provider: disabled
   343  
   344      # The statsd configuration
   345      Statsd:
   346        # network type: tcp or udp
   347        Network: udp
   348  
   349        # the statsd server address
   350        Address: 127.0.0.1:8125
   351  
   352        # The interval at which locally cached counters and gauges are pushed
   353        # to statsd; timings are pushed immediately
   354        WriteInterval: 30s
   355  
   356        # The prefix is prepended to all emitted statsd metrics
   357        Prefix:
   358  
   359  ################################################################################
   360  #
   361  #   Admin Configuration
   362  #
   363  #   - This configures the admin server endpoint for the orderer
   364  #
   365  ################################################################################
   366  Admin:
   367      # host and port for the admin server
   368      ListenAddress: 127.0.0.1:9443
   369  
   370      # TLS configuration for the admin endpoint
   371      TLS:
   372          # TLS enabled
   373          Enabled: false
   374  
   375          # Certificate is the location of the PEM encoded TLS certificate
   376          Certificate:
   377  
   378          # PrivateKey points to the location of the PEM-encoded key
   379          PrivateKey:
   380  
   381          # Most admin service endpoints require client authentication when TLS
   382          # is enabled. ClientAuthRequired requires client certificate authentication
   383          # at the TLS layer to access all resources.
   384          #
   385          # NOTE: When TLS is enabled, the admin endpoint requires mutual TLS. The
   386          # orderer will panic on startup if this value is set to false.
   387          ClientAuthRequired: true
   388  
   389          # Paths to PEM encoded ca certificates to trust for client authentication
   390          ClientRootCAs: []
   391  
   392  ################################################################################
   393  #
   394  #   Channel participation API Configuration
   395  #
   396  #   - This provides the channel participation API configuration for the orderer.
   397  #   - Channel participation uses the ListenAddress and TLS settings of the Admin
   398  #     service.
   399  #
   400  ################################################################################
   401  ChannelParticipation:
   402      # Channel participation API is enabled.
   403      Enabled: false
   404  
   405      # The maximum size of the request body when joining a channel.
   406      MaxRequestBodySize: 1 MB
   407  
   408  
   409  ################################################################################
   410  #
   411  #   Consensus Configuration
   412  #
   413  #   - This section contains config options for a consensus plugin. It is opaque
   414  #     to orderer, and completely up to consensus implementation to make use of.
   415  #
   416  ################################################################################
   417  Consensus:
   418      # The allowed key-value pairs here depend on consensus plugin. For etcd/raft,
   419      # we use following options:
   420  
   421      # WALDir specifies the location at which Write Ahead Logs for etcd/raft are
   422      # stored. Each channel will have its own subdir named after channel ID.
   423      WALDir: /var/hyperledger/production/orderer/etcdraft/wal
   424  
   425      # SnapDir specifies the location at which snapshots for etcd/raft are
   426      # stored. Each channel will have its own subdir named after channel ID.
   427      SnapDir: /var/hyperledger/production/orderer/etcdraft/snapshot