github.com/IBM-Blockchain/fabric-operator@v1.0.4/sample-network/config/core.yaml (about)

     1  #
     2  # Copyright contributors to the Hyperledger Fabric Operator project
     3  #
     4  # SPDX-License-Identifier: Apache-2.0
     5  #
     6  # Licensed under the Apache License, Version 2.0 (the "License");
     7  # you may not use this file except in compliance with the License.
     8  # You may obtain a copy of the License at:
     9  #
    10  # 	  http://www.apache.org/licenses/LICENSE-2.0
    11  #
    12  # Unless required by applicable law or agreed to in writing, software
    13  # distributed under the License is distributed on an "AS IS" BASIS,
    14  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    15  # See the License for the specific language governing permissions and
    16  # limitations under the License.
    17  #
    18  
    19  ###############################################################################
    20  #
    21  #    Peer section
    22  #
    23  ###############################################################################
    24  peer:
    25  
    26      # The peer id provides a name for this peer instance and is used when
    27      # naming docker resources.
    28      id: jdoe
    29  
    30      # The networkId allows for logical separation of networks and is used when
    31      # naming docker resources.
    32      networkId: dev
    33  
    34      # The Address at local network interface this Peer will listen on.
    35      # By default, it will listen on all network interfaces
    36      listenAddress: 0.0.0.0:7051
    37  
    38      # The endpoint this peer uses to listen for inbound chaincode connections.
    39      # If this is commented-out, the listen address is selected to be
    40      # the peer's address (see below) with port 7052
    41      # chaincodeListenAddress: 0.0.0.0:7052
    42  
    43      # The endpoint the chaincode for this peer uses to connect to the peer.
    44      # If this is not specified, the chaincodeListenAddress address is selected.
    45      # And if chaincodeListenAddress is not specified, address is selected from
    46      # peer address (see below). If specified peer address is invalid then it
    47      # will fallback to the auto detected IP (local IP) regardless of the peer
    48      # addressAutoDetect value.
    49      # chaincodeAddress: 0.0.0.0:7052
    50  
    51      # When used as peer config, this represents the endpoint to other peers
    52      # in the same organization. For peers in other organization, see
    53      # gossip.externalEndpoint for more info.
    54      # When used as CLI config, this means the peer's endpoint to interact with
    55      address: 0.0.0.0:7051
    56  
    57      # Whether the Peer should programmatically determine its address
    58      # This case is useful for docker containers.
    59      # When set to true, will override peer address.
    60      addressAutoDetect: false
    61  
    62      # Keepalive settings for peer server and clients
    63      keepalive:
    64          # Interval is the duration after which if the server does not see
    65          # any activity from the client it pings the client to see if it's alive
    66          interval: 7200s
    67          # Timeout is the duration the server waits for a response
    68          # from the client after sending a ping before closing the connection
    69          timeout: 20s
    70          # MinInterval is the minimum permitted time between client pings.
    71          # If clients send pings more frequently, the peer server will
    72          # disconnect them
    73          minInterval: 60s
    74          # Client keepalive settings for communicating with other peer nodes
    75          client:
    76              # Interval is the time between pings to peer nodes.  This must
    77              # greater than or equal to the minInterval specified by peer
    78              # nodes
    79              interval: 60s
    80              # Timeout is the duration the client waits for a response from
    81              # peer nodes before closing the connection
    82              timeout: 20s
    83          # DeliveryClient keepalive settings for communication with ordering
    84          # nodes.
    85          deliveryClient:
    86              # Interval is the time between pings to ordering nodes.  This must
    87              # greater than or equal to the minInterval specified by ordering
    88              # nodes.
    89              interval: 60s
    90              # Timeout is the duration the client waits for a response from
    91              # ordering nodes before closing the connection
    92              timeout: 20s
    93  
    94  
    95      # Gossip related configuration
    96      gossip:
    97          # Bootstrap set to initialize gossip with.
    98          # This is a list of other peers that this peer reaches out to at startup.
    99          # Important: The endpoints here have to be endpoints of peers in the same
   100          # organization, because the peer would refuse connecting to these endpoints
   101          # unless they are in the same organization as the peer.
   102          bootstrap: 127.0.0.1:7051
   103  
   104          # NOTE: orgLeader and useLeaderElection parameters are mutual exclusive.
   105          # Setting both to true would result in the termination of the peer
   106          # since this is undefined state. If the peers are configured with
   107          # useLeaderElection=false, make sure there is at least 1 peer in the
   108          # organization that its orgLeader is set to true.
   109  
   110          # Defines whenever peer will initialize dynamic algorithm for
   111          # "leader" selection, where leader is the peer to establish
   112          # connection with ordering service and use delivery protocol
   113          # to pull ledger blocks from ordering service.
   114          useLeaderElection: false
   115          # Statically defines peer to be an organization "leader",
   116          # where this means that current peer will maintain connection
   117          # with ordering service and disseminate block across peers in
   118          # its own organization. Multiple peers or all peers in an organization
   119          # may be configured as org leaders, so that they all pull
   120          # blocks directly from ordering service.
   121          orgLeader: true
   122  
   123          # Interval for membershipTracker polling
   124          membershipTrackerInterval: 5s
   125  
   126          # Overrides the endpoint that the peer publishes to peers
   127          # in its organization. For peers in foreign organizations
   128          # see 'externalEndpoint'
   129          endpoint:
   130          # Maximum count of blocks stored in memory
   131          maxBlockCountToStore: 10
   132          # Max time between consecutive message pushes(unit: millisecond)
   133          maxPropagationBurstLatency: 10ms
   134          # Max number of messages stored until a push is triggered to remote peers
   135          maxPropagationBurstSize: 10
   136          # Number of times a message is pushed to remote peers
   137          propagateIterations: 1
   138          # Number of peers selected to push messages to
   139          propagatePeerNum: 3
   140          # Determines frequency of pull phases(unit: second)
   141          # Must be greater than digestWaitTime + responseWaitTime
   142          pullInterval: 4s
   143          # Number of peers to pull from
   144          pullPeerNum: 3
   145          # Determines frequency of pulling state info messages from peers(unit: second)
   146          requestStateInfoInterval: 4s
   147          # Determines frequency of pushing state info messages to peers(unit: second)
   148          publishStateInfoInterval: 4s
   149          # Maximum time a stateInfo message is kept until expired
   150          stateInfoRetentionInterval:
   151          # Time from startup certificates are included in Alive messages(unit: second)
   152          publishCertPeriod: 10s
   153          # Should we skip verifying block messages or not (currently not in use)
   154          skipBlockVerification: false
   155          # Dial timeout(unit: second)
   156          dialTimeout: 3s
   157          # Connection timeout(unit: second)
   158          connTimeout: 2s
   159          # Buffer size of received messages
   160          recvBuffSize: 20
   161          # Buffer size of sending messages
   162          sendBuffSize: 200
   163          # Time to wait before pull engine processes incoming digests (unit: second)
   164          # Should be slightly smaller than requestWaitTime
   165          digestWaitTime: 1s
   166          # Time to wait before pull engine removes incoming nonce (unit: milliseconds)
   167          # Should be slightly bigger than digestWaitTime
   168          requestWaitTime: 1500ms
   169          # Time to wait before pull engine ends pull (unit: second)
   170          responseWaitTime: 2s
   171          # Alive check interval(unit: second)
   172          aliveTimeInterval: 5s
   173          # Alive expiration timeout(unit: second)
   174          aliveExpirationTimeout: 25s
   175          # Reconnect interval(unit: second)
   176          reconnectInterval: 25s
   177          # Max number of attempts to connect to a peer
   178          maxConnectionAttempts: 120
   179          # Message expiration factor for alive messages
   180          msgExpirationFactor: 20
   181          # This is an endpoint that is published to peers outside of the organization.
   182          # If this isn't set, the peer will not be known to other organizations.
   183          externalEndpoint:
   184          # Leader election service configuration
   185          election:
   186              # Longest time peer waits for stable membership during leader election startup (unit: second)
   187              startupGracePeriod: 15s
   188              # Interval gossip membership samples to check its stability (unit: second)
   189              membershipSampleInterval: 1s
   190              # Time passes since last declaration message before peer decides to perform leader election (unit: second)
   191              leaderAliveThreshold: 10s
   192              # Time between peer sends propose message and declares itself as a leader (sends declaration message) (unit: second)
   193              leaderElectionDuration: 5s
   194  
   195          pvtData:
   196              # pullRetryThreshold determines the maximum duration of time private data corresponding for a given block
   197              # would be attempted to be pulled from peers until the block would be committed without the private data
   198              pullRetryThreshold: 60s
   199              # As private data enters the transient store, it is associated with the peer's ledger's height at that time.
   200              # transientstoreMaxBlockRetention defines the maximum difference between the current ledger's height upon commit,
   201              # and the private data residing inside the transient store that is guaranteed not to be purged.
   202              # Private data is purged from the transient store when blocks with sequences that are multiples
   203              # of transientstoreMaxBlockRetention are committed.
   204              transientstoreMaxBlockRetention: 1000
   205              # pushAckTimeout is the maximum time to wait for an acknowledgement from each peer
   206              # at private data push at endorsement time.
   207              pushAckTimeout: 3s
   208              # Block to live pulling margin, used as a buffer
   209              # to prevent peer from trying to pull private data
   210              # from peers that is soon to be purged in next N blocks.
   211              # This helps a newly joined peer catch up to current
   212              # blockchain height quicker.
   213              btlPullMargin: 10
   214              # the process of reconciliation is done in an endless loop, while in each iteration reconciler tries to
   215              # pull from the other peers the most recent missing blocks with a maximum batch size limitation.
   216              # reconcileBatchSize determines the maximum batch size of missing private data that will be reconciled in a
   217              # single iteration.
   218              reconcileBatchSize: 10
   219              # reconcileSleepInterval determines the time reconciler sleeps from end of an iteration until the beginning
   220              # of the next reconciliation iteration.
   221              reconcileSleepInterval: 1m
   222              # reconciliationEnabled is a flag that indicates whether private data reconciliation is enable or not.
   223              reconciliationEnabled: true
   224              # skipPullingInvalidTransactionsDuringCommit is a flag that indicates whether pulling of invalid
   225              # transaction's private data from other peers need to be skipped during the commit time and pulled
   226              # only through reconciler.
   227              skipPullingInvalidTransactionsDuringCommit: false
   228              # implicitCollectionDisseminationPolicy specifies the dissemination  policy for the peer's own implicit collection.
   229              # When a peer endorses a proposal that writes to its own implicit collection, below values override the default values
   230              # for disseminating private data.
   231              # Note that it is applicable to all channels the peer has joined. The implication is that requiredPeerCount has to
   232              # be smaller than the number of peers in a channel that has the lowest numbers of peers from the organization.
   233              implicitCollectionDisseminationPolicy:
   234                 # requiredPeerCount defines the minimum number of eligible peers to which the peer must successfully
   235                 # disseminate private data for its own implicit collection during endorsement. Default value is 0.
   236                 requiredPeerCount: 0
   237                 # maxPeerCount defines the maximum number of eligible peers to which the peer will attempt to
   238                 # disseminate private data for its own implicit collection during endorsement. Default value is 1.
   239                 maxPeerCount: 1
   240  
   241          # Gossip state transfer related configuration
   242          state:
   243              # indicates whenever state transfer is enabled or not
   244              # default value is true, i.e. state transfer is active
   245              # and takes care to sync up missing blocks allowing
   246              # lagging peer to catch up to speed with rest network.
   247              # Keep in mind that when peer.gossip.useLeaderElection is true
   248              # and there are several peers in the organization,
   249              # or peer.gossip.useLeaderElection is false alongside with
   250              # peer.gossip.orgleader being false, the peer's ledger may lag behind
   251              # the rest of the peers and will never catch up due to state transfer
   252              # being disabled.
   253              enabled: false
   254              # checkInterval interval to check whether peer is lagging behind enough to
   255              # request blocks via state transfer from another peer.
   256              checkInterval: 10s
   257              # responseTimeout amount of time to wait for state transfer response from
   258              # other peers
   259              responseTimeout: 3s
   260              # batchSize the number of blocks to request via state transfer from another peer
   261              batchSize: 10
   262              # blockBufferSize reflects the size of the re-ordering buffer
   263              # which captures blocks and takes care to deliver them in order
   264              # down to the ledger layer. The actual buffer size is bounded between
   265              # 0 and 2*blockBufferSize, each channel maintains its own buffer
   266              blockBufferSize: 20
   267              # maxRetries maximum number of re-tries to ask
   268              # for single state transfer request
   269              maxRetries: 3
   270  
   271      # TLS Settings
   272      tls:
   273          # Require server-side TLS
   274          enabled: true
   275          # Require client certificates / mutual TLS for inbound connections.
   276          # Note that clients that are not configured to use a certificate will
   277          # fail to connect to the peer.
   278          clientAuthRequired: false
   279          # X.509 certificate used for TLS server
   280          cert:
   281              file: tls/server.crt
   282          # Private key used for TLS server
   283          key:
   284              file: tls/server.key
   285          # rootcert.file represents the trusted root certificate chain used for verifying certificates
   286          # of other nodes during outbound connections.
   287          # It is not required to be set, but can be used to augment the set of TLS CA certificates
   288          # available from the MSPs of each channel’s configuration.
   289          rootcert:
   290              file: tls/ca.crt
   291          # If mutual TLS is enabled, clientRootCAs.files contains a list of additional root certificates
   292          # used for verifying certificates of client connections.
   293          # It augments the set of TLS CA certificates available from the MSPs of each channel’s configuration.
   294          # Minimally, set your organization's TLS CA root certificate so that the peer can receive join channel requests.
   295          clientRootCAs:
   296              files:
   297                - tls/ca.crt
   298          # Private key used for TLS when making client connections.
   299          # If not set, peer.tls.key.file will be used instead
   300          clientKey:
   301              file:
   302          # X.509 certificate used for TLS when making client connections.
   303          # If not set, peer.tls.cert.file will be used instead
   304          clientCert:
   305              file:
   306  
   307      # Authentication contains configuration parameters related to authenticating
   308      # client messages
   309      authentication:
   310          # the acceptable difference between the current server time and the
   311          # client's time as specified in a client request message
   312          timewindow: 15m
   313  
   314      # Path on the file system where peer will store data (eg ledger). This
   315      # location must be access control protected to prevent unintended
   316      # modification that might corrupt the peer operations.
   317      fileSystemPath: /var/hyperledger/production
   318  
   319      # BCCSP (Blockchain crypto provider): Select which crypto implementation or
   320      # library to use
   321      BCCSP:
   322          Default: SW
   323          # Settings for the SW crypto provider (i.e. when DEFAULT: SW)
   324          SW:
   325              # TODO: The default Hash and Security level needs refactoring to be
   326              # fully configurable. Changing these defaults requires coordination
   327              # SHA2 is hardcoded in several places, not only BCCSP
   328              Hash: SHA2
   329              Security: 256
   330              # Location of Key Store
   331              FileKeyStore:
   332                  # If "", defaults to 'mspConfigPath'/keystore
   333                  KeyStore:
   334          # Settings for the PKCS#11 crypto provider (i.e. when DEFAULT: PKCS11)
   335          PKCS11:
   336              # Location of the PKCS11 module library
   337              Library:
   338              # Token Label
   339              Label:
   340              # User PIN
   341              Pin:
   342              Hash:
   343              Security:
   344  
   345      # Path on the file system where peer will find MSP local configurations
   346      mspConfigPath: msp
   347  
   348      # Identifier of the local MSP
   349      # ----!!!!IMPORTANT!!!-!!!IMPORTANT!!!-!!!IMPORTANT!!!!----
   350      # Deployers need to change the value of the localMspId string.
   351      # In particular, the name of the local MSP ID of a peer needs
   352      # to match the name of one of the MSPs in each of the channel
   353      # that this peer is a member of. Otherwise this peer's messages
   354      # will not be identified as valid by other nodes.
   355      localMspId: Org1MSP
   356  
   357      # CLI common client config options
   358      client:
   359          # connection timeout
   360          connTimeout: 15s
   361  
   362      # Delivery service related config
   363      deliveryclient:
   364          # It sets the total time the delivery service may spend in reconnection
   365          # attempts until its retry logic gives up and returns an error
   366          reconnectTotalTimeThreshold: 3600s
   367  
   368          # It sets the delivery service <-> ordering service node connection timeout
   369          connTimeout: 15s
   370  
   371          # It sets the delivery service maximal delay between consecutive retries
   372          reConnectBackoffThreshold: 3600s
   373  
   374          # A list of orderer endpoint addresses which should be overridden
   375          # when found in channel configurations.
   376          addressOverrides:
   377          #  - from:
   378          #    to:
   379          #    caCertsFile:
   380          #  - from:
   381          #    to:
   382          #    caCertsFile:
   383  
   384      # Type for the local MSP - by default it's of type bccsp
   385      localMspType: bccsp
   386  
   387      # Used with Go profiling tools only in none production environment. In
   388      # production, it should be disabled (eg enabled: false)
   389      profile:
   390          enabled:     false
   391          listenAddress: 0.0.0.0:6060
   392  
   393      # Handlers defines custom handlers that can filter and mutate
   394      # objects passing within the peer, such as:
   395      #   Auth filter - reject or forward proposals from clients
   396      #   Decorators  - append or mutate the chaincode input passed to the chaincode
   397      #   Endorsers   - Custom signing over proposal response payload and its mutation
   398      # Valid handler definition contains:
   399      #   - A name which is a factory method name defined in
   400      #     core/handlers/library/library.go for statically compiled handlers
   401      #   - library path to shared object binary for pluggable filters
   402      # Auth filters and decorators are chained and executed in the order that
   403      # they are defined. For example:
   404      # authFilters:
   405      #   -
   406      #     name: FilterOne
   407      #     library: /opt/lib/filter.so
   408      #   -
   409      #     name: FilterTwo
   410      # decorators:
   411      #   -
   412      #     name: DecoratorOne
   413      #   -
   414      #     name: DecoratorTwo
   415      #     library: /opt/lib/decorator.so
   416      # Endorsers are configured as a map that its keys are the endorsement system chaincodes that are being overridden.
   417      # Below is an example that overrides the default ESCC and uses an endorsement plugin that has the same functionality
   418      # as the default ESCC.
   419      # If the 'library' property is missing, the name is used as the constructor method in the builtin library similar
   420      # to auth filters and decorators.
   421      # endorsers:
   422      #   escc:
   423      #     name: DefaultESCC
   424      #     library: /etc/hyperledger/fabric/plugin/escc.so
   425      handlers:
   426          authFilters:
   427            -
   428              name: DefaultAuth
   429            -
   430              name: ExpirationCheck    # This filter checks identity x509 certificate expiration
   431          decorators:
   432            -
   433              name: DefaultDecorator
   434          endorsers:
   435            escc:
   436              name: DefaultEndorsement
   437              library:
   438          validators:
   439            vscc:
   440              name: DefaultValidation
   441              library:
   442  
   443      #    library: /etc/hyperledger/fabric/plugin/escc.so
   444      # Number of goroutines that will execute transaction validation in parallel.
   445      # By default, the peer chooses the number of CPUs on the machine. Set this
   446      # variable to override that choice.
   447      # NOTE: overriding this value might negatively influence the performance of
   448      # the peer so please change this value only if you know what you're doing
   449      validatorPoolSize:
   450  
   451      # The discovery service is used by clients to query information about peers,
   452      # such as - which peers have joined a certain channel, what is the latest
   453      # channel config, and most importantly - given a chaincode and a channel,
   454      # what possible sets of peers satisfy the endorsement policy.
   455      discovery:
   456          enabled: true
   457          # Whether the authentication cache is enabled or not.
   458          authCacheEnabled: true
   459          # The maximum size of the cache, after which a purge takes place
   460          authCacheMaxSize: 1000
   461          # The proportion (0 to 1) of entries that remain in the cache after the cache is purged due to overpopulation
   462          authCachePurgeRetentionRatio: 0.75
   463          # Whether to allow non-admins to perform non channel scoped queries.
   464          # When this is false, it means that only peer admins can perform non channel scoped queries.
   465          orgMembersAllowedAccess: false
   466  
   467      # Limits is used to configure some internal resource limits.
   468      limits:
   469          # Concurrency limits the number of concurrently running requests to a service on each peer.
   470          # Currently this option is only applied to endorser service and deliver service.
   471          # When the property is missing or the value is 0, the concurrency limit is disabled for the service.
   472          concurrency:
   473              # endorserService limits concurrent requests to endorser service that handles chaincode deployment, query and invocation,
   474              # including both user chaincodes and system chaincodes.
   475              endorserService: 2500
   476              # deliverService limits concurrent event listeners registered to deliver service for blocks and transaction events.
   477              deliverService: 2500
   478  
   479  ###############################################################################
   480  #
   481  #    VM section
   482  #
   483  ###############################################################################
   484  vm:
   485  
   486      # Endpoint of the vm management system.  For docker can be one of the following in general
   487      # unix:///var/run/docker.sock
   488      # http://localhost:2375
   489      # https://localhost:2376
   490      # endpoint: unix:///var/run/docker.sock
   491  
   492      # DISABLE the docker daemon endpoint to prevent /healthz from checking for docker in "External Builder" mode.
   493      endpoint:
   494  
   495      # settings for docker vms
   496      docker:
   497          tls:
   498              enabled: false
   499              ca:
   500                  file: docker/ca.crt
   501              cert:
   502                  file: docker/tls.crt
   503              key:
   504                  file: docker/tls.key
   505  
   506          # Enables/disables the standard out/err from chaincode containers for
   507          # debugging purposes
   508          attachStdout: false
   509  
   510          # Parameters on creating docker container.
   511          # Container may be efficiently created using ipam & dns-server for cluster
   512          # NetworkMode - sets the networking mode for the container. Supported
   513          # standard values are: `host`(default),`bridge`,`ipvlan`,`none`.
   514          # Dns - a list of DNS servers for the container to use.
   515          # Note:  `Privileged` `Binds` `Links` and `PortBindings` properties of
   516          # Docker Host Config are not supported and will not be used if set.
   517          # LogConfig - sets the logging driver (Type) and related options
   518          # (Config) for Docker. For more info,
   519          # https://docs.docker.com/engine/admin/logging/overview/
   520          # Note: Set LogConfig using Environment Variables is not supported.
   521          hostConfig:
   522              NetworkMode: host
   523              Dns:
   524                 # - 192.168.0.1
   525              LogConfig:
   526                  Type: json-file
   527                  Config:
   528                      max-size: "50m"
   529                      max-file: "5"
   530              Memory: 2147483648
   531  
   532  ###############################################################################
   533  #
   534  #    Chaincode section
   535  #
   536  ###############################################################################
   537  chaincode:
   538  
   539      # The id is used by the Chaincode stub to register the executing Chaincode
   540      # ID with the Peer and is generally supplied through ENV variables
   541      # the `path` form of ID is provided when installing the chaincode.
   542      # The `name` is used for all other requests and can be any string.
   543      id:
   544          path:
   545          name:
   546  
   547      # Generic builder environment, suitable for most chaincode types
   548      builder: $(DOCKER_NS)/fabric-ccenv:$(TWO_DIGIT_VERSION)
   549  
   550      # Enables/disables force pulling of the base docker images (listed below)
   551      # during user chaincode instantiation.
   552      # Useful when using moving image tags (such as :latest)
   553      pull: false
   554  
   555      golang:
   556          # golang will never need more than baseos
   557          runtime: $(DOCKER_NS)/fabric-baseos:$(TWO_DIGIT_VERSION)
   558  
   559          # whether or not golang chaincode should be linked dynamically
   560          dynamicLink: false
   561  
   562      java:
   563          # This is an image based on java:openjdk-8 with addition compiler
   564          # tools added for java shim layer packaging.
   565          # This image is packed with shim layer libraries that are necessary
   566          # for Java chaincode runtime.
   567          runtime: $(DOCKER_NS)/fabric-javaenv:$(TWO_DIGIT_VERSION)
   568  
   569      node:
   570          # This is an image based on node:$(NODE_VER)-alpine
   571          runtime: $(DOCKER_NS)/fabric-nodeenv:$(TWO_DIGIT_VERSION)
   572  
   573      # List of directories to treat as external builders and launchers for
   574      # chaincode. The external builder detection processing will iterate over the
   575      # builders in the order specified below.
   576      externalBuilders:
   577        - path: /var/hyperledger/fabric/chaincode/ccs-builder
   578          name: ccs-builder
   579          propagateEnvironment:
   580            - HOME
   581            - CORE_PEER_ID
   582            - CORE_PEER_LOCALMSPID
   583  
   584      # The maximum duration to wait for the chaincode build and install process
   585      # to complete.
   586      installTimeout: 300s
   587  
   588      # Timeout duration for starting up a container and waiting for Register
   589      # to come through.
   590      startuptimeout: 300s
   591  
   592      # Timeout duration for Invoke and Init calls to prevent runaway.
   593      # This timeout is used by all chaincodes in all the channels, including
   594      # system chaincodes.
   595      # Note that during Invoke, if the image is not available (e.g. being
   596      # cleaned up when in development environment), the peer will automatically
   597      # build the image, which might take more time. In production environment,
   598      # the chaincode image is unlikely to be deleted, so the timeout could be
   599      # reduced accordingly.
   600      executetimeout: 30s
   601  
   602      # There are 2 modes: "dev" and "net".
   603      # In dev mode, user runs the chaincode after starting peer from
   604      # command line on local machine.
   605      # In net mode, peer will run chaincode in a docker container.
   606      mode: net
   607  
   608      # keepalive in seconds. In situations where the communication goes through a
   609      # proxy that does not support keep-alive, this parameter will maintain connection
   610      # between peer and chaincode.
   611      # A value <= 0 turns keepalive off
   612      keepalive: 0
   613  
   614      # enabled system chaincodes
   615      system:
   616          _lifecycle: enable
   617          cscc: enable
   618          lscc: enable
   619          qscc: enable
   620  
   621      # Logging section for the chaincode container
   622      logging:
   623        # Default level for all loggers within the chaincode container
   624        level:  info
   625        # Override default level for the 'shim' logger
   626        shim:   warning
   627        # Format for the chaincode container logs
   628        format: '%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message}'
   629  
   630  ###############################################################################
   631  #
   632  #    Ledger section - ledger configuration encompasses both the blockchain
   633  #    and the state
   634  #
   635  ###############################################################################
   636  ledger:
   637  
   638    blockchain:
   639  
   640    state:
   641      # stateDatabase - options are "goleveldb", "CouchDB"
   642      # goleveldb - default state database stored in goleveldb.
   643      # CouchDB - store state database in CouchDB
   644      stateDatabase: goleveldb
   645      # Limit on the number of records to return per query
   646      totalQueryLimit: 100000
   647      couchDBConfig:
   648         # It is recommended to run CouchDB on the same server as the peer, and
   649         # not map the CouchDB container port to a server port in docker-compose.
   650         # Otherwise proper security must be provided on the connection between
   651         # CouchDB client (on the peer) and server.
   652         couchDBAddress: 127.0.0.1:5984
   653         # This username must have read and write authority on CouchDB
   654         username:
   655         # The password is recommended to pass as an environment variable
   656         # during start up (eg CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD).
   657         # If it is stored here, the file must be access control protected
   658         # to prevent unintended users from discovering the password.
   659         password:
   660         # Number of retries for CouchDB errors
   661         maxRetries: 3
   662         # Number of retries for CouchDB errors during peer startup.
   663         # The delay between retries doubles for each attempt.
   664         # Default of 10 retries results in 11 attempts over 2 minutes.
   665         maxRetriesOnStartup: 10
   666         # CouchDB request timeout (unit: duration, e.g. 20s)
   667         requestTimeout: 35s
   668         # Limit on the number of records per each CouchDB query
   669         # Note that chaincode queries are only bound by totalQueryLimit.
   670         # Internally the chaincode may execute multiple CouchDB queries,
   671         # each of size internalQueryLimit.
   672         internalQueryLimit: 1000
   673         # Limit on the number of records per CouchDB bulk update batch
   674         maxBatchUpdateSize: 1000
   675         # Warm indexes after every N blocks.
   676         # This option warms any indexes that have been
   677         # deployed to CouchDB after every N blocks.
   678         # A value of 1 will warm indexes after every block commit,
   679         # to ensure fast selector queries.
   680         # Increasing the value may improve write efficiency of peer and CouchDB,
   681         # but may degrade query response time.
   682         warmIndexesAfterNBlocks: 1
   683         # Create the _global_changes system database
   684         # This is optional.  Creating the global changes database will require
   685         # additional system resources to track changes and maintain the database
   686         createGlobalChangesDB: false
   687         # CacheSize denotes the maximum mega bytes (MB) to be allocated for the in-memory state
   688         # cache. Note that CacheSize needs to be a multiple of 32 MB. If it is not a multiple
   689         # of 32 MB, the peer would round the size to the next multiple of 32 MB.
   690         # To disable the cache, 0 MB needs to be assigned to the cacheSize.
   691         cacheSize: 64
   692  
   693    history:
   694      # enableHistoryDatabase - options are true or false
   695      # Indicates if the history of key updates should be stored.
   696      # All history 'index' will be stored in goleveldb, regardless if using
   697      # CouchDB or alternate database for the state.
   698      enableHistoryDatabase: true
   699  
   700    pvtdataStore:
   701      # the maximum db batch size for converting
   702      # the ineligible missing data entries to eligible missing data entries
   703      collElgProcMaxDbBatchSize: 5000
   704      # the minimum duration (in milliseconds) between writing
   705      # two consecutive db batches for converting the ineligible missing data entries to eligible missing data entries
   706      collElgProcDbBatchesInterval: 1000
   707      # The missing data entries are classified into two categories:
   708      # (1) prioritized
   709      # (2) deprioritized
   710      # Initially, all missing data are in the prioritized list. When the
   711      # reconciler is unable to fetch the missing data from other peers,
   712      # the unreconciled missing data would be moved to the deprioritized list.
   713      # The reconciler would retry deprioritized missing data after every
   714      # deprioritizedDataReconcilerInterval (unit: minutes). Note that the
   715      # interval needs to be greater than the reconcileSleepInterval
   716      deprioritizedDataReconcilerInterval: 60m
   717  
   718    snapshots:
   719      # Path on the file system where peer will store ledger snapshots
   720      rootDir: /var/hyperledger/production/snapshots
   721  
   722  ###############################################################################
   723  #
   724  #    Operations section
   725  #
   726  ###############################################################################
   727  operations:
   728      # host and port for the operations server
   729      listenAddress: 127.0.0.1:9443
   730  
   731      # TLS configuration for the operations endpoint
   732      tls:
   733          # TLS enabled
   734          enabled: false
   735  
   736          # path to PEM encoded server certificate for the operations server
   737          cert:
   738              file:
   739  
   740          # path to PEM encoded server key for the operations server
   741          key:
   742              file:
   743  
   744          # most operations service endpoints require client authentication when TLS
   745          # is enabled. clientAuthRequired requires client certificate authentication
   746          # at the TLS layer to access all resources.
   747          clientAuthRequired: false
   748  
   749          # paths to PEM encoded ca certificates to trust for client authentication
   750          clientRootCAs:
   751              files: []
   752  
   753  ###############################################################################
   754  #
   755  #    Metrics section
   756  #
   757  ###############################################################################
   758  metrics:
   759      # metrics provider is one of statsd, prometheus, or disabled
   760      provider: disabled
   761  
   762      # statsd configuration
   763      statsd:
   764          # network type: tcp or udp
   765          network: udp
   766  
   767          # statsd server address
   768          address: 127.0.0.1:8125
   769  
   770          # the interval at which locally cached counters and gauges are pushed
   771          # to statsd; timings are pushed immediately
   772          writeInterval: 10s
   773  
   774          # prefix is prepended to all emitted statsd metrics
   775          prefix: