github.com/adnan-c/fabric_e2e_couchdb@v0.6.1-preview.0.20170228180935-21ce6b23cf91/examples/chaincode/go/asset_management02/asset.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: "/tmp/hyperledger/production"
    12          cadir: ".membersrvc"
    13  
    14          # port the CA services are listening on
    15          port: ":7054"
    16  
    17          # TLS certificate and key file paths
    18          tls:
    19  #              certfile: "/var/hyperledger/production/.ca/tlsca.cert"
    20  #              keyfile: "/var/hyperledger/production/.ca/tlsca.priv"
    21  
    22  security:
    23      # Can be 256 or 384
    24      # Must be the same as in core.yaml
    25      level: 256
    26  
    27  # Enabling/disabling different logging levels of the CA.
    28  #
    29  logging:
    30          trace: 0
    31          info: 1
    32          warning: 1
    33          error: 1
    34          panic: 1
    35  
    36  # TCA configuration for attribute encryption
    37  tca:
    38      # Enabling/disabling attributes encryption, if is enabled attributes within the certificate will be encrypted using a specific key for each attribute,
    39      # in otherwise cleartext attribute value will be added into the certificate.
    40      attribute-encryption:
    41          enabled: false
    42  
    43  # Default attributes for Attribute Certificate Authority
    44  aca:
    45      attributes:
    46          attribute-entry-0: admin;bank_a;role;issuer;2015-01-01T00:00:00-03:00;;
    47          attribute-entry-1: alice;bank_a;role;client;2016-01-01T00:00:00-03:00;;
    48          attribute-entry-2: alice;bank_a;account1;22222-00001;2016-01-01T00:00:00-03:00;;
    49          attribute-entry-3: alice;bank_a;account2;22222-00002;2016-01-01T00:00:00-03:00;;
    50          attribute-entry-4: alice;bank_a;account3;22222-00003;2016-01-01T00:00:00-03:00;;
    51          attribute-entry-5: alice;bank_a;account4;22222-00004;2016-01-01T00:00:00-03:00;;
    52          attribute-entry-6: alice;bank_a;contactInfo;alice@gmail.com;2016-01-01T00:00:00-03:00;;
    53          attribute-entry-7: bob;bank_a;role;client;2015-02-02T00:00:00-03:00;;
    54          attribute-entry-8: bob;bank_a;account1;11111-00001;2016-01-01T00:00:00-03:00;;
    55          attribute-entry-9: bob;bank_a;account2;11111-00002;2015-02-02T00:00:00-03:00;;
    56          attribute-entry-10: bob;bank_a;account3;11111-00003;2015-02-02T00:00:00-03:00;;
    57          attribute-entry-11: bob;bank_a;contactInfo;bob@yahoo.com;2015-02-02T00:00:00-03:00;;
    58  
    59      address: localhost:7054
    60      server-name: acap
    61      enabled: true
    62  
    63  # Default users to be registered with the CA on first launch.  The role is a binary OR
    64  # of the different roles a user can have:
    65  #
    66  # - simple client such as a wallet: CLIENT
    67  # - non-validating peer: PEER
    68  # - validating client: VALIDATOR
    69  # - auditing client: AUDITOR
    70  #
    71  eca:
    72          affiliations:
    73             banks_and_institutions:
    74                banks:
    75                    - bank_a
    76                    - bank_b
    77                    - bank_c
    78                institutions:
    79                    - institution_a
    80          users:
    81                  # <EnrollmentID>: <role (1:client, 2: peer, 4: validator, 8: auditor)> <EnrollmentPWD> <Affiliation> <Affiliation_Role>
    82                  alice: 1 NPKYL39uKbkj bank_a
    83                  bob: 1 DRJ23pEQl16a bank_a
    84                  admin: 1 6avZQLwcUe9b bank_a
    85  
    86                  vp: 4 f3489fy98ghf
    87  
    88  pki:
    89            validity-period:
    90                   # Setting the update property will prevent the invocation of the update_validity_period system chaincode to update the validity period.
    91                   update: false
    92                   chaincodeHash: 6091c3abd07c18edd6ef48ae24cfe409522f7defb51e4103dfa61ca3012386380c1b179f904375e253f20f4b2c5c848299988e65d8b80cb3f6b3d848b6fb2230
    93                   # TLS Settings for communications to update the validity period
    94                   tls:
    95                           enabled: false
    96                           cert:
    97                                  file: testdata/server1.pem
    98                           key:
    99                                  file: testdata/server1.key
   100                           # The server name use to verify the hostname returned by TLS handshake
   101                           server-host-override:
   102                   devops-address: 0.0.0.0:40404
   103  
   104  
   105  ###############################################################################
   106  #
   107  #    CLI section
   108  #
   109  ###############################################################################
   110  cli:
   111  
   112      # The address that the cli process will use for callbacks from chaincodes
   113      address: 0.0.0.0:7052
   114  
   115  
   116  
   117  ###############################################################################
   118  #
   119  #    REST section
   120  #
   121  ###############################################################################
   122  rest:
   123  
   124      # Enable/disable setting for the REST service. It is recommended to disable
   125      # REST service on validators in production deployment and use non-validating
   126      # nodes to host REST service
   127      enabled: true
   128  
   129      # The address that the REST service will listen on for incoming requests.
   130      address: 0.0.0.0:7050
   131  
   132  
   133  ###############################################################################
   134  #
   135  #    LOGGING section
   136  #
   137  ###############################################################################
   138  logging:
   139  
   140      # Valid logging levels are case-insensitive strings chosen from
   141  
   142      #     CRITICAL | ERROR | WARNING | NOTICE | INFO | DEBUG
   143  
   144      # Logging 'module' names are also strings, however valid module names are
   145      # defined at runtime and are not checked for validity during option
   146      # processing.
   147  
   148      # Default logging levels are specified here for each of the obc-peer
   149      # commands. For commands that have subcommands, the defaults also apply to
   150      # all subcommands of the command. These logging levels can be overridden
   151      # on the command line using the --logging-level command-line option, or by
   152      # setting the CORE_LOGGING_LEVEL environment variable.
   153  
   154      # The logging level specification is of the form
   155  
   156      #     [<module>[,<module>...]=]<level>[:[<module>[,<module>...]=]<level>...]
   157  
   158      # A logging level by itself is taken as the overall default. Otherwise,
   159      # overrides for individual or groups of modules can be specified using the
   160      # <module>[,<module>...]=<level> syntax.
   161  
   162      # Examples:
   163      #   info                                       - Set default to INFO
   164      #   warning:main,db=debug:chaincode=info       - Override default WARNING in main,db,chaincode
   165      #   chaincode=info:main=debug:db=debug:warning - Same as above
   166      peer:      debug
   167      crypto:    debug
   168      status:    warning
   169      stop:      warning
   170      login:     warning
   171      vm:        warning
   172      chaincode: warning
   173  
   174  
   175  ###############################################################################
   176  #
   177  #    Peer section
   178  #
   179  ###############################################################################
   180  peer:
   181  
   182      # Peer Version following version semantics as described here http://semver.org/
   183      # The Peer supplies this version in communications with other Peers
   184      version:  0.1.0
   185  
   186      # The Peer id is used for identifying this Peer instance.
   187      id: jdoe
   188  
   189      # The privateKey to be used by this peer
   190      # privateKey: 794ef087680e2494fa4918fd8fb80fb284b50b57d321a31423fe42b9ccf6216047cea0b66fe8365a8e3f2a8140c6866cc45852e63124668bee1daa9c97da0c2a
   191  
   192      # The networkId allows for logical seperation of networks
   193      # networkId: dev
   194      # networkId: test
   195      networkId: dev
   196  
   197      Dockerfile:  |
   198          from golang:1.7
   199          # Install RocksDB
   200          RUN cd /opt  && git clone --branch v4.1 --single-branch --depth 1 https://github.com/facebook/rocksdb.git && cd rocksdb
   201          WORKDIR /opt/rocksdb
   202          RUN make shared_lib
   203          ENV LD_LIBRARY_PATH=/opt/rocksdb:$LD_LIBRARY_PATH
   204          RUN apt-get update && apt-get install -y libsnappy-dev zlib1g-dev libbz2-dev
   205          # Copy GOPATH src and install Peer
   206          COPY src $GOPATH/src
   207          RUN mkdir -p /var/hyperledger/db
   208          WORKDIR $GOPATH/src/github.com/hyperledger/fabric/
   209          RUN CGO_CFLAGS="-I/opt/rocksdb/include" CGO_LDFLAGS="-L/opt/rocksdb -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy" go install && cp $GOPATH/src/github.com/hyperledger/fabric/core.yaml $GOPATH/bin
   210  
   211      # The Address this Peer will listen on
   212      listenAddress: 0.0.0.0:40404
   213      # The Address this Peer will bind to for providing services
   214      address: 0.0.0.0:40404
   215      # Whether the Peer should programmatically determine the address to bind to.
   216      # This case is useful for docker containers.
   217      addressAutoDetect: true
   218  
   219      # Peer port to accept connections on
   220      port:    40404
   221      # Peer's setting for GOMAXPROCS
   222      gomaxprocs: 2
   223      workers: 2
   224  
   225      # Sync related configuration
   226      sync:
   227          blocks:
   228              # Channel size for readonly SyncBlocks messages channel for receiving
   229              # blocks from oppositie Peer Endpoints.
   230              # NOTE: currently messages are not stored and forwarded, but rather
   231              # lost if the channel write blocks.
   232              channelSize: 10
   233          state:
   234              snapshot:
   235                  # Channel size for readonly syncStateSnapshot messages channel
   236                  # for receiving state deltas for snapshot from oppositie Peer Endpoints.
   237                  # NOTE: currently messages are not stored and forwarded, but
   238                  # rather lost if the channel write blocks.
   239                  channelSize: 50
   240              deltas:
   241                  # Channel size for readonly syncStateDeltas messages channel for
   242                  # receiving state deltas for a syncBlockRange from oppositie
   243                  # Peer Endpoints.
   244                  # NOTE: currently messages are not stored and forwarded,
   245                  # but rather lost if the channel write blocks.
   246                  channelSize: 20
   247  
   248      # Validator defines whether this peer is a validating peer or not, and if
   249      # it is enabled, what consensus plugin to load
   250      validator:
   251          enabled: true
   252  
   253          # Consensus plugin to use. The value is the name of the plugin, e.g. pbft, noops
   254          # if the given value is not recognized, we will default to noops
   255          consensus: noops
   256  
   257          events:
   258              # The address that the Event service will be enabled on the validator
   259              address: 0.0.0.0:7053
   260  
   261              # total number of events that could be buffered without blocking the
   262              # validator sends
   263              buffersize: 100
   264  
   265              # milliseconds timeout for producer to send an event.
   266              # if < 0, if buffer full, unblocks immediately and not send
   267              # if 0, if buffer full, will block and guarantee the event will be sent out
   268              # if > 0, if buffer full, blocks till timeout
   269              timeout: 10
   270          # Setting the validity-period.verification to false will disable the verification
   271          # of the validity period in the validator
   272          validity-period:
   273              verification: false
   274  
   275      # TLS Settings for p2p communications
   276      tls:
   277          enabled:  false
   278          cert:
   279              file: testdata/server1.pem
   280          key:
   281              file: testdata/server1.key
   282          # The server name use to verify the hostname returned by TLS handshake
   283          server-host-override:
   284  
   285      # PKI member services properties
   286      pki:
   287          eca:
   288              paddr: localhost:7054
   289          tca:
   290              paddr: localhost:7054
   291          tlsca:
   292              paddr: localhost:7054
   293          tls:
   294              enabled: false
   295              rootcert:
   296                  file: tlsca.cert
   297              # The server name use to verify the hostname returned by TLS handshake
   298              server-host-override:
   299  
   300      # Peer discovery settings.  Controls how this peer discovers other peers
   301      discovery:
   302  
   303          # The root nodes are used for bootstrapping purposes, and generally
   304          # supplied through ENV variables
   305          rootnode:
   306  
   307          # The duration of time between attempts to asks peers for their connected peers
   308          period:  5s
   309  
   310          ## leaving this in for example of sub map entry
   311          # testNodes:
   312          #    - node   : 1
   313          #      ip     : 127.0.0.1
   314          #      port   : 40404
   315          #    - node   : 2
   316          #      ip     : 127.0.0.1
   317          #      port   : 40404
   318  
   319          # Should the discovered nodes and their reputations
   320          # be stored in DB and persisted between restarts
   321          persist:    true
   322  
   323          # if peer discovery is off
   324          # the peer window will show
   325          # only what retrieved by active
   326          # peer [true/false]
   327          enabled:    true
   328  
   329          # number of workers that
   330          # tastes the peers for being
   331          # online [1..10]
   332          workers: 8
   333  
   334          # the period in seconds with which the discovery
   335          # tries to reconnect to successful nodes
   336          # 0 means the nodes are not reconnected
   337          touchPeriod: 600
   338  
   339          # the maximum nuber of nodes to reconnect to
   340          # -1 for unlimited
   341          touchMaxNodes: 100
   342  
   343      # Path on the file system where peer will store data
   344      # fileSystemPath: .hyperledger/production
   345  
   346      # Path on the file system where peer will store data
   347      fileSystemPath: /tmp/hyperledger/production
   348  
   349  ###############################################################################
   350  #
   351  #    VM section
   352  #
   353  ###############################################################################
   354  vm:
   355  
   356      # Endpoint of the vm management system.  For docker can be one of the following in general
   357      # unix:///var/run/docker.sock
   358      # http://localhost:2375
   359      # https://localhost:2376
   360      endpoint: unix:///var/run/docker.sock
   361  
   362      # settings for docker vms
   363      docker:
   364          tls:
   365              enabled: false
   366              cert:
   367                  file: /path/to/server.pem
   368              ca:
   369                  file: /path/to/ca.pem
   370              key:
   371                  file: /path/to/server-key.pem
   372  
   373  ###############################################################################
   374  #
   375  #    Chaincode section
   376  #
   377  ###############################################################################
   378  chaincode:
   379  
   380      # The id is used by the Chaincode stub to register the executing Chaincode
   381      # ID with the Peerand is generally supplied through ENV variables
   382      # the Path form of ID is provided when deploying the chaincode. The name is
   383      # used for all other requests. The name is really a hashcode
   384      # returned by the system in response to the deploy transaction. In
   385      # development mode where user runs the chaincode, the name can be any string
   386      id:
   387          path:
   388          name: mycc
   389  
   390      golang:
   391  
   392          # This is the basis for the Golang Dockerfile.  Additional commands will
   393          # be appended depedendent upon the chaincode specification.
   394          Dockerfile:  |
   395              from golang:1.7
   396              COPY src $GOPATH/src
   397              WORKDIR $GOPATH
   398  
   399      # timeout in millisecs for starting up a container and waiting for Register
   400      # to come through. 1sec should be plenty for chaincode unit tests
   401      startuptimeout: 1000
   402  
   403      #timeout in millisecs for deploying chaincode from a remote repository.
   404      deploytimeout: 30000
   405  
   406      #mode - options are "dev", "net"
   407      #dev - in dev mode, user runs the chaincode after starting validator from
   408      # command line on local machine
   409      #net - in net mode validator will run chaincode in a docker container
   410  
   411      mode: net
   412  
   413      installpath: /go/bin/
   414  
   415  ###############################################################################
   416  #
   417  #    Ledger section - ledger configuration encompases both the blockchain
   418  #    and the state
   419  #
   420  ###############################################################################
   421  ledger:
   422  
   423    blockchain:
   424  
   425      # Setting the deploy-system-chaincode property to false will prevent the
   426      # deploying of system chaincode at genesis time.
   427      deploy-system-chaincode: false
   428  
   429    state:
   430  
   431      # Control the number state deltas that are maintained. This takes additional
   432      # disk space, but allow the state to be rolled backwards and forwards
   433      # without the need to replay transactions.
   434      deltaHistorySize: 500
   435  
   436      # The data structure in which the state will be stored. Different data
   437      # structures may offer different performance characteristics. Options are
   438      # 'buckettree' and 'trie'. If not set, the default data structure is the
   439      # 'buckettree'. This CANNOT be changed after the DB has been created.
   440      dataStructure:
   441        # The name of the data structure is for storing the state
   442        name: buckettree
   443        # The data structure specific configurations
   444        configs:
   445          # configurations for 'bucketree'. These CANNOT be changed after the DB
   446          # has been created. 'numBuckets' defines the number of bins that the
   447          # state key-values are to be divided
   448          numBuckets: 10009
   449          # 'maxGroupingAtEachLevel' defines the number of bins that are grouped
   450          #together to construct next level of the merkle-tree (this is applied
   451          # repeatedly for constructing the entire tree).
   452          maxGroupingAtEachLevel: 10
   453  
   454          # configurations for 'trie'
   455          # 'tire' has no additional configurations exposed as yet
   456  
   457  
   458  ###############################################################################
   459  #
   460  #    Security section - Applied to all entities (client, NVP, VP)
   461  #
   462  ###############################################################################
   463  security:
   464      # Enable security will force every entity on the network to enroll with obc-ca
   465      # and maintain a valid set of certificates in order to communicate with
   466      # other peers
   467      enabled: true
   468      # To enroll NVP or VP with membersrvc. These parameters are for 1 time use.
   469      # They will not be valid on subsequent times without un-enroll first.
   470      # The values come from off-line registration with obc-ca. For testing, make
   471      # sure the values are in membersrvc/membersrvc.yaml file eca.users
   472      enrollID: vp
   473      enrollSecret: f3489fy98ghf
   474      # To enable privacy of transactions (requires security to be enabled). This
   475      # encrypts the transaction content during transit and at rest. The state
   476      # data is also encrypted
   477      privacy: true
   478  
   479      # Can be 256 or 384. If you change here, you have to change also
   480      # the same property in membersrvc.yaml to the same value
   481      level: 256
   482  
   483      # TCerts related configuration
   484      tcert:
   485        batch:
   486          # The size of the batch of TCerts
   487          size:  2
   488  
   489      attributes:
   490        enabled: true