github.com/darrenli6/fabric-sdk-example@v0.0.0-20220109053535-94b13b56df8c/imocc/application/config.yaml (about)

     1  #
     2  # Copyright SecureKey Technologies Inc. All Rights Reserved.
     3  #
     4  # SPDX-License-Identifier: Apache-2.0
     5  #
     6  #
     7  # The network connection profile provides client applications the information about the target
     8  # blockchain network that are necessary for the applications to interact with it. These are all
     9  # knowledge that must be acquired from out-of-band sources. This file provides such a source.
    10  #
    11  
    12  
    13  #
    14  # Schema version of the content. Used by the SDK to apply the corresponding parsing rules.
    15  #
    16  version: 1.0.0
    17  
    18  #
    19  # The client section used by GO SDK.
    20  #
    21  client:
    22  
    23    # Which organization does this application instance belong to? The value must be the name of an org
    24    # defined under "organizations"
    25    organization: org1
    26  
    27    logging:
    28      level: debug
    29  
    30    # Global configuration for peer, event service and orderer timeouts
    31    # if this this section is omitted, then default values will be used (same values as below)
    32  #  peer:
    33  #    timeout:
    34  #      connection: 10s
    35  #      response: 180s
    36  #      discovery:
    37  #        # Expiry period for discovery service greylist filter
    38  #        # The channel client will greylist peers that are found to be offline
    39  #        # to prevent re-selecting them in subsequent retries.
    40  #        # This interval will define how long a peer is greylisted
    41  #        greylistExpiry: 10s
    42    eventService:
    43      # Event service type (optional). If not specified then the type is automatically
    44      # determined from channel capabilities.
    45      type: eventhub
    46      # the below timeouts are commented out to use the default values that are found in
    47      # "pkg/fab/endpointconfig.go"
    48      # the client is free to override the default values by uncommenting and resetting
    49      # the values as they see fit in their config file
    50  #    timeout:
    51  #      connection: 15s
    52  #      registrationResponse: 15s
    53  #  orderer:
    54  #    timeout:
    55  #      connection: 15s
    56  #      response: 15s
    57  #  global:
    58  #    timeout:
    59  #      query: 180s
    60  #      execute: 180s
    61  #      resmgmt: 180s
    62  #    cache:
    63  #      connectionIdle: 30s
    64  #      eventServiceIdle: 2m
    65  #      channelConfig: 30m
    66  #      channelMembership: 30s
    67  #      discovery: 10s
    68  #      selection: 10m
    69  
    70    # Root of the MSP directories with keys and certs.
    71    cryptoconfig:
    72      path: ${GOPATH}/src/github.com/hyperledger/fabric/imocc/deploy/crypto-config
    73  
    74    # Some SDKs support pluggable KV stores, the properties under "credentialStore"
    75    # are implementation specific
    76    credentialStore:
    77      # [Optional]. Used by user store. Not needed if all credentials are embedded in configuration
    78      # and enrollments are performed elswhere.
    79      path: "/tmp/state-store"
    80  
    81      # [Optional]. Specific to the CryptoSuite implementation used by GO SDK. Software-based implementations
    82      # requiring a key store. PKCS#11 based implementations does not.
    83      cryptoStore:
    84        # Specific to the underlying KeyValueStore that backs the crypto key store.
    85        path: /tmp/msp
    86  
    87     # BCCSP config for the client. Used by GO SDK.
    88    BCCSP:
    89      security:
    90       enabled: true
    91       default:
    92        provider: "SW"
    93       hashAlgorithm: "SHA2"
    94       softVerify: true
    95       level: 256
    96  
    97    tlsCerts:
    98      # [Optional]. Use system certificate pool when connecting to peers, orderers (for negotiating TLS) Default: false
    99      systemCertPool: true
   100  
   101      # [Optional]. Client key and cert for TLS handshake with peers and orderers
   102      client:
   103        key:
   104          path: ${GOPATH}/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/config/mutual_tls/client_sdk_go-key.pem
   105        cert:
   106          path: ${GOPATH}/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/config/mutual_tls/client_sdk_go.pem
   107  
   108  #
   109  # [Optional]. But most apps would have this section so that channel objects can be constructed
   110  # based on the content below. If an app is creating channels, then it likely will not need this
   111  # section.
   112  #
   113  channels:
   114    # name of the channel
   115    assetschannel:
   116      # Required. list of orderers designated by the application to use for transactions on this
   117      # channel. This list can be a result of access control ("org1" can only access "ordererA"), or
   118      # operational decisions to share loads from applications among the orderers.  The values must
   119      # be "names" of orgs defined under "organizations/peers"
   120      # deprecated: not recommended, to override any orderer configuration items, entity matchers should be used.
   121      orderers:
   122        - orderer.imocc.com
   123  
   124      # Required. list of peers from participating orgs
   125      peers:
   126        peer0.org1.imocc.com:
   127          # [Optional]. will this peer be sent transaction proposals for endorsement? The peer must
   128          # have the chaincode installed. The app can also use this property to decide which peers
   129          # to send the chaincode install request. Default: true
   130          endorsingPeer: true
   131  
   132          # [Optional]. will this peer be sent query proposals? The peer must have the chaincode
   133          # installed. The app can also use this property to decide which peers to send the
   134          # chaincode install request. Default: true
   135          chaincodeQuery: true
   136  
   137          # [Optional]. will this peer be sent query proposals that do not require chaincodes, like
   138          # queryBlock(), queryTransaction(), etc. Default: true
   139          ledgerQuery: true
   140  
   141          # [Optional]. will this peer be the target of the SDK's listener registration? All peers can
   142          # produce events but the app typically only needs to connect to one to listen to events.
   143          # Default: true
   144          eventSource: true
   145  
   146        peer1.org1.imocc.com:
   147          # [Optional]. will this peer be sent transaction proposals for endorsement? The peer must
   148          # have the chaincode installed. The app can also use this property to decide which peers
   149          # to send the chaincode install request. Default: true
   150          endorsingPeer: true
   151  
   152          # [Optional]. will this peer be sent query proposals? The peer must have the chaincode
   153          # installed. The app can also use this property to decide which peers to send the
   154          # chaincode install request. Default: true
   155          chaincodeQuery: true
   156  
   157          # [Optional]. will this peer be sent query proposals that do not require chaincodes, like
   158          # queryBlock(), queryTransaction(), etc. Default: true
   159          ledgerQuery: true
   160  
   161          # [Optional]. will this peer be the target of the SDK's listener registration? All peers can
   162          # produce events but the app typically only needs to connect to one to listen to events.
   163          # Default: true
   164          eventSource: true
   165  
   166      # [Optional]. The application can use these options to perform channel operations like retrieving channel
   167      # config etc.
   168      policies:
   169        #[Optional] options for retrieving channel configuration blocks
   170        queryChannelConfig:
   171          #[Optional] min number of success responses (from targets/peers)
   172          minResponses: 1
   173          #[Optional] channel config will be retrieved for these number of random targets
   174          maxTargets: 1
   175          #[Optional] retry options for query config block
   176          retryOpts:
   177            #[Optional] number of retry attempts
   178            attempts: 5
   179            #[Optional] the back off interval for the first retry attempt
   180            initialBackoff: 500ms
   181            #[Optional] the maximum back off interval for any retry attempt
   182            maxBackoff: 5s
   183            #[Optional] he factor by which the initial back off period is exponentially incremented
   184            backoffFactor: 2.0
   185  
   186  
   187  #
   188  # list of participating organizations in this network
   189  #
   190  organizations:
   191    org1:
   192      mspid: Org1MSP
   193  
   194      # This org's MSP store (absolute path or relative to client.cryptoconfig)
   195      cryptoPath:  peerOrganizations/org1.imocc.com/users/{username}@org1.imocc.com/msp
   196  
   197      peers:
   198        - peer0.org1.imocc.com
   199        #- peer1.org1.imocc.com
   200  
   201      # [Optional]. Certificate Authorities issue certificates for identification purposes in a Fabric based
   202      # network. Typically certificates provisioning is done in a separate process outside of the
   203      # runtime network. Fabric-CA is a special certificate authority that provides a REST APIs for
   204      # dynamic certificate management (enroll, revoke, re-enroll). The following section is only for
   205      # Fabric-CA servers.
   206      certificateAuthorities:
   207        #- ca.org1.example.com
   208  
   209    # Orderer Org name
   210    ordererorg:
   211        # Membership Service Provider ID for this organization
   212        mspID: "OrdererMSP"
   213  
   214        # Needed to load users crypto keys and certs for this org (absolute path or relative to global crypto path, DEV mode)
   215        cryptoPath: ordererOrganizations/imocc.com/users/{username}@imocc.com/msp
   216  
   217  
   218  #
   219  # List of orderers to send transaction and channel create/update requests to. For the time
   220  # being only one orderer is needed. If more than one is defined, which one get used by the
   221  # SDK is implementation specific. Consult each SDK's documentation for its handling of orderers.
   222  #
   223  orderers:
   224    orderer.imocc.com:
   225      url: 127.0.0.1:7050
   226  
   227      # these are standard properties defined by the gRPC library
   228      # they will be passed in as-is to gRPC client constructor
   229      grpcOptions:
   230        ssl-target-name-override: orderer.imocc.com
   231        # These parameters should be set in coordination with the keepalive policy on the server,
   232        # as incompatible settings can result in closing of connection.
   233        # When duration of the 'keep-alive-time' is set to 0 or less the keep alive client parameters are disabled
   234        keep-alive-time: 0s
   235        keep-alive-timeout: 20s
   236        keep-alive-permit: false
   237        fail-fast: false
   238        # allow-insecure will be taken into consideration if address has no protocol defined, if true then grpc or else grpcs
   239        allow-insecure: true # 非tls连接
   240  
   241      tlsCACerts:
   242        # Certificate location absolute path
   243        path: ${GOPATH}/src/github.com/hyperledger/fabric-sdk-go/${CRYPTOCONFIG_FIXTURES_PATH}/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem
   244  
   245  #
   246  # List of peers to send various requests to, including endorsement, query
   247  # and event listener registration.
   248  #
   249  peers:
   250    peer0.org1.imocc.com:
   251      # this URL is used to send endorsement and query requests
   252      url: 127.0.0.1:27051
   253      # eventUrl is only needed when using eventhub (default is delivery service)
   254      eventUrl: 127.0.0.1:27053
   255  
   256      grpcOptions:
   257        ssl-target-name-override: peer0.org1.imocc.com
   258        # These parameters should be set in coordination with the keepalive policy on the server,
   259        # as incompatible settings can result in closing of connection.
   260        # When duration of the 'keep-alive-time' is set to 0 or less the keep alive client parameters are disabled
   261        keep-alive-time: 0s
   262        keep-alive-timeout: 20s
   263        keep-alive-permit: false
   264        fail-fast: false
   265        # allow-insecure will be taken into consideration if address has no protocol defined, if true then grpc or else grpcs
   266        allow-insecure: true
   267  
   268      tlsCACerts:
   269        # Certificate location absolute path
   270        path: ${GOPATH}/src/github.com/hyperledger/fabric-sdk-go/${CRYPTOCONFIG_FIXTURES_PATH}/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem
   271  
   272  #  peer1.org1.imocc.com:
   273  #    # this URL is used to send endorsement and query requests
   274  #    url: 127.0.0.1:37051
   275  #    # eventUrl is only needed when using eventhub (default is delivery service)
   276  #    eventUrl: 127.0.0.1:37053
   277  #
   278  #    grpcOptions:
   279  #      ssl-target-name-override: peer1.org1.imocc.com
   280  #      # These parameters should be set in coordination with the keepalive policy on the server,
   281  #      # as incompatible settings can result in closing of connection.
   282  #      # When duration of the 'keep-alive-time' is set to 0 or less the keep alive client parameters are disabled
   283  #      keep-alive-time: 0s
   284  #      keep-alive-timeout: 20s
   285  #      keep-alive-permit: false
   286  #      fail-fast: false
   287  #      # allow-insecure will be taken into consideration if address has no protocol defined, if true then grpc or else grpcs
   288  #      allow-insecure: true
   289  #
   290  #    tlsCACerts:
   291  #      # Certificate location absolute path
   292  #      path: ${GOPATH}/src/github.com/hyperledger/fabric-sdk-go/${CRYPTOCONFIG_FIXTURES_PATH}/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem
   293