github.com/vijaypunugubati/fabric@v2.0.0-alpha.0.20200109185758-70466159f5b3+incompatible/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 seperation 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 Peerand is generally supplied through ENV variables
   291      # the Path form of ID is provided when deploying the chaincode. The name is
   292      # used for all other requests. The name is really a hashcode
   293      # returned by the system in response to the deploy transaction. In
   294      # development mode where user runs the chaincode, the name can be any string
   295      id:
   296          path:
   297          name:
   298  
   299      # Generic builder environment, suitable for most chaincode types
   300      builder: $(DOCKER_NS)/fabric-ccenv:$(PROJECT_VERSION)
   301  
   302      golang:
   303          # golang will never need more than baseos
   304          runtime: $(DOCKER_NS)/fabric-baseos:$(PROJECT_VERSION)
   305          dynamicLink: true
   306  
   307      car:
   308          # car may need more facilities (JVM, etc) in the future as the catalog
   309          # of platforms are expanded.  For now, we can just use baseos
   310          runtime: $(DOCKER_NS)/fabric-baseos:$(PROJECT_VERSION)
   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:latest
   318  
   319      node:
   320          # This is an image based on node:${NODE_VER}-alpine
   321          runtime: $(DOCKER_NS)/fabric-nodeenv:latest
   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 communiction 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      # system chaincodes whitelist. To add system chaincode "myscc" to the
   354      # whitelist, add "myscc: enable" to the list
   355      system:
   356          cscc: enable
   357          lscc: enable
   358          escc: enable
   359          vscc: enable
   360  
   361      # Logging section for the chaincode container
   362      logging:
   363        # Default level for all loggers within the chaincode container
   364        level:  info
   365        # Override default level for the 'shim' logger
   366        shim:   warning
   367        # Format for the chaincode container logs
   368        format: '%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message}'
   369  
   370  ###############################################################################
   371  #
   372  #    Ledger section - ledger configuration encompases both the blockchain
   373  #    and the state
   374  #
   375  ###############################################################################
   376  ledger:
   377  
   378    blockchain:
   379  
   380    state:
   381      # stateDatabase - options are "goleveldb", "CouchDB"
   382      # goleveldb - default state database stored in goleveldb.
   383      # CouchDB - store state database in CouchDB
   384      stateDatabase: goleveldb
   385      couchDBConfig:
   386         couchDBAddress: 127.0.0.1:5984
   387         username:
   388         password:
   389         # Number of retries for CouchDB errors
   390         maxRetries: 3
   391         # Number of retries for CouchDB errors during peer startup
   392         maxRetriesOnStartup: 10
   393         # CouchDB request timeout (unit: duration, e.g. 20s)
   394         requestTimeout: 35s
   395         # Limit on the number of records to return per query
   396         queryLimit: 10000
   397         # Limit on the number of records per CouchDB bulk update batch
   398         maxBatchUpdateSize: 500
   399         # Warm indexes after every N blocks.
   400         # This option warms any indexes that have been
   401         # deployed to CouchDB after every N blocks.
   402         # A value of 1 will warm indexes after every block commit,
   403         # to ensure fast selector queries.
   404         # Increasing the value may improve write efficiency of peer and CouchDB,
   405         # but may degrade query response time.
   406         warmIndexesAfterNBlocks: 1
   407  
   408    history:
   409      # enableHistoryDatabase - options are true or false
   410      # Indicates if the history of key updates should be stored in goleveldb
   411      enableHistoryDatabase: true
   412  
   413  
   414  ################################################################################
   415  #
   416  #   SECTION: STATETRANSFER
   417  #
   418  #   - This applies to recovery behavior when the replica has detected
   419  #     a state transfer is required
   420  #
   421  #   - This might happen:
   422  #     - During a view change in response to a faulty primary
   423  #     - After a network outage which has isolated the replica
   424  #     - If the current blockchain/state is determined to be corrupt
   425  #
   426  ################################################################################
   427  statetransfer:
   428  
   429      # Should a replica attempt to fix damaged blocks?
   430      # In general, this should be set to true, setting to false will cause
   431      # the replica to panic, and require a human's intervention to intervene
   432      # and fix the corruption
   433      recoverdamage: true
   434  
   435      # The number of blocks to retrieve per sync request
   436      blocksperrequest: 20
   437  
   438      # The maximum number of state deltas to attempt to retrieve
   439      # If more than this number of deltas is required to play the state up to date
   440      # then instead the state will be flagged as invalid, and a full copy of the state
   441      # will be retrieved instead
   442      maxdeltas: 200
   443  
   444      # Timeouts
   445      timeout:
   446  
   447          # How long may returning a single block take
   448          singleblock: 2s
   449  
   450          # How long may returning a single state delta take
   451          singlestatedelta: 2s
   452  
   453          # How long may transferring the complete state take
   454          fullstate: 60s