github.com/myafeier/fabric@v1.0.1-0.20170722181825-3a4b1f2bce86/core/chaincode/chaincodetest.yaml (about) 1 # Copyright IBM Corp. All Rights Reserved. 2 # 3 # SPDX-License-Identifier: Apache-2.0 4 # 5 6 # CA server parameters 7 # 8 server: 9 # current version of the CA 10 version: "0.1" 11 12 # limits the number of operating system threads used by the CA 13 gomaxprocs: 2 14 15 # path to the OBC state directory and CA state subdirectory 16 # rootpath: "." 17 # cadir: ".ca" 18 19 # port the CA services are listening on 20 port: ":20051" 21 22 # TLS certificate and key file paths 23 tls: 24 25 security: 26 # Can be 256 or 384 27 # Must be the same as in core.yaml 28 level: 256 29 30 # Enabling/disabling different logging levels of the CA. 31 # 32 logging: 33 trace: 0 34 info: 1 35 warning: 1 36 error: 1 37 panic: 1 38 39 # Enable attribute encryption in TCerts generated by TCA 40 tca: 41 attribute-encryption: 42 enabled: true 43 44 # Default attributes for Attribute Certificate Authority 45 aca: 46 attributes: 47 attribute-entry-0: user1;bank_a;company;ACompany;2015-01-01T00:00:00-03:00;; 48 attribute-entry-1: user1;bank_a;position;Software Staff;2015-01-01T00:00:00-03:00;2015-07-12T23:59:59-03:00; 49 attribute-entry-2: user1;bank_a;position;Software Engineer;2015-07-13T00:00:00-03:00;; 50 attribute-entry-3: user2;bank_a;company;ACompany;2001-02-02T00:00:00-03:00;; 51 attribute-entry-4: user2;bank_a;position;Project Manager;2001-02-02T00:00:00-03:00;; 52 address: localhost:20051 53 server-name: acap 54 enabled: true 55 56 # Default users to be registered with the CA on first launch. The role is a binary OR 57 # of the different roles a user can have: 58 # 59 # - simple client such as a wallet: CLIENT 60 # - non-validating peer: PEER 61 # - validating client: VALIDATOR 62 # - auditing client: AUDITOR 63 # 64 eca: 65 affiliations: 66 banks_and_institutions: 67 banks: 68 - bank_a 69 - bank_b 70 - bank_c 71 institutions: 72 - institution_a 73 users: 74 # <EnrollmentID>: <role (1:client, 2: peer, 4: validator, 8: auditor)> <EnrollmentPWD> <Affiliation> <Affiliation_Role> 75 lukas: 1 NPKYL39uKbkj institution_a 76 diego: 1 DRJ23pEQl16a institution_a 77 jim: 1 6avZQLwcUe9b institution_a 78 79 vp: 4 f3489fy98ghf 80 81 ############################################################################### 82 # 83 # CLI section 84 # 85 ############################################################################### 86 cli: 87 88 # The address that the cli process will use for callbacks from chaincodes 89 address: 0.0.0.0:7052 90 91 92 93 ############################################################################### 94 # 95 # REST section 96 # 97 ############################################################################### 98 rest: 99 100 # Enable/disable setting for the REST service. It is recommended to disable 101 # REST service on validators in production deployment and use non-validating 102 # nodes to host REST service 103 enabled: true 104 105 # The address that the REST service will listen on for incoming requests. 106 address: 0.0.0.0:7050 107 108 109 ############################################################################### 110 # 111 # LOGGING section 112 # 113 ############################################################################### 114 logging: 115 116 # Valid logging levels are case-insensitive strings chosen from 117 118 # CRITICAL | ERROR | WARNING | NOTICE | INFO | DEBUG 119 120 # Logging 'module' names are also strings, however valid module names are 121 # defined at runtime and are not checked for validity during option 122 # processing. 123 124 # Default logging levels are specified here for each of the peer 125 # commands. For commands that have subcommands, the defaults also apply to 126 # all subcommands of the command. These logging levels can be overridden 127 # on the command line using the --logging-level command-line option, or by 128 # setting the CORE_LOGGING_LEVEL environment variable. 129 130 # The logging level specification is of the form 131 132 # [<module>[,<module>...]=]<level>[:[<module>[,<module>...]=]<level>...] 133 134 # A logging level by itself is taken as the overall default. Otherwise, 135 # overrides for individual or groups of modules can be specified using the 136 # <module>[,<module>...]=<level> syntax. 137 138 # Examples: 139 # info - Set default to INFO 140 # warning:main,db=debug:chaincode=info - Override default WARNING in main,db,chaincode 141 # chaincode=info:main=debug:db=debug:warning - Same as above 142 peer: warning 143 crypto: warning 144 status: warning 145 stop: warning 146 login: warning 147 vm: warning 148 chaincode: warning 149 150 151 ############################################################################### 152 # 153 # Peer section 154 # 155 ############################################################################### 156 peer: 157 158 # Peer Version following version semantics as described here http://semver.org/ 159 # The Peer supplies this version in communications with other Peers 160 version: 0.1.0 161 162 # The Peer id is used for identifying this Peer instance. 163 id: jdoe 164 165 # The privateKey to be used by this peer 166 # privateKey: 794ef087680e2494fa4918fd8fb80fb284b50b57d321a31423fe42b9ccf6216047cea0b66fe8365a8e3f2a8140c6866cc45852e63124668bee1daa9c97da0c2a 167 168 # The networkId allows for logical seperation of networks 169 # networkId: dev 170 # networkId: test 171 networkId: dev 172 173 # The Address this Peer will listen on 174 listenAddress: 0.0.0.0:21212 175 # The Address this Peer will bind to for providing services 176 address: 0.0.0.0:21212 177 # Whether the Peer should programmatically determine the address to bind to. 178 # This case is useful for docker containers. 179 addressAutoDetect: true 180 181 # Peer port to accept connections on 182 port: 21212 183 # Setting for runtime.GOMAXPROCS(n). If n < 1, it does not change the current setting 184 gomaxprocs: -1 185 workers: 2 186 187 # Sync related configuration 188 sync: 189 blocks: 190 # Channel size for readonly SyncBlocks messages channel for receiving 191 # blocks from oppositie Peer Endpoints. 192 # NOTE: currently messages are not stored and forwarded, but rather 193 # lost if the channel write blocks. 194 channelSize: 10 195 state: 196 snapshot: 197 # Channel size for readonly syncStateSnapshot messages channel 198 # for receiving state deltas for snapshot from oppositie Peer Endpoints. 199 # NOTE: currently messages are not stored and forwarded, but 200 # rather lost if the channel write blocks. 201 channelSize: 50 202 deltas: 203 # Channel size for readonly syncStateDeltas messages channel for 204 # receiving state deltas for a syncBlockRange from oppositie 205 # Peer Endpoints. 206 # NOTE: currently messages are not stored and forwarded, 207 # but rather lost if the channel write blocks. 208 channelSize: 20 209 210 # Validator defines whether this peer is a validating peer or not, and if 211 # it is enabled, what consensus plugin to load 212 validator: 213 enabled: true 214 215 consensus: 216 # Consensus plugin to use. The value is the name of the plugin, e.g. pbft, noops ( this value is case-insensitive) 217 # if the given value is not recognized, we will default to noops 218 plugin: noops 219 220 # total number of consensus messages which will be buffered per connection before delivery is rejected 221 buffersize: 1000 222 223 events: 224 # The address that the Event service will be enabled on the validator 225 address: 0.0.0.0:7053 226 227 # total number of events that could be buffered without blocking the 228 # validator sends 229 buffersize: 100 230 231 # milliseconds timeout for producer to send an event. 232 # if < 0, if buffer full, unblocks immediately and not send 233 # if 0, if buffer full, will block and guarantee the event will be sent out 234 # if > 0, if buffer full, blocks till timeout 235 timeout: 10 236 237 # TLS Settings for p2p communications 238 tls: 239 enabled: true 240 cert: 241 file: testdata/server1.pem 242 key: 243 file: testdata/server1.key 244 245 # The server name use to verify the hostname returned by TLS handshake 246 # The key cert was generated using 247 # openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout testdata/server1.key -out testdata/server1.pem 248 serverhostoverride: dummy 249 250 # PKI member services properties 251 pki: 252 eca: 253 paddr: localhost:20051 254 tca: 255 paddr: localhost:20051 256 tlsca: 257 paddr: localhost:20051 258 tls: 259 enabled: false 260 rootcert: 261 file: tlsca.cert 262 # The server name use to verify the hostname returned by TLS handshake 263 serverhostoverride: 264 265 # Peer discovery settings. Controls how this peer discovers other peers 266 discovery: 267 268 # The root nodes are used for bootstrapping purposes, and generally 269 # supplied through ENV variables 270 rootnode: 271 272 # The duration of time between attempts to asks peers for their connected peers 273 period: 5s 274 275 ## leaving this in for example of sub map entry 276 # testNodes: 277 # - node : 1 278 # ip : 127.0.0.1 279 # port : 21212 280 # - node : 2 281 # ip : 127.0.0.1 282 # port : 21212 283 284 # Should the discovered nodes and their reputations 285 # be stored in DB and persisted between restarts 286 persist: true 287 288 # if peer discovery is off 289 # the peer window will show 290 # only what retrieved by active 291 # peer [true/false] 292 enabled: true 293 294 # number of workers that 295 # test the peers for being 296 # online [1..10] 297 workers: 8 298 299 # the period in seconds with which the discovery 300 # tries to reconnect to successful nodes 301 # 0 means the nodes are not reconnected 302 touchPeriod: 600 303 304 # the maximum nuber of nodes to reconnect to 305 # -1 for unlimited 306 touchMaxNodes: 100 307 308 # Path on the file system where peer will store data 309 fileSystemPath: /tmp/hyperledger/test/tmpdb 310 311 312 profile: 313 enabled: false 314 listenAddress: 0.0.0.0:6060 315 316 ############################################################################### 317 # 318 # VM section 319 # 320 ############################################################################### 321 vm: 322 323 # Endpoint of the vm management system. For docker can be one of the following in general 324 # unix:///var/run/docker.sock 325 # http://localhost:2375 326 # https://localhost:2376 327 endpoint: unix:///var/run/docker.sock 328 329 # settings for docker vms 330 docker: 331 tls: 332 enabled: false 333 cert: 334 file: /path/to/server.pem 335 ca: 336 file: /path/to/ca.pem 337 key: 338 file: /path/to/server-key.pem 339 attachStdout: true 340 ############################################################################### 341 # 342 # Chaincode section 343 # 344 ############################################################################### 345 chaincode: 346 347 # The id is used by the Chaincode stub to register the executing Chaincode 348 # ID with the Peerand is generally supplied through ENV variables 349 # the Path form of ID is provided when deploying the chaincode. The name is 350 # used for all other requests. The name is really a hashcode 351 # returned by the system in response to the deploy transaction. In 352 # development mode where user runs the chaincode, the name can be any string 353 id: 354 path: 355 name: 356 357 # Generic builder environment, suitable for most chaincode types 358 builder: $(DOCKER_NS)/fabric-ccenv:$(ARCH)-$(PROJECT_VERSION) 359 360 golang: 361 # golang will never need more than baseos 362 runtime: $(BASE_DOCKER_NS)/fabric-baseos:$(ARCH)-$(BASE_VERSION) 363 364 car: 365 # car may need more facilities (JVM, etc) in the future as the catalog 366 # of platforms are expanded. For now, we can just use baseos 367 runtime: $(BASE_DOCKER_NS)/fabric-baseos:$(ARCH)-$(BASE_VERSION) 368 369 java: 370 # This is an image based on java:openjdk-8 with addition compiler 371 # tools added for java shim layer packaging. 372 # This image is packed with shim layer libraries that are necessary 373 # for Java chaincode runtime. 374 Dockerfile: | 375 from $(DOCKER_NS)/fabric-javaenv:$(ARCH)-$(PROJECT_VERSION) 376 377 # timeout in millisecs for starting up a container and waiting for Register 378 # to come through. 1sec should be plenty for chaincode unit tests 379 startuptimeout: 1000 380 381 # timeout in millisecs for invokes and initialize commands 382 # this timeout is used by all chaincodes in all the channels including 383 # system chaincodes. Default is 30000ms (30 seconds) 384 executetimeout: 30000 385 386 387 #timeout in millisecs for deploying chaincode from a remote repository. 388 deploytimeout: 60000 389 390 #mode - options are "dev", "net" 391 #dev - in dev mode, user runs the chaincode after starting validator from 392 # command line on local machine 393 #net - in net mode validator will run chaincode in a docker container 394 395 mode: net 396 # typically installpath should not be modified. Otherwise, user must ensure 397 # the chaincode executable is placed in the path specifed by installpath in 398 # the image 399 installpath: /opt/gopath/bin/ 400 401 #keepalive in seconds. In situations where the communiction goes through a 402 #proxy that does not support keep-alive, this parameter will maintain connection 403 #between peer and chaincode. 404 #A value <= 0 turns keepalive off 405 keepalive: 1 406 407 # system chaincodes whitelist. To add system chaincode "myscc" to the 408 # whitelist, add "myscc: enable" to the list 409 system: 410 cscc: enable 411 lscc: enable 412 escc: enable 413 vscc: enable 414 415 # Logging section for the chaincode container 416 logging: 417 # Default level for all loggers within the chaincode container 418 level: info 419 # Override default level for the 'shim' module 420 shim: warning 421 # Format for the chaincode container logs 422 format: '%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message}' 423 424 ############################################################################### 425 # 426 # Ledger section - ledger configuration encompases both the blockchain 427 # and the state 428 # 429 ############################################################################### 430 ledger: 431 432 blockchain: 433 434 state: 435 # stateDatabase - options are "goleveldb", "CouchDB" 436 # goleveldb - default state database stored in goleveldb. 437 # CouchDB - store state database in CouchDB 438 stateDatabase: goleveldb 439 couchDBConfig: 440 couchDBAddress: 127.0.0.1:5984 441 username: 442 password: 443 # Number of retries for CouchDB errors 444 maxRetries: 3 445 # Number of retries for CouchDB errors during peer startup 446 maxRetriesOnStartup: 10 447 # CouchDB request timeout (unit: duration, e.g. 20s) 448 requestTimeout: 35s 449 # Limit on the number of records to return per query 450 queryLimit: 10000 451 452 453 history: 454 # enableHistoryDatabase - options are true or false 455 # Indicates if the history of key updates should be stored in goleveldb 456 enableHistoryDatabase: true 457 458 459 ################################################################################ 460 # 461 # SECTION: STATETRANSFER 462 # 463 # - This applies to recovery behavior when the replica has detected 464 # a state transfer is required 465 # 466 # - This might happen: 467 # - During a view change in response to a faulty primary 468 # - After a network outage which has isolated the replica 469 # - If the current blockchain/state is determined to be corrupt 470 # 471 ################################################################################ 472 statetransfer: 473 474 # Should a replica attempt to fix damaged blocks? 475 # In general, this should be set to true, setting to false will cause 476 # the replica to panic, and require a human's intervention to intervene 477 # and fix the corruption 478 recoverdamage: true 479 480 # The number of blocks to retrieve per sync request 481 blocksperrequest: 20 482 483 # The maximum number of state deltas to attempt to retrieve 484 # If more than this number of deltas is required to play the state up to date 485 # then instead the state will be flagged as invalid, and a full copy of the state 486 # will be retrieved instead 487 maxdeltas: 200 488 489 # Timeouts 490 timeout: 491 492 # How long may returning a single block take 493 singleblock: 2s 494 495 # How long may returning a single state delta take 496 singlestatedelta: 2s 497 498 # How long may transferring the complete state take 499 fullstate: 60s