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