github.com/adnan-c/fabric_e2e_couchdb@v0.6.1-preview.0.20170228180935-21ce6b23cf91/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:        warning
   143      chaincode: warning
   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  
   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: hyperledger/fabric-ccenv:$(ARCH)-$(PROJECT_VERSION)
   354  
   355      golang:
   356          # golang will never need more than baseos
   357          runtime: hyperledger/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: hyperledger/fabric-baseos:$(ARCH)-$(BASE_VERSION)
   363  
   364      # timeout in millisecs for starting up a container and waiting for Register
   365      # to come through. 1sec should be plenty for chaincode unit tests
   366      startuptimeout: 1000
   367  
   368      #timeout in millisecs for deploying chaincode from a remote repository.
   369      deploytimeout: 60000
   370  
   371      #mode - options are "dev", "net"
   372      #dev - in dev mode, user runs the chaincode after starting validator from
   373      # command line on local machine
   374      #net - in net mode validator will run chaincode in a docker container
   375  
   376      mode: net
   377      # typically installpath should not be modified. Otherwise, user must ensure
   378      # the chaincode executable is placed in the path specifed by installpath in
   379      # the image
   380      installpath: /opt/gopath/bin/
   381  
   382      #keepalive in seconds. In situations where the communiction goes through a
   383      #proxy that does not support keep-alive, this parameter will maintain connection
   384      #between peer and chaincode.
   385      #A value <= 0 turns keepalive off
   386      keepalive: 1
   387  
   388      # system chaincodes whitelist. To add system chaincode "myscc" to the
   389      # whitelist, add "myscc: enable" to the list
   390      system:
   391          cscc: enable
   392          lccc: enable
   393          escc: enable
   394          vscc: enable
   395  ###############################################################################
   396  #
   397  #    Ledger section - ledger configuration encompases both the blockchain
   398  #    and the state
   399  #
   400  ###############################################################################
   401  ledger:
   402  
   403    blockchain:
   404  
   405      # Setting the deploy-system-chaincode property to false will prevent the
   406      # deploying of system chaincode at genesis time.
   407      deploy-system-chaincode: false
   408  
   409    state:
   410  
   411      # Control the number state deltas that are maintained. This takes additional
   412      # disk space, but allow the state to be rolled backwards and forwards
   413      # without the need to replay transactions.
   414      deltaHistorySize: 500
   415  
   416      # The data structure in which the state will be stored. Different data
   417      # structures may offer different performance characteristics.
   418      # Options are 'buckettree', 'trie' and 'raw'.
   419      # ( Note:'raw' is experimental and incomplete. )
   420      # If not set, the default data structure is the 'buckettree'.
   421      # This CANNOT be changed after the DB has been created.
   422      dataStructure:
   423        # The name of the data structure is for storing the state
   424        name: buckettree
   425        # The data structure specific configurations
   426        configs:
   427          # configurations for 'bucketree'. These CANNOT be changed after the DB
   428          # has been created. 'numBuckets' defines the number of bins that the
   429          # state key-values are to be divided
   430          numBuckets: 1000003
   431          # 'maxGroupingAtEachLevel' defines the number of bins that are grouped
   432          #together to construct next level of the merkle-tree (this is applied
   433          # repeatedly for constructing the entire tree).
   434          maxGroupingAtEachLevel: 5
   435          # 'bucketCacheSize' defines the size (in MBs) of the cache that is used to keep
   436          # the buckets (from root upto secondlast level) in memory. This cache helps
   437          # in making state hash computation faster. A value less than or equals to zero
   438          # leads to disabling this caching. This caching helps more if transactions
   439          # perform significant writes.
   440          bucketCacheSize: 100
   441  
   442          # configurations for 'trie'
   443          # 'tire' has no additional configurations exposed as yet
   444  
   445  
   446  ################################################################################
   447  #
   448  #   SECTION: STATETRANSFER
   449  #
   450  #   - This applies to recovery behavior when the replica has detected
   451  #     a state transfer is required
   452  #
   453  #   - This might happen:
   454  #     - During a view change in response to a faulty primary
   455  #     - After a network outage which has isolated the replica
   456  #     - If the current blockchain/state is determined to be corrupt
   457  #
   458  ################################################################################
   459  statetransfer:
   460  
   461      # Should a replica attempt to fix damaged blocks?
   462      # In general, this should be set to true, setting to false will cause
   463      # the replica to panic, and require a human's intervention to intervene
   464      # and fix the corruption
   465      recoverdamage: true
   466  
   467      # The number of blocks to retrieve per sync request
   468      blocksperrequest: 20
   469  
   470      # The maximum number of state deltas to attempt to retrieve
   471      # If more than this number of deltas is required to play the state up to date
   472      # then instead the state will be flagged as invalid, and a full copy of the state
   473      # will be retrieved instead
   474      maxdeltas: 200
   475  
   476      # Timeouts
   477      timeout:
   478  
   479          # How long may returning a single block take
   480          singleblock: 2s
   481  
   482          # How long may returning a single state delta take
   483          singlestatedelta: 2s
   484  
   485          # How long may transferring the complete state take
   486          fullstate: 60s