Created
July 31, 2019 10:39
-
-
Save prayagsingh/8a6280a9833b28c0cef4ea43385a5352 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copyright SecureKey Technologies Inc. All Rights Reserved. | |
# | |
# SPDX-License-Identifier: Apache-2.0 | |
# | |
# | |
# The network connection profile provides client applications the information about the target | |
# blockchain network that are necessary for the applications to interact with it. These are all | |
# knowledge that must be acquired from out-of-band sources. This file provides such a source. | |
# | |
# | |
# Schema version of the content. Used by the SDK to apply the corresponding parsing rules. | |
# | |
version: 1.0.0 | |
# | |
# The client section used by GO SDK. | |
# | |
client: | |
# Which organization does this application instance belong to? The value must be the name of an org | |
# defined under "organizations" | |
organization: Seller | |
logging: | |
level: debug | |
# Global configuration for peer, event service and orderer timeouts | |
# if this this section is omitted, then default values will be used (same values as below) | |
peer: | |
timeout: | |
connection: 10s | |
response: 180s | |
discovery: | |
# # Expiry period for discovery service greylist filter | |
# # The channel client will greylist peers that are found to be offline | |
# # to prevent re-selecting them in subsequent retries. | |
# # This interval will define how long a peer is greylisted | |
greylistExpiry: 10s | |
eventService: | |
# the below timeouts are commented out to use the default values that are found in | |
# "pkg/fab/endpointconfig.go" | |
# the client is free to override the default values by uncommenting and resetting | |
# the values as they see fit in their config file | |
type: deliver | |
timeout: | |
registrationResponse: 15s | |
orderer: | |
timeout: | |
connection: 15s | |
response: 15s | |
global: | |
timeout: | |
query: 180s | |
execute: 180s | |
resmgmt: 180s | |
cache: | |
connectionIdle: 30s | |
eventServiceIdle: 2m | |
channelConfig: 30m | |
channelMembership: 30s | |
discovery: 10s | |
selection: 10m | |
# Root of the MSP directories with keys and certs. | |
cryptoconfig: | |
path: ${GOPATH}/src/github.com/hyperledger/myproject/network/crypto-config | |
#path: /c/Projects/Go/src/github.com/hyperledger/myproject/network/crypto-config | |
# Some SDKs support pluggable KV stores, the properties under "credentialStore" | |
# are implementation specific | |
credentialStore: | |
# [Optional]. Used by user store. Not needed if all credentials are embedded in configuration | |
# and enrollments are performed elswhere. | |
path: "/tmp/myproject-state-store" | |
# [Optional]. Specific to the CryptoSuite implementation used by GO SDK. Software-based implementations | |
# requiring a key store. PKCS#11 based implementations does not. | |
cryptoStore: | |
# Specific to the underlying KeyValueStore that backs the crypto key store. | |
path: /tmp/msp | |
# [Optional] BCCSP config for the client. Used by GO SDK. | |
BCCSP: | |
security: | |
enabled: true | |
default: | |
provider: "SW" | |
hashAlgorithm: "SHA2" | |
softVerify: true | |
level: 256 | |
tlsCerts: | |
# [Optional]. Use system certificate pool when connecting to peers, orderers (for negotiating TLS) Default: false | |
systemCertPool: true | |
# [Optional]. Client key and cert for TLS handshake with peers and orderers | |
client: | |
key: | |
#path: ${FABRIC_SDK_GO_PROJECT_PATH}/${CRYPTOCONFIG_FIXTURES_PATH}/peerOrganizations/tls.example.com/users/User1@tls.example.com/tls/client.key | |
cert: | |
#path: ${FABRIC_SDK_GO_PROJECT_PATH}/${CRYPTOCONFIG_FIXTURES_PATH}/peerOrganizations/tls.example.com/users/User1@tls.example.com/tls/client.crt | |
# | |
# [Optional]. But most apps would have this section so that channel objects can be constructed | |
# based on the content below. If an app is creating channels, then it likely will not need this | |
# section. | |
# | |
channels: | |
# Default channel is used if channel configuration is missing or if defined channel configuration is missing info | |
# If channel doesn't define peers then peers from default channel will be used | |
# If channel doesn't define orderes then orderes from default channel will be used | |
# If channel doesn't define policies then policies from default channel will be used. | |
# Also, if channel defines policies and some policy info is missing than that missing info will be filled from default channel. | |
mychannel: | |
# Optional. list of peers from participating orgs | |
peers: | |
peer0.seller.mytrade.com: | |
endorsingPeer: true | |
chaincodeQuery: true | |
ledgerQuery: true | |
eventSource: true | |
peer1.seller.mytrade.com: | |
endorsingPeer: true | |
chaincodeQuery: true | |
ledgerQuery: true | |
eventSource: true | |
peer0.buyer.mytrade.com: | |
endorsingPeer: true | |
chaincodeQuery: true | |
ledgerQuery: true | |
eventSource: true | |
peer1.buyer.mytrade.com: | |
endorsingPeer: true | |
chaincodeQuery: true | |
ledgerQuery: true | |
eventSource: true | |
# [Optional]. The application can use these options to perform channel operations like retrieving channel | |
# config etc. | |
policies: | |
#[Optional] options for retrieving channel configuration blocks | |
queryChannelConfig: | |
#[Optional] min number of success responses (from targets/peers) | |
minResponses: 1 | |
#[Optional] channel config will be retrieved for these number of random targets | |
maxTargets: 1 | |
#[Optional] retry options for query config block | |
retryOpts: | |
#[Optional] number of retry attempts | |
attempts: 5 | |
#[Optional] the back off interval for the first retry attempt | |
initialBackoff: 500ms | |
#[Optional] the maximum back off interval for any retry attempt | |
maxBackoff: 5s | |
#[Optional] he factor by which the initial back off period is exponentially incremented | |
backoffFactor: 2.0 | |
#[Optional] options for retrieving discovery info | |
discovery: | |
#[Optional] discovery info will be retrieved for these number of random targets | |
maxTargets: 2 | |
#[Optional] retry options for retrieving discovery info | |
retryOpts: | |
#[Optional] number of retry attempts | |
attempts: 4 | |
#[Optional] the back off interval for the first retry attempt | |
initialBackoff: 500ms | |
#[Optional] the maximum back off interval for any retry attempt | |
maxBackoff: 5s | |
#[Optional] he factor by which the initial back off period is exponentially incremented | |
backoffFactor: 2.0 | |
#[Optional] options for the event service | |
eventService: | |
# [Optional] resolverStrategy specifies the peer resolver strategy to use when connecting to a peer | |
# Possible values: [PreferOrg (default), MinBlockHeight, Balanced] | |
# | |
# PreferOrg: | |
# Determines which peers are suitable based on block height lag threshold, although will prefer the peers in the | |
# current org (as long as their block height is above a configured threshold). If none of the peers from the current org | |
# are suitable then a peer from another org is chosen. | |
# MinBlockHeight: | |
# Chooses the best peer according to a block height lag threshold. The maximum block height of all peers is | |
# determined and the peers whose block heights are under the maximum height but above a provided "lag" threshold are load | |
# balanced. The other peers are not considered. | |
# Balanced: | |
# Chooses peers using the configured balancer. | |
resolverStrategy: PreferOrg | |
# [Optional] balancer is the balancer to use when choosing a peer to connect to | |
# Possible values: [Random (default), RoundRobin] | |
balancer: Random | |
# [Optional] blockHeightLagThreshold sets the block height lag threshold. This value is used for choosing a peer | |
# to connect to. If a peer is lagging behind the most up-to-date peer by more than the given number of | |
# blocks then it will be excluded from selection. | |
# Note that this parameter is applicable only when minBlockHeightResolverMode is set to ResolveByThreshold. | |
# Default: 5 | |
blockHeightLagThreshold: 5 | |
# [Optional] reconnectBlockHeightLagThreshold - the event client will disconnect from the peer if the peer's | |
# block height falls behind the specified number of blocks and will reconnect to a better performing peer. | |
# Note that this parameter is only applicable if peerMonitor is set to Enabled (default). | |
# Default: 10 | |
# NOTES: | |
# - Setting this value too low may cause the event client to disconnect/reconnect too frequently, thereby | |
# affecting performance. | |
reconnectBlockHeightLagThreshold: 8 | |
# [Optional] peerMonitorPeriod is the period in which the connected peer is monitored to see if | |
# the event client should disconnect from it and reconnect to another peer. | |
# Default: 0 (disabled) for Balanced resolverStrategy; 5s for PreferOrg and MinBlockHeight strategy | |
peerMonitorPeriod: 6s | |
# | |
# list of participating organizations in this network | |
# | |
organizations: | |
Seller: | |
mspid: SellerMSP | |
# This org's MSP store (absolute path or relative to client.cryptoconfig) | |
cryptoPath: peerOrganizations/seller.mytrade.com/users/{username}@seller.mytrade.com/msp | |
peers: | |
- peer0.seller.mytrade.com | |
- peer1.seller.mytrade.com | |
# [Optional]. Certificate Authorities issue certificates for identification purposes in a Fabric based | |
# network. Typically certificates provisioning is done in a separate process outside of the | |
# runtime network. Fabric-CA is a special certificate authority that provides a REST APIs for | |
# dynamic certificate management (enroll, revoke, re-enroll). The following section is only for | |
# Fabric-CA servers. | |
certificateAuthorities: | |
- ca-seller | |
# the profile will contain public information about organizations other than the one it belongs to. | |
# These are necessary information to make transaction lifecycles work, including MSP IDs and | |
# peers with a public URL to send transaction proposals. The file will not contain private | |
# information reserved for members of the organization, such as admin key and certificate, | |
# fabric-ca registrar enroll ID and secret, etc. | |
Buyer: | |
mspid: BuyerMSP | |
# This org's MSP store (absolute path or relative to client.cryptoconfig) | |
cryptoPath: peerOrganizations/buyer.mytrade.com/users/{username}@buyer.mytrade.com/msp | |
peers: | |
- peer0.buyer.mytrade.com | |
- peer1.buyer.mytrade.com | |
certificateAuthorities: | |
- ca.buyer | |
# Orderer Org name | |
ordererorg: | |
# Membership Service Provider ID for this organization | |
mspID: OrdererMSP | |
# Needed to load users crypto keys and certs for this org (absolute path or relative to global crypto path, DEV mode) | |
cryptoPath: ordererOrganizations/mytrade.com/users/Admin@mytrade.com/msp | |
# | |
# List of orderers to send transaction and channel create/update requests to. For the time | |
# being only one orderer is needed. If more than one is defined, which one get used by the | |
# SDK is implementation specific. Consult each SDK's documentation for its handling of orderers. | |
# | |
orderers: | |
orderer.mytrade.com: | |
# [Optional] Default: Infer from hostname | |
url: grpcs://localhost:7050 | |
# these are standard properties defined by the gRPC library | |
# they will be passed in as-is to gRPC client constructor | |
grpcOptions: | |
ssl-target-name-override: orderer.mytrade.com | |
# These parameters should be set in coordination with the keepalive policy on the server, | |
# as incompatible settings can result in closing of connection. | |
# When duration of the 'keep-alive-time' is set to 0 or less the keep alive client parameters are disabled | |
keep-alive-time: 0s | |
keep-alive-timeout: 20s | |
keep-alive-permit: false | |
fail-fast: false | |
# allow-insecure will be taken into consideration if address has no protocol defined, if true then grpc or else grpcs | |
allow-insecure: false | |
tlsCACerts: | |
# Certificate location absolute path | |
path: ${GOPATH}/src/github.com/hyperledger/myproject/network/crypto-config/ordererOrganizations/mytrade.com/tlsca/tlsca.mytrade.com-cert.pem | |
# | |
# List of peers to send various requests to, including endorsement, query | |
# and event listener registration. | |
# | |
peers: | |
peer0.seller.mytrade.com: | |
# this URL is used to send endorsement and query requests | |
# [Optional] Default: Infer from hostname | |
url: grpcs://localhost:7051 | |
#eventUrl: grpcs://localhost:7053 | |
grpcOptions: | |
ssl-target-name-override: peer0.seller.mytrade.com | |
# These parameters should be set in coordination with the keepalive policy on the server, | |
# as incompatible settings can result in closing of connection. | |
# When duration of the 'keep-alive-time' is set to 0 or less the keep alive client parameters are disabled | |
keep-alive-time: 0s | |
keep-alive-timeout: 20s | |
keep-alive-permit: false | |
fail-fast: false | |
# allow-insecure will be taken into consideration if address has no protocol defined, if true then grpc or else grpcs | |
allow-insecure: false | |
tlsCACerts: | |
# Certificate location absolute path | |
path: ${GOPATH}/src/github.com/hyperledger/myproject/network/crypto-config/peerOrganizations/seller.mytrade.com/tlsca/tlsca.seller.mytrade.com-cert.pem | |
peer1.seller.mytrade.com: | |
# this URL is used to send endorsement and query requests | |
url: grpcs://localhost:8051 | |
#eventUrl: grpcs://localhost:8053 | |
grpcOptions: | |
ssl-target-name-override: peer1.seller.mytrade.com | |
# These parameters should be set in coordination with the keepalive policy on the server, | |
# as incompatible settings can result in closing of connection. | |
# When duration of the 'keep-alive-time' is set to 0 or less the keep alive client parameters are disabled | |
keep-alive-time: 0s | |
keep-alive-timeout: 20s | |
keep-alive-permit: false | |
fail-fast: false | |
# allow-insecure will be taken into consideration if address has no protocol defined, if true then grpc or else grpcs | |
allow-insecure: false | |
tlsCACerts: | |
# Certificate location absolute path | |
path: ${GOPATH}/src/github.com/hyperledger/myproject/network/crypto-config/peerOrganizations/seller.mytrade.com/tlsca/tlsca.seller.mytrade.com-cert.pem | |
peer0.buyer.mytrade.com: | |
url: grpcs://localhost:9051 | |
grpcOptions: | |
ssl-target-name-override: peer0.buyer.mytrade.com | |
# These parameters should be set in coordination with the keepalive policy on the server, | |
# as incompatible settings can result in closing of connection. | |
# When duration of the 'keep-alive-time' is set to 0 or less the keep alive client parameters are disabled | |
keep-alive-time: 0s | |
keep-alive-timeout: 20s | |
keep-alive-permit: false | |
fail-fast: false | |
# allow-insecure will be taken into consideration if address has no protocol defined, if true then grpc or else grpcs | |
allow-insecure: false | |
tlsCACerts: | |
path: ${GOPATH}/src/github.com/hyperledger/myproject/network/crypto-config/peerOrganizations/buyer.mytrade.com/tlsca/tlsca.buyer.mytrade.com-cert.pem | |
peer1.buyer.mytrade.com: | |
url: grpcs://localhost:10051 | |
#eventUrl: grpcs://localhost:10053 | |
grpcOptions: | |
ssl-target-name-override: peer1.buyer.mytrade.com | |
# These parameters should be set in coordination with the keepalive policy on the server, | |
# as incompatible settings can result in closing of connection. | |
# When duration of the 'keep-alive-time' is set to 0 or less the keep alive client parameters are disabled | |
keep-alive-time: 0s | |
keep-alive-timeout: 20s | |
keep-alive-permit: false | |
fail-fast: false | |
# allow-insecure will be taken into consideration if address has no protocol defined, if true then grpc or else grpcs | |
allow-insecure: false | |
tlsCACerts: | |
path: ${GOPATH}/src/github.com/hyperledger/myproject/network/crypto-config/peerOrganizations/buyer.mytrade.com/tlsca/tlsca.buyer.mytrade.com-cert.pem | |
# | |
# Fabric-CA is a special kind of Certificate Authority provided by Hyperledger Fabric which allows | |
# certificate management to be done via REST APIs. Application may choose to use a standard | |
# Certificate Authority instead of Fabric-CA, in which case this section would not be specified. | |
# | |
certificateAuthorities: | |
ca-seller: | |
# [Optional] Default: Infer from hostname | |
url: https://localhost:7054 | |
tlsCACerts: | |
# Comma-Separated list of paths | |
path: ${GOPATH}/src/github.com/hyperledger/myproject/network/crypto-config/peerOrganizations/seller.mytrade.com/tlsca/tlsca.seller.mytrade.com-cert.pem | |
# Client key and cert for SSL handshake with Fabric CA | |
client: | |
key: | |
path: ${GOPATH}/src/github.com/hyperledger/myproject/network/crypto-config/peerOrganizations/seller.mytrade.com/users/User1@seller.mytrade.com/tls/client.key | |
cert: | |
path: ${GOPATH}/src/github.com/hyperledger/myproject/network/crypto-config/peerOrganizations/seller.mytrade.com/users/User1@seller.mytrade.com/tls/client.crt | |
# Fabric-CA supports dynamic user enrollment via REST APIs. A "root" user, a.k.a registrar, is | |
# needed to enroll and invoke new users. | |
registrar: | |
enrollId: admin | |
enrollSecret: adminpw | |
# [Optional] The optional name of the CA. | |
caName: ca-seller | |
ca-buyer: | |
url: https://localhost:8054 | |
tlsCACerts: | |
# Comma-Separated list of paths | |
path: ${GOPATH}/src/github.com/hyperledger/myproject/network/crypto-config/peerOrganizations/buyer.mytrade.com/tlsca/tlsca.buyer.mytrade.com-cert.pem | |
# Client key and cert for SSL handshake with Fabric CA | |
client: | |
key: | |
path: ${GOPATH}/src/github.com/hyperledger/myproject/network/crypto-config/peerOrganizations/buyer.mytrade.com/users/User1@buyer.mytrade.com/tls/client.key | |
cert: | |
path: ${GOPATH}/src/github.com/hyperledger/myproject/network/crypto-config/peerOrganizations/buyer.mytrade.com/users/User1@buyer.mytrade.com/tls/client.crt | |
# Fabric-CA supports dynamic user enrollment via REST APIs. A "root" user, a.k.a registrar, is | |
# needed to enroll and invoke new users. | |
registrar: | |
enrollId: admin | |
enrollSecret: adminpw | |
# [Optional] The optional name of the CA. | |
caName: ca-buyer | |
# EntityMatchers enable substitution of network hostnames with static configurations | |
# so that properties can be mapped. Regex can be used for this purpose | |
# UrlSubstitutionExp can be empty which means the same network hostname will be used | |
# UrlSubstitutionExp can be given same as mapped peer url, so that mapped peer url can be used | |
# UrlSubstitutionExp can have golang regex matchers like ${1}.local.example.${2}:${3} for pattern | |
# like peer0.org1.example.com:1234 which converts peer0.org1.example.com to peer0.org1.local.example.com:1234 | |
# sslTargetOverrideUrlSubstitutionExp follow in the same lines as | |
# SubstitutionExp for the fields gprcOptions.ssl-target-name-override respectively | |
# In any case mappedHost's config will be used, so mapped host cannot be empty, if entityMatchers are used | |
#entityMatchers: | |
entityMatchers: | |
peer: | |
- pattern: peer0.seller.mytrade.com | |
urlSubstitutionExp: grpcs://localhost:7051 | |
sslTargetOverrideUrlSubstitutionExp: peer0.seller.mytrade.com | |
mappedHost: peer0.seller.mytrade.com | |
- pattern: peer0.seller.mytrade.com:(\d+) | |
urlSubstitutionExp: grpcs://localhost:7051 | |
sslTargetOverrideUrlSubstitutionExp: peer0.seller.mytrade.com | |
mappedHost: peer0.seller.mytrade.com | |
- pattern: peer1.seller.mytrade.com | |
urlSubstitutionExp: grpcs://localhost:8051 | |
sslTargetOverrideUrlSubstitutionExp: peer1.seller.mytrade.com | |
mappedHost: peer1.seller.mytrade.com | |
- pattern: peer1.seller.mytrade.com:(\d+) | |
urlSubstitutionExp: grpcs://localhost:8051 | |
sslTargetOverrideUrlSubstitutionExp: peer1.seller.mytrade.com | |
mappedHost: peer1.seller.mytrade.com | |
- pattern: peer0.buyer.mytrade.com | |
urlSubstitutionExp: grpcs://localhost:9051 | |
sslTargetOverrideUrlSubstitutionExp: peer0.buyer.mytrade.com | |
mappedHost: peer0.buyer.mytrade.com | |
- pattern: peer0.buyer.mytrade.com:(\d+) | |
urlSubstitutionExp: grpcs://localhost:9051 | |
sslTargetOverrideUrlSubstitutionExp: peer0.buyer.mytrade.com | |
mappedHost: peer0.buyer.mytrade.com | |
- pattern: peer1.buyer.mytrade.com | |
urlSubstitutionExp: grpcs://localhost:10051 | |
sslTargetOverrideUrlSubstitutionExp: peer1.buyer.mytrade.com | |
mappedHost: peer1.buyer.mytrade.com | |
- pattern: peer1.buyer.mytrade.com:(\d+) | |
urlSubstitutionExp: grpcs://localhost:10051 | |
sslTargetOverrideUrlSubstitutionExp: peer1.buyer.mytrade.com | |
mappedHost: peer1.buyer.mytrade.com | |
orderer: | |
- pattern: orderer.mytrade.com | |
urlSubstitutionExp: grpcs://localhost:7050 | |
sslTargetOverrideUrlSubstitutionExp: orderer.mytrade.com | |
mappedHost: orderer.mytrade.com | |
- pattern: orderer.mytrade.com:(\d+) | |
urlSubstitutionExp: grpcs://localhost:7050 | |
sslTargetOverrideUrlSubstitutionExp: orderer.mytrade.com | |
mappedHost: orderer.mytrade.com | |
certificateAuthority: | |
- pattern: (\w+).seller.mytrade.(\w+) | |
urlSubstitutionExp: https://localhost:7054 | |
sslTargetOverrideUrlSubstitutionExp: ca.seller.mytrade.com | |
mappedHost: ca.seller.mytrade.com | |
- pattern: (\w+).buyer.mytrade.(\w+) | |
urlSubstitutionExp: https://localhost:8054 | |
sslTargetOverrideUrlSubstitutionExp: ca.buyer.mytrade.com | |
mappedHost: ca.buyer.mytrade.com | |
- pattern: (\w+).seller.mytrade.(\w+):(\d+) | |
urlSubstitutionExp: https://localhost:7054 | |
sslTargetOverrideUrlSubstitutionExp: ca.seller.mytrade.com | |
mappedHost: ca.seller.mytrade.com | |
- pattern: (\w+).buyer.mytrade.(\w+):(\d+) | |
urlSubstitutionExp: https://localhost:8054 | |
sslTargetOverrideUrlSubstitutionExp: ca.buyer.mytrade.com | |
mappedHost: ca.buyer.mytrade.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment