github.com/osdi23p228/fabric@v0.0.0-20221218062954-77808885f5db/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 # Peer section 112 # 113 ############################################################################### 114 peer: 115 116 # Peer Version following version semantics as described here http://semver.org/ 117 # The Peer supplies this version in communications with other Peers 118 version: 0.1.0 119 120 # The Peer id is used for identifying this Peer instance. 121 id: jdoe 122 123 # The privateKey to be used by this peer 124 # privateKey: 794ef087680e2494fa4918fd8fb80fb284b50b57d321a31423fe42b9ccf6216047cea0b66fe8365a8e3f2a8140c6866cc45852e63124668bee1daa9c97da0c2a 125 126 # The networkId allows for logical separation of networks 127 # networkId: dev 128 # networkId: test 129 networkId: dev 130 131 # The Address this Peer will listen on 132 listenAddress: 0.0.0.0:21212 133 # The Address this Peer will bind to for providing services 134 address: 0.0.0.0:21212 135 # Whether the Peer should programmatically determine the address to bind to. 136 # This case is useful for docker containers. 137 addressAutoDetect: true 138 139 # Peer port to accept connections on 140 port: 21212 141 workers: 2 142 143 # Sync related configuration 144 sync: 145 blocks: 146 # Channel size for readonly SyncBlocks messages channel for receiving 147 # blocks from oppositie Peer Endpoints. 148 # NOTE: currently messages are not stored and forwarded, but rather 149 # lost if the channel write blocks. 150 channelSize: 10 151 state: 152 snapshot: 153 # Channel size for readonly syncStateSnapshot messages channel 154 # for receiving state deltas for snapshot from oppositie Peer Endpoints. 155 # NOTE: currently messages are not stored and forwarded, but 156 # rather lost if the channel write blocks. 157 channelSize: 50 158 deltas: 159 # Channel size for readonly syncStateDeltas messages channel for 160 # receiving state deltas for a syncBlockRange from oppositie 161 # Peer Endpoints. 162 # NOTE: currently messages are not stored and forwarded, 163 # but rather lost if the channel write blocks. 164 channelSize: 20 165 166 # Validator defines whether this peer is a validating peer or not, and if 167 # it is enabled, what consensus plugin to load 168 validator: 169 enabled: true 170 171 consensus: 172 # Consensus plugin to use. The value is the name of the plugin, e.g. pbft, noops ( this value is case-insensitive) 173 # if the given value is not recognized, we will default to noops 174 plugin: noops 175 176 # total number of consensus messages which will be buffered per connection before delivery is rejected 177 buffersize: 1000 178 179 # TLS Settings for p2p communications 180 tls: 181 enabled: true 182 cert: 183 file: testdata/server1.pem 184 key: 185 file: testdata/server1.key 186 187 # The server name use to verify the hostname returned by TLS handshake 188 # The key cert was generated using 189 # openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout testdata/server1.key -out testdata/server1.pem 190 serverhostoverride: dummy 191 192 # PKI member services properties 193 pki: 194 eca: 195 paddr: localhost:20051 196 tca: 197 paddr: localhost:20051 198 tlsca: 199 paddr: localhost:20051 200 tls: 201 enabled: false 202 rootcert: 203 file: tlsca.cert 204 # The server name use to verify the hostname returned by TLS handshake 205 serverhostoverride: 206 207 # Peer discovery settings. Controls how this peer discovers other peers 208 discovery: 209 210 # The root nodes are used for bootstrapping purposes, and generally 211 # supplied through ENV variables 212 rootnode: 213 214 # The duration of time between attempts to asks peers for their connected peers 215 period: 5s 216 217 ## leaving this in for example of sub map entry 218 # testNodes: 219 # - node : 1 220 # ip : 127.0.0.1 221 # port : 21212 222 # - node : 2 223 # ip : 127.0.0.1 224 # port : 21212 225 226 # Should the discovered nodes and their reputations 227 # be stored in DB and persisted between restarts 228 persist: true 229 230 # if peer discovery is off 231 # the peer window will show 232 # only what retrieved by active 233 # peer [true/false] 234 enabled: true 235 236 # number of workers that 237 # test the peers for being 238 # online [1..10] 239 workers: 8 240 241 # the period in seconds with which the discovery 242 # tries to reconnect to successful nodes 243 # 0 means the nodes are not reconnected 244 touchPeriod: 600 245 246 # the maximum nuber of nodes to reconnect to 247 # -1 for unlimited 248 touchMaxNodes: 100 249 250 # Path on the file system where peer will store data 251 fileSystemPath: /tmp/hyperledger/test/tmpdb 252 253 254 profile: 255 enabled: false 256 listenAddress: 0.0.0.0:6060 257 258 ############################################################################### 259 # 260 # VM section 261 # 262 ############################################################################### 263 vm: 264 265 # Endpoint of the vm management system. For docker can be one of the following in general 266 # unix:///var/run/docker.sock 267 # http://localhost:2375 268 # https://localhost:2376 269 endpoint: unix:///var/run/docker.sock 270 271 # settings for docker vms 272 docker: 273 tls: 274 enabled: false 275 cert: 276 file: /path/to/server.pem 277 ca: 278 file: /path/to/ca.pem 279 key: 280 file: /path/to/server-key.pem 281 attachStdout: true 282 ############################################################################### 283 # 284 # Chaincode section 285 # 286 ############################################################################### 287 chaincode: 288 289 # The id is used by the Chaincode stub to register the executing Chaincode 290 # ID with the Peer and is generally supplied through ENV variables 291 # the `path` form of ID is provided when installing the chaincode. 292 # The `name` is used for all other requests and can be any string. 293 id: 294 path: 295 name: 296 297 # Generic builder environment, suitable for most chaincode types 298 builder: $(DOCKER_NS)/fabric-ccenv:$(TWO_DIGIT_VERSION) 299 300 # Enables/disables force pulling of the base docker images (listed below) 301 # during user chaincode instantiation. 302 # Useful when using moving image tags (such as :latest) 303 pull: false 304 305 golang: 306 # golang will never need more than baseos 307 runtime: $(DOCKER_NS)/fabric-baseos:$(TWO_DIGIT_VERSION) 308 309 # whether or not golang chaincode should be linked dynamically 310 dynamicLink: false 311 312 java: 313 # This is an image based on java:openjdk-8 with addition compiler 314 # tools added for java shim layer packaging. 315 # This image is packed with shim layer libraries that are necessary 316 # for Java chaincode runtime. 317 runtime: $(DOCKER_NS)/fabric-javaenv:$(TWO_DIGIT_VERSION) 318 319 node: 320 # This is an image based on node:$(NODE_VER)-alpine 321 runtime: $(DOCKER_NS)/fabric-nodeenv:$(TWO_DIGIT_VERSION) 322 323 # timeout in millisecs for starting up a container and waiting for Register 324 # to come through. 1sec should be plenty for chaincode unit tests 325 startuptimeout: 1000 326 327 # timeout in millisecs for invokes and initialize commands 328 # this timeout is used by all chaincodes in all the channels including 329 # system chaincodes. Default is 30000ms (30 seconds) 330 executetimeout: 30000 331 332 333 #timeout in millisecs for deploying chaincode from a remote repository. 334 deploytimeout: 60000 335 336 #mode - options are "dev", "net" 337 #dev - in dev mode, user runs the chaincode after starting validator from 338 # command line on local machine 339 #net - in net mode validator will run chaincode in a docker container 340 341 mode: net 342 # typically installpath should not be modified. Otherwise, user must ensure 343 # the chaincode executable is placed in the path specified by installpath in 344 # the image 345 installpath: /opt/gopath/bin/ 346 347 #keepalive in seconds. In situations where the communication goes through a 348 #proxy that does not support keep-alive, this parameter will maintain connection 349 #between peer and chaincode. 350 #A value <= 0 turns keepalive off 351 keepalive: 1 352 353 # enabled system chaincodes 354 system: 355 cscc: enable 356 lscc: enable 357 escc: enable 358 vscc: enable 359 360 # Logging section for the chaincode container 361 logging: 362 # Default level for all loggers within the chaincode container 363 level: info 364 # Override default level for the 'shim' logger 365 shim: warning 366 # Format for the chaincode container logs 367 format: '%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message}' 368 369 ############################################################################### 370 # 371 # Ledger section - ledger configuration encompasses both the blockchain 372 # and the state 373 # 374 ############################################################################### 375 ledger: 376 377 blockchain: 378 379 state: 380 # stateDatabase - options are "goleveldb", "CouchDB" 381 # goleveldb - default state database stored in goleveldb. 382 # CouchDB - store state database in CouchDB 383 stateDatabase: goleveldb 384 couchDBConfig: 385 couchDBAddress: 127.0.0.1:5984 386 username: 387 password: 388 # Number of retries for CouchDB errors 389 maxRetries: 3 390 # Number of retries for CouchDB errors during peer startup 391 maxRetriesOnStartup: 10 392 # CouchDB request timeout (unit: duration, e.g. 20s) 393 requestTimeout: 35s 394 # Limit on the number of records to return per query 395 queryLimit: 10000 396 # Limit on the number of records per CouchDB bulk update batch 397 maxBatchUpdateSize: 500 398 # Warm indexes after every N blocks. 399 # This option warms any indexes that have been 400 # deployed to CouchDB after every N blocks. 401 # A value of 1 will warm indexes after every block commit, 402 # to ensure fast selector queries. 403 # Increasing the value may improve write efficiency of peer and CouchDB, 404 # but may degrade query response time. 405 warmIndexesAfterNBlocks: 1 406 407 history: 408 # enableHistoryDatabase - options are true or false 409 # Indicates if the history of key updates should be stored in goleveldb 410 enableHistoryDatabase: true 411 412 413 ################################################################################ 414 # 415 # SECTION: STATETRANSFER 416 # 417 # - This applies to recovery behavior when the replica has detected 418 # a state transfer is required 419 # 420 # - This might happen: 421 # - During a view change in response to a faulty primary 422 # - After a network outage which has isolated the replica 423 # - If the current blockchain/state is determined to be corrupt 424 # 425 ################################################################################ 426 statetransfer: 427 428 # Should a replica attempt to fix damaged blocks? 429 # In general, this should be set to true, setting to false will cause 430 # the replica to panic, and require a human's intervention to intervene 431 # and fix the corruption 432 recoverdamage: true 433 434 # The number of blocks to retrieve per sync request 435 blocksperrequest: 20 436 437 # The maximum number of state deltas to attempt to retrieve 438 # If more than this number of deltas is required to play the state up to date 439 # then instead the state will be flagged as invalid, and a full copy of the state 440 # will be retrieved instead 441 maxdeltas: 200 442 443 # Timeouts 444 timeout: 445 446 # How long may returning a single block take 447 singleblock: 2s 448 449 # How long may returning a single state delta take 450 singlestatedelta: 2s 451 452 # How long may transferring the complete state take 453 fullstate: 60s