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