Created
December 26, 2018 12:54
-
-
Save javapriyan/7975d60b794b6b7440a017c6dd28a085 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
name: "mycompany-network" | |
# | |
# 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: brand | |
logging: | |
level: info | |
# 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: | |
# # Event service type (optional). If not specified then the type is automatically | |
# # determined from channel capabilities. | |
# type: (deliver|eventhub) | |
# 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 | |
# timeout: | |
# connection: 15s | |
# 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/mycompany-network/crypto-config/ | |
# Some SDKs support pluggable KV stores, the properties under "credentialStore" | |
# are implementation specific | |
credentialStore: | |
path: /tmp/mycompany-service-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: | |
path: /tmp/mycompany-service-msp | |
# 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: false | |
# [Optional]. Client key and cert for TLS handshake with peers and orderers | |
client: | |
keyfile: | |
certfile: | |
# | |
# [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: | |
# name of the channel | |
tt-chann: | |
# Required. list of orderers designated by the application to use for transactions on this | |
# channel. This list can be a result of access control ("brand" can only access "ordererA"), or | |
# operational decisions to share loads from applications among the orderers. The values must | |
# be "names" of orgs defined under "organizations/peers" | |
# deprecated: not recommended, to override any orderer configuration items, entity matchers should be used. | |
# orderers: | |
# - orderer.example.com | |
# Required. list of peers from participating orgs | |
peers: | |
peer0.brand.mycompany.io: | |
# [Optional]. will this peer be sent transaction proposals for endorsement? The peer must | |
# have the chaincode installed. The app can also use this property to decide which peers | |
# to send the chaincode install request. Default: true | |
endorsingPeer: true | |
# [Optional]. will this peer be sent query proposals? The peer must have the chaincode | |
# installed. The app can also use this property to decide which peers to send the | |
# chaincode install request. Default: true | |
chaincodeQuery: true | |
# [Optional]. will this peer be sent query proposals that do not require chaincodes, like | |
# queryBlock(), queryTransaction(), etc. Default: true | |
ledgerQuery: true | |
# [Optional]. will this peer be the target of the SDK's listener registration? All peers can | |
# produce events but the app typically only needs to connect to one to listen to events. | |
# Default: true | |
eventSource: true | |
peer1.brand.mycompany.io: | |
# [Optional]. will this peer be sent transaction proposals for endorsement? The peer must | |
# have the chaincode installed. The app can also use this property to decide which peers | |
# to send the chaincode install request. Default: true | |
endorsingPeer: true | |
# [Optional]. will this peer be sent query proposals? The peer must have the chaincode | |
# installed. The app can also use this property to decide which peers to send the | |
# chaincode install request. Default: true | |
chaincodeQuery: true | |
# [Optional]. will this peer be sent query proposals that do not require chaincodes, like | |
# queryBlock(), queryTransaction(), etc. Default: true | |
ledgerQuery: true | |
# [Optional]. will this peer be the target of the SDK's listener registration? All peers can | |
# produce events but the app typically only needs to connect to one to listen to events. | |
# Default: true | |
eventSource: true | |
policies: | |
discovery: | |
#[Optional] discovery info will be retrieved for these number of random targets | |
maxTargets: 2 | |
#[Optional] retry options for retriving 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 selection service | |
selection: | |
#[Optional] endorser selection sorting strategy. Possible values: [BlockHeightPriority,Balanced] | |
SortingStrategy: BlockHeightPriority | |
#[Optional] load-balancer type. Possible values: [RoundRobin,Random] | |
Balancer: RoundRobin | |
#[Optional] the number of blocks from the highest block number of a group of peers that a peer | |
#can lag behind and still be considered to be up-to-date. These peers will be sorted using the | |
#given Balancer. If a peer's block height falls behind this threshold then it will be demoted | |
#to a lower priority list of peers which will be sorted according to block height. | |
#Note: This property only applies to BlockHeightPriority sorter. | |
BlockHeightLagThreshold: 5 | |
#[Optional] options for retrieving cha#[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 | |
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: RoundRobin | |
# [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: 2 | |
# [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: 5 | |
# [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: 3s | |
# | |
# list of participating organizations in this network | |
# | |
organizations: | |
brand: | |
mspid: brand.mycompany.io | |
cryptoPath: peerOrganizations/brand.mycompany.io/users/{userName}@brand.mycompany.io/msp | |
peers: | |
- peer0.brand.mycompany.io | |
- peer1.brand.mycompany.io | |
# [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.brand.mycompany.io | |
# | |
# 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.mycompany.io: | |
url: 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.mycompany.io | |
# 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/mycompany-network/crypto-config/ordererOrganizations/mycompany.io/tlsca/tlsca.mycompany.io-cert.pem | |
# | |
# List of peers to send various requests to, including endorsement, query | |
# and event listener registration. | |
# | |
peers: | |
peer0.brand.mycompany.io: | |
# this URL is used to send endorsement and query requests | |
url: localhost:7051 | |
# eventUrl is only needed when using eventhub (default is delivery service) | |
eventUrl: localhost:7053 | |
grpcOptions: | |
ssl-target-name-override: peer0.brand.mycompany.io | |
# 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/mycompany-network/crypto-config/peerOrganizations/brand.mycompany.io/tlsca/tlsca.brand.mycompany.io-cert.pem | |
peer1.brand.mycompany.io: | |
# this URL is used to send endorsement and query requests | |
url: localhost:8051 | |
# eventUrl is only needed when using eventhub (default is delivery service) | |
eventUrl: localhost:8053 | |
grpcOptions: | |
ssl-target-name-override: peer1.brand.mycompany.io | |
# 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/mycompany-network/crypto-config/peerOrganizations/brand.mycompany.io/tlsca/tlsca.brand.mycompany.io-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.brand.mycompany.io: | |
url: http://localhost:7054 | |
# Fabric-CA supports dynamic user enrollment via REST APIs. A "root" user, a.k.a registrar, is | |
# needed to enroll and invoke new users. | |
httpOptions: | |
verify: false | |
registrar: | |
enrollId: admin | |
enrollSecret: adminpw | |
# [Optional] The optional name of the CA. | |
caName: ca.brand.mycompany.io | |
tlsCACerts: | |
# Certificate location absolute path | |
path: ${GOPATH}/src/mycompany-network/crypto-config/peerOrganizations/brand.mycompany.io/ca/ca.brand.mycompany.io-cert.pem | |
entityMatchers: | |
peer: | |
- pattern: (\w*)peer0.brand.mycompany.io(\w*) | |
urlSubstitutionExp: localhost:7051 | |
eventUrlSubstitutionExp: localhost:7053 | |
sslTargetOverrideUrlSubstitutionExp: peer0.brand.mycompany.io | |
mappedHost: peer0.brand.mycompany.io | |
- pattern: (\w*)peer1.brand.mycompany.io(\w*) | |
urlSubstitutionExp: localhost:8051 | |
eventUrlSubstitutionExp: localhost:8053 | |
sslTargetOverrideUrlSubstitutionExp: peer1.brand.mycompany.io | |
mappedHost: peer1.brand.mycompany.io | |
orderer: | |
- pattern: (\w*)orderer.mycompany.io(\w*) | |
urlSubstitutionExp: localhost:7050 | |
sslTargetOverrideUrlSubstitutionExp: orderer.mycompany.io | |
mappedHost: orderer.mycompany.io | |
certificateAuthorities: | |
- pattern: (\w*)ca.brand.mycompany.io(\w*) | |
urlSubstitutionExp: http://localhost:7054 | |
mappedHost: ca.brand.mycompany.io |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment