github.com/tenywen/fabric@v1.0.0-beta.0.20170620030522-a5b1ed380643/sampleconfig/core.yaml (about)

     1  # Copyright IBM Corp. All Rights Reserved.
     2  #
     3  # SPDX-License-Identifier: Apache-2.0
     4  #
     5  
     6  ###############################################################################
     7  #
     8  #    LOGGING section
     9  #
    10  ###############################################################################
    11  logging:
    12  
    13      # Default logging levels are specified here.
    14  
    15      # Valid logging levels are case-insensitive strings chosen from
    16  
    17      #     CRITICAL | ERROR | WARNING | NOTICE | INFO | DEBUG
    18  
    19      # The logging levels specified here can be overridden in various ways,
    20      # listed below from strongest to weakest:
    21      #
    22      # 1. The --logging-level=<level> command line option overrides all other
    23      #    specifications.
    24      #
    25      # 2. The environment variable CORE_LOGGING_LEVEL otherwise applies to
    26      #    all peer commands if defined as a non-empty string.
    27      #
    28      # 3. Otherwise, the specifications below apply.
    29  
    30      # Default for all modules running within the scope of a peer
    31      peer:       info
    32  
    33      # Override levels for various 'peer' modules
    34      cauthdsl:   warning
    35      gossip:     warning
    36      ledger:     info
    37      msp:        warning
    38      policies:   warning
    39      grpc:       error
    40  
    41      # Message format for the peer logs
    42      format: '%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message}'
    43  
    44  ###############################################################################
    45  #
    46  #    Peer section
    47  #
    48  ###############################################################################
    49  peer:
    50  
    51      # The Peer id is used for identifying this Peer instance.
    52      id: jdoe
    53  
    54      # The networkId allows for logical seperation of networks
    55      networkId: dev
    56  
    57      # The Address at local network interface this Peer will listen on.
    58      # By default, it will listen on all network interfaces
    59      listenAddress: 0.0.0.0:7051
    60      # When used as peer config, represents the endpoint to other peers in the same organization
    61      # for peers in other organization, see gossip.externalEndpoint
    62      # When used as cli config, will mean the peer node's endpoint to interact with
    63      address: 0.0.0.0:7051
    64      # Whether the Peer should programmatically determine its address
    65      # This case is useful for docker containers.
    66      addressAutoDetect: false
    67      # Setting for runtime.GOMAXPROCS(n). If n < 1, it does not change the current setting
    68      gomaxprocs: -1
    69  
    70      # Gossip related configuration
    71      gossip:
    72          # Bootstrap set to initialize gossip with.
    73          # This is a list of peers that the peer reaches out to at startup.
    74          # Important: The endpoints here have to be endpoints of peers in the same
    75          # organization, because the peer would refuse connecting to these endpoints
    76          # unless they are in the same organization as the peer.
    77          bootstrap: 127.0.0.1:7051
    78  
    79          # NOTE: orgLeader and useLeaderElection parameters are mutual exclusive
    80          # setting both to true would result in the termination of the peer, since this is undefined
    81          # state.
    82  
    83          # Defines whenever peer will initialize dynamic algorithm for
    84          # "leader" selection, where leader is the peer to establish
    85          # connection with ordering service and use delivery protocol
    86          # to pull ledger blocks from ordering service
    87          useLeaderElection: false
    88          # Statically defines peer to be an organization "leader",
    89          # where this means that current peer will maintain connection
    90          # with ordering service and disseminate block across peers in
    91          # its own organization
    92          orgLeader: true
    93  
    94          # Overrides the endpoint that the peer publishes to peers
    95          # in its organization. For peers in foreign organizations
    96          # see 'externalEndpoint'
    97          endpoint:
    98          # Maximum count of blocks stored in memory
    99          maxBlockCountToStore: 100
   100          # Max time between consecutive message pushes(unit: millisecond)
   101          maxPropagationBurstLatency: 10ms
   102          # Max number of messages stored until a push is triggered to remote peers
   103          maxPropagationBurstSize: 10
   104          # Number of times a message is pushed to remote peers
   105          propagateIterations: 1
   106          # Number of peers selected to push messages to
   107          propagatePeerNum: 3
   108          # Determines frequency of pull phases(unit: second)
   109          pullInterval: 4s
   110          # Number of peers to pull from
   111          pullPeerNum: 3
   112          # Determines frequency of pulling state info messages from peers(unit: second)
   113          requestStateInfoInterval: 4s
   114          # Determines frequency of pushing state info messages to peers(unit: second)
   115          publishStateInfoInterval: 4s
   116          # Maximum time a stateInfo message is kept until expired
   117          stateInfoRetentionInterval:
   118          # Time from startup certificates are included in Alive messages(unit: second)
   119          publishCertPeriod: 10s
   120          # Should we skip verifying block messages or not (currently not in use)
   121          skipBlockVerification: false
   122          # Dial timeout(unit: second)
   123          dialTimeout: 3s
   124          # Connection timeout(unit: second)
   125          connTimeout: 2s
   126          # Buffer size of received messages
   127          recvBuffSize: 20
   128          # Buffer size of sending messages
   129          sendBuffSize: 20
   130          # Time to wait before pull engine processes incoming digests (unit: second)
   131          digestWaitTime: 1s
   132          # Time to wait before pull engine removes incoming nonce (unit: second)
   133          requestWaitTime: 1s
   134          # Time to wait before pull engine ends pull (unit: second)
   135          responseWaitTime: 2s
   136          # Alive check interval(unit: second)
   137          aliveTimeInterval: 5s
   138          # Alive expiration timeout(unit: second)
   139          aliveExpirationTimeout: 25s
   140          # Reconnect interval(unit: second)
   141          reconnectInterval: 25s
   142          # This is an endpoint that is published to peers outside of the organization.
   143          # If this isn't set, the peer will not be known to other organizations.
   144          externalEndpoint:
   145          # Leader election service configuration
   146          election:
   147              # Longest time peer waits for stable membership during leader election startup (unit: second)
   148              startupGracePeriod: 15s
   149              # Interval gossip membership samples to check its stability (unit: second)
   150              membershipSampleInterval: 1s
   151              # Time passes since last declaration message before peer decides to perform leader election (unit: second)
   152              leaderAliveThreshold: 10s
   153              # Time between peer sends propose message and declares itself as a leader (sends declaration message) (unit: second)
   154              leaderElectionDuration: 5s
   155  
   156      # EventHub related configuration
   157      events:
   158          # The address that the Event service will be enabled on the validator
   159          address: 0.0.0.0:7053
   160  
   161          # total number of events that could be buffered without blocking the
   162          # validator sends
   163          buffersize: 100
   164  
   165          # timeout duration for producer to send an event.
   166          # if < 0, if buffer full, unblocks immediately and not send
   167          # if 0, if buffer full, will block and guarantee the event will be sent out
   168          # if > 0, if buffer full, blocks till timeout
   169          timeout: 10ms
   170  
   171      # TLS Settings
   172      tls:
   173          enabled:  false
   174          cert:
   175              file: tls/server.crt
   176          key:
   177              file: tls/server.key
   178          rootcert:
   179              file: tls/ca.crt
   180  
   181          # The server name use to verify the hostname returned by TLS handshake
   182          serverhostoverride:
   183  
   184      # Path on the file system where peer will store data (eg ledger)
   185      fileSystemPath: /var/hyperledger/production
   186  
   187      # BCCSP (Blockchain crypto provider): Select which crypto implementation or
   188      # library to use
   189      BCCSP:
   190          Default: SW
   191          SW:
   192              # TODO: The default Hash and Security level needs refactoring to be
   193              # fully configurable. Changing these defaults requires coordination
   194              # SHA2 is hardcoded in several places, not only BCCSP
   195              Hash: SHA2
   196              Security: 256
   197              # Location of Key Store
   198              FileKeyStore:
   199                  # If "", defaults to 'mspConfigPath'/keystore
   200                  # TODO: Ensure this is read with fabric/core/config.GetPath() once ready
   201                  KeyStore:
   202  
   203      # Path on the file system where peer will find MSP local configurations
   204      mspConfigPath: msp
   205  
   206      # Identifier of the local MSP
   207      # ----!!!!IMPORTANT!!!-!!!IMPORTANT!!!-!!!IMPORTANT!!!!----
   208      # Deployers need to change the value of the localMspId string.
   209      # In particular, the name of the local MSP ID of a peer needs
   210      # to match the name of one of the MSPs in each of the channel
   211      # that this peer is a member of. Otherwise this peer's messages
   212      # will not be identified as valid by other nodes.
   213      localMspId: DEFAULT
   214  
   215      # Used with Go profiling tools only in none production environment. In
   216      # production, it should be disabled (eg enabled: false)
   217      profile:
   218          enabled:     false
   219          listenAddress: 0.0.0.0:6060
   220  
   221  ###############################################################################
   222  #
   223  #    VM section
   224  #
   225  ###############################################################################
   226  vm:
   227  
   228      # Endpoint of the vm management system.  For docker can be one of the following in general
   229      # unix:///var/run/docker.sock
   230      # http://localhost:2375
   231      # https://localhost:2376
   232      endpoint: unix:///var/run/docker.sock
   233  
   234      # settings for docker vms
   235      docker:
   236          tls:
   237              enabled: false
   238              ca:
   239                  file: docker/ca.crt
   240              cert:
   241                  file: docker/tls.crt
   242              key:
   243                  file: docker/tls.key
   244  
   245          # Enables/disables the standard out/err from chaincode containers for debugging purposes
   246          attachStdout: false
   247  
   248          # Parameters of docker container creating. For docker can created by custom parameters
   249          # If you have your own ipam & dns-server for cluster you can use them to create container efficient.
   250          # NetworkMode Sets the networking mode for the container. Supported standard values are: `host`(default),`bridge`,`ipvlan`,`none`
   251          # dns A list of DNS servers for the container to use.
   252          # note: not support customize for `Privileged` `Binds` `Links` `PortBindings`
   253          # not support set LogConfig using Environment Variables
   254          # LogConfig sets the logging driver (Type) and related options (Config) for Docker
   255          # you can refer https://docs.docker.com/engine/admin/logging/overview/ for more detail configruation.
   256          hostConfig:
   257              NetworkMode: host
   258              Dns:
   259                 # - 192.168.0.1
   260              LogConfig:
   261                  Type: json-file
   262                  Config:
   263                      max-size: "50m"
   264                      max-file: "5"
   265              Memory: 2147483648
   266  
   267  ###############################################################################
   268  #
   269  #    Chaincode section
   270  #
   271  ###############################################################################
   272  chaincode:
   273  
   274      # The id is used by the Chaincode stub to register the executing Chaincode
   275      # ID with the Peerand is generally supplied through ENV variables
   276      # the Path form of ID is provided when deploying the chaincode. The name is
   277      # used for all other requests. The name is really a hashcode
   278      # returned by the system in response to the deploy transaction. In
   279      # development mode where user runs the chaincode, the name can be any string
   280      id:
   281          path:
   282          name:
   283  
   284      # Generic builder environment, suitable for most chaincode types
   285      builder: $(DOCKER_NS)/fabric-ccenv:$(ARCH)-$(PROJECT_VERSION)
   286  
   287      golang:
   288          # golang will never need more than baseos
   289          runtime: $(BASE_DOCKER_NS)/fabric-baseos:$(ARCH)-$(BASE_VERSION)
   290  
   291      car:
   292          # car may need more facilities (JVM, etc) in the future as the catalog
   293          # of platforms are expanded.  For now, we can just use baseos
   294          runtime: $(BASE_DOCKER_NS)/fabric-baseos:$(ARCH)-$(BASE_VERSION)
   295  
   296      java:
   297          # This is an image based on java:openjdk-8 with addition compiler
   298          # tools added for java shim layer packaging.
   299          # This image is packed with shim layer libraries that are necessary
   300          # for Java chaincode runtime.
   301          Dockerfile:  |
   302              from $(DOCKER_NS)/fabric-javaenv:$(ARCH)-$(PROJECT_VERSION)
   303  
   304      # timeout duration for starting up a container and waiting for Register
   305      # to come through. 1sec should be plenty for chaincode unit tests
   306      startuptimeout: 300s
   307  
   308      # timeout duration for invokes and initialize commands
   309      # this timeout is used by all chaincodes in all the channels including
   310      # system chaincodes. Default is 30 seconds
   311      executetimeout: 30s
   312  
   313      #timeout duration for deploying chaincode from a remote repository.
   314      deploytimeout: 30s
   315  
   316      #mode - options are "dev", "net"
   317      #dev - in dev mode, user runs the chaincode after starting validator from
   318      # command line on local machine
   319      #net - in net mode validator will run chaincode in a docker container
   320  
   321      mode: net
   322  
   323      # keepalive in seconds. In situations where the communiction goes through a
   324      # proxy that does not support keep-alive, this parameter will maintain connection
   325      # between peer and chaincode.
   326      # A value <= 0 turns keepalive off
   327      keepalive: 0
   328  
   329      # system chaincodes whitelist. To add system chaincode "myscc" to the
   330      # whitelist, add "myscc: enable" to the list below, and register in
   331      # chaincode/importsysccs.go
   332      system:
   333          cscc: enable
   334          lscc: enable
   335          escc: enable
   336          vscc: enable
   337          qscc: enable
   338  
   339      # Logging section for the chaincode container
   340      logging:
   341        # Default level for all loggers within the chaincode container
   342        level:  info
   343        # Override default level for the 'shim' module
   344        shim:   warning
   345        # Format for the chaincode container logs
   346        format: '%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message}'
   347  
   348  ###############################################################################
   349  #
   350  #    Ledger section - ledger configuration encompases both the blockchain
   351  #    and the state
   352  #
   353  ###############################################################################
   354  ledger:
   355  
   356    blockchain:
   357  
   358    state:
   359      # stateDatabase - options are "goleveldb", "CouchDB"
   360      # goleveldb - default state database stored in goleveldb.
   361      # CouchDB - store state database in CouchDB
   362      stateDatabase: goleveldb
   363      couchDBConfig:
   364         couchDBAddress: 127.0.0.1:5984
   365         username:
   366         password:
   367         # Number of retries for CouchDB errors
   368         maxRetries: 3
   369         # Number of retries for CouchDB errors during peer startup
   370         maxRetriesOnStartup: 10
   371         # CouchDB request timeout (unit: duration, e.g. 20s)
   372         requestTimeout: 35s
   373         # Limit on the number of records to return per query
   374         queryLimit: 10000
   375  
   376  
   377    history:
   378      # enableHistoryDatabase - options are true or false
   379      # Indicates if the history of key updates should be stored.
   380      # All history 'index' will be stored in goleveldb, regardless if using
   381      # CouchDB or alternate database for the state.
   382      enableHistoryDatabase: true