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