Skip to content

Instantly share code, notes, and snippets.

@twoneks
Forked from RealDeanZhao/network-config.yaml
Created November 29, 2018 10:57
Show Gist options
  • Save twoneks/e3497ca750436e99d07cfc68e5eca603 to your computer and use it in GitHub Desktop.
Save twoneks/e3497ca750436e99d07cfc68e5eca603 to your computer and use it in GitHub Desktop.
network-config.yaml
---
name: "xyd-themis"
x-type: "hlfv1"
description: "Themis Network"
version: "1.0"
client:
organization: xiaoyudian
logging:
level: debug
credentialStore:
path: /tmp/xiaoyudian/state-store
cryptoStore:
path: /tmp/xiaoyudian/msp
BCCSP:
security:
enabled: true
default:
provider: "SW"
hashAlgorithm: "SHA2"
softVerify: true
level: 256
# 请参考pkg/fab/endpointconfig.go的代码
peer:
timeout:
connection: 50s
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: 50s
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: 50s
response: 50s
global:
timeout:
query: 180s
execute: 180s
resmgmt: 360s
cache:
connectionIdle: 30s
eventServiceIdle: 2m
channelConfig: 30m
channelMembership: 30s
discovery: 10s
selection: 10m
channels:
mychannel:
peers:
peer1-xiaoyudian:
endorsingPeer: true
chaincodeQuery: true
ledgerQuery: true
eventSource: true
peer2-xiaoyudian:
endorsingPeer: false
chaincodeQuery: true
ledgerQuery: true
eventSource: false
peer1-jinzun:
endorsingPeer: true
chaincodeQuery: true
ledgerQuery: true
eventSource: true
peer2-jinzun:
endorsingPeer: false
chaincodeQuery: true
ledgerQuery: true
eventSource: false
organizations:
xiaoyudian:
mspid: xiaoyudianMSP
peers:
- peer1-xiaoyudian
- peer2-xiaoyudian
certificateAuthorities:
- ica-xiaoyudian
cryptoPath: xiaoyudian/users/${username}/msp
jinzun:
mspid: jinzunMSP
peers:
- peer1-jinzun
- peer2-jinzun
certificateAuthorities:
- ica-jinzun
cryptoPath: jinzun/users/${username}/msp
themis:
mspID: themisMSP
certificateAuthorities:
- ica-themis
cryptoPath: themis/users/${username}/msp
orderers:
orderer1-themis:
url: grpcs://orderer1-themis:7050
grpcOptions:
ssl-target-name-override: orderer1-themis
grpc-max-send-message-length: 15
tlsCACerts:
path: ${GOPATH}/src/themis.xyd.cn/themis/bootstrap/data/orgs/themis/msp/tlscacerts/ica-themis-7054.pem
peers:
peer1-xiaoyudian:
url: grpcs://localhost:7051
eventUrl: grpcs://localhost:7053
grpcOptions:
ssl-target-name-override: peer1-xiaoyudian
keep-alive-time: 20s
keep-alive-timeout: 60s
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/themis.xyd.cn/themis/bootstrap/data/tls/peer1-xiaoyudian-client.crt
path: ${GOPATH}/src/themis.xyd.cn/themis/bootstrap/data/orgs/xiaoyudian/msp/tlscacerts/ica-xiaoyudian-7054.pem
# client:
# key:
# path: ${GOPATH}/src/themis.xyd.cn/themis/bootstrap/data/tls/peer1-xiaoyudian-client.key
# cert:
# path: ${GOPATH}/src/themis.xyd.cn/themis/bootstrap/data/tls/peer1-xiaoyudian-client.crt
peer2-xiaoyudian:
url: grpcs://localhost:8051
eventUrl: grpcs://localhost:8053
grpcOptions:
ssl-target-name-override: peer2-xiaoyudian
keep-alive-time: 20s
keep-alive-timeout: 60s
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/themis.xyd.cn/themis/bootstrap/data/tls/peer2-xiaoyudian-client.crt
path: ${GOPATH}/src/themis.xyd.cn/themis/bootstrap/data/orgs/xiaoyudian/msp/tlscacerts/ica-xiaoyudian-7054.pem
# client:
# key:
# path: ${GOPATH}/src/themis.xyd.cn/themis/bootstrap/data/tls/peer2-xiaoyudian-client.key
# cert:
# path: ${GOPATH}/src/themis.xyd.cn/themis/bootstrap/data/tls/peer2-xiaoyudian-client.crt
peer1-jinzun:
url: grpcs://localhost:7151
eventUrl: grpcs://localhost:7153
grpcOptions:
ssl-target-name-override: peer1-jinzun
keep-alive-time: 20s
keep-alive-timeout: 60s
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/themis.xyd.cn/themis/bootstrap/data/tls/peer1-jinzun-client.crt
path: ${GOPATH}/src/themis.xyd.cn/themis/bootstrap/data/orgs/jinzun/msp/tlscacerts/ica-jinzun-7054.pem
# client:
# key:
# path: ${GOPATH}/src/themis.xyd.cn/themis/bootstrap/data/tls/peer1-jinzun-client.key
# cert:
# path: ${GOPATH}/src/themis.xyd.cn/themis/bootstrap/data/tls/peer1-jinzun-client.crt
peer2-jinzun:
url: grpcs://localhost:8151
eventUrl: grpcs://localhost:8153
grpcOptions:
ssl-target-name-override: peer2-jinzun
keep-alive-time: 20s
keep-alive-timeout: 60s
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/themis.xyd.cn/themis/bootstrap/data/tls/peer2-jinzun-client.crt
path: ${GOPATH}/src/themis.xyd.cn/themis/bootstrap/data/orgs/jinzun/msp/tlscacerts/ica-jinzun-7054.pem
# client:
# key:
# path: ${GOPATH}/src/themis.xyd.cn/themis/bootstrap/data/tls/peer2-jinzun-client.key
# cert:
# path: ${GOPATH}/src/themis.xyd.cn/themis/bootstrap/data/tls/peer2-jinzun-client.crt
certificateAuthorities:
ica-themis:
url: https://localhost:7054
tlsCACerts:
path: ${GOPATH}/src/themis.xyd.cn/themis/bootstrap/data/themis-ca-chain.pem
registrar:
enrollId: ica-themis-admin
enrollSecret: ica-themis-adminpw
caName: ica-themis
ica-xiaoyudian:
url: https://localhost:8054
tlsCACerts:
path: ${GOPATH}/src/themis.xyd.cn/themis/bootstrap/data/xiaoyudian-ca-chain.pem
registrar:
enrollId: ica-xiaoyudian-admin
enrollSecret: ica-xiaoyudian-adminpw
caName: ica-xiaoyudian
ica-jinzun:
url: https://localhost:9054
tlsCACerts:
path: ${GOPATH}/src/themis.xyd.cn/themis/bootstrap/data/jinzun-ca-chain.pem
registrar:
enrollId: ica-jinzun-admin
enrollSecret: ica-jinzun-adminpw
caName: ica-jinzun
entityMatchers:
peer:
- pattern: peer1-xiaoyudian
urlSubstitutionExp: peer1-xiaoyudian:7051
sslTargetOverrideUrlSubstitutionExp: peer1-xiaoyudian
mappedHost: peer1-xiaoyudian
- pattern: peer2-xiaoyudian
urlSubstitutionExp: peer2-xiaoyudian:8051
sslTargetOverrideUrlSubstitutionExp: peer2-xiaoyudian
mappedHost: peer2-xiaoyudian
- pattern: peer1-jinzun
urlSubstitutionExp: peer1-jinzun:7151
sslTargetOverrideUrlSubstitutionExp: peer1-jinzun
mappedHost: peer1-jinzun
- pattern: peer2-jinzun
urlSubstitutionExp: peer2-jinzun:8151
sslTargetOverrideUrlSubstitutionExp: peer2-jinzun
mappedHost: peer2-jinzun
orderer:
- pattern: orderer1-themis
urlSubstitutionExp: orderer1-themis:7050
sslTargetOverrideUrlSubstitutionExp: orderer1-themis
mappedHost: orderer1-themis
certificateAuthority:
- pattern: ica-themis
urlSubstitutionExp: ica-themis:7054
mappedHost: ica-themis
- pattern: ica-xiaoyudian
urlSubstitutionExp: ica-xiaoyudian:8054
mappedHost: ica-xiaoyudian
- pattern: ica-jinzun
urlSubstitutionExp: ica-jinzun:9054
mappedHost: ica-jinzun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment