zoukankan      html  css  js  c++  java
  • fabric-sdk-go config详解

      1 name: "chaoyang-prescription-network"
      2 description: "chao yang hospital prescription network"
      3 version: 1.0.0
      4 client:
      5   organization: cyorg.bjgoodwill.com
      6   logging:
      7     level: info
      8   cryptoconfig:
      9     path: ${GOPATH}/src/github.com/prescriptionserver/client/go/crypto-config
     10     #path: /opt/app/fabric/cli/user/cyorg.bjgoodwill.com/Admin-peer0cyorg.bjgoodwill..com
     11   credentialStore:
     12     path: /tmp/state-store
     13     cryptoStore:
     14       path: /tmp/msp
     15   BCCSP:
     16     security:
     17      enabled: true
     18      default:
     19       provider: "SW"
     20      hashAlgorithm: "SHA2"
     21      softVerify: true
     22      level: 256
     23   tlsCerts:
     24     systemCertPool: false
     25     client:
     26       key:
     27         path:
     28         #path: /opt/app/fabric/cli/user/cyorg.bjgoodwill.com/Admin-peer0.cyorg.bjgoodwill.com/tls/client.key
     29       cert:
     30         path:
     31         #path: /opt/app/fabric/cli/user/cyorg.bjgoodwill.com/Admin-peer0.cyorg.bjgoodwill.com/tls/client.crt
     32 channels:
     33   prescriptionchannel:
     34     peers:
     35       peer0.cyorg.bjgoodwill.com:
     36         endorsingPeer: true
     37         chaincodeQuery: true
     38         ledgerQuery: true
     39         eventSource: true
     40     policies:
     41       queryChannelConfig:
     42         minResponses: 1
     43         maxTargets: 1
     44         retryOpts:
     45           attempts: 5
     46           initialBackoff: 500ms
     47           maxBackoff: 5s
     48           backoffFactor: 2.0
     49           
     50   prescriptionmultiorgchannel:
     51 
     52     peers:
     53       peer0.cyorg.bjgoodwill.com:
     54         endorsingPeer: true
     55         chaincodeQuery: true
     56         ledgerQuery: true
     57         eventSource: true
     58 
     59       peer0.jhorg.bjgoodwill.com:
     60         endorsingPeer: true
     61         chaincodeQuery: true
     62         ledgerQuery: true
     63         eventSource: true
     64 
     65       peer0.wjworg.bjgoodwill.com:
     66         endorsingPeer: true
     67         chaincodeQuery: true
     68         ledgerQuery: true
     69         eventSource: true
     70 
     71     # [Optional]. The application can use these options to perform channel operations like retrieving channel
     72     # config etc.
     73     policies:
     74       #[Optional] options for retrieving channel configuration blocks
     75       queryChannelConfig:
     76         #[Optional] min number of success responses (from targets/peers)
     77         minResponses: 1
     78         #[Optional] channel config will be retrieved for these number of random targets
     79         maxTargets: 1
     80         #[Optional] retry options for query config block
     81         retryOpts:
     82           #[Optional] number of retry attempts
     83           attempts: 5
     84           #[Optional] the back off interval for the first retry attempt
     85           initialBackoff: 500ms
     86           #[Optional] the maximum back off interval for any retry attempt
     87           maxBackoff: 5s
     88           #[Optional] he factor by which the initial back off period is exponentially incremented
     89           backoffFactor: 2.0
     90 
     91 organizations:
     92   cyorg.bjgoodwill.com:
     93     mspid: CYOrgMSP
     94     cryptoPath: peerOrganizations/cyorg.bjgoodwill.com/users/Admin@cyorg.bjgoodwill.com/msp/
     95     #cryptoPath: msp/
     96     peers:
     97       - peer0.cyorg.bjgoodwill.com
     98     certificateAuthorities:
     99       - ca.cyorg.bjgoodwill.com
    100   
    101   jhorg.bjgoodwill.com:
    102     mspid: JHOrgMSP
    103     # This org's MSP store (absolute path or relative to client.cryptoconfig)
    104     cryptoPath:  peerOrganizations/jhorg.bjgoodwill.com/users/Admin@jhorg.bjgoodwill.com/msp
    105     peers:
    106       - peer0.jhorg.bjgoodwill.com
    107     certificateAuthorities:
    108       - ca.jhorg.bjgoodwill.com
    109   
    110   wjworg.bjgoodwill.com:
    111     mspid: WJWOrgMSP
    112     # This org's MSP store (absolute path or relative to client.cryptoconfig)
    113     cryptoPath:  peerOrganizations/wjworg.bjgoodwill.com/users/Admin@wjworg.bjgoodwill.com/msp
    114     peers:
    115       - peer0.wjworg.bjgoodwill.com
    116     certificateAuthorities:
    117       - ca.wjworg.bjgoodwill.com 
    118      # Orderer Org name
    119   ordererorg:
    120       # Membership Service Provider ID for this organization
    121       mspID: "PrescriptionOrdererMSP"
    122 
    123       # Needed to load users crypto keys and certs for this org (absolute path or relative to global crypto path, DEV mode)
    124       cryptoPath: ordererOrganizations/bjgoodwill.com/users/Admin@bjgoodwill.com/msp
    125 
    126 orderers:
    127   orderer.bjgoodwill.com:
    128     url: grpc://192.168.229.136:7050
    129     grpcOptions:
    130       ssl-target-name-override: orderer.bjgoodwill.com
    131       keep-alive-time: 0s
    132       keep-alive-timeout: 20s
    133       keep-alive-permit: false
    134       fail-fast: false
    135       allow-insecure: false
    136     tlsCACerts:
    137       path: ${GOPATH}/src/github.com/prescriptionserver/client/go/crypto-config/ordererOrganizations/bjgoodwill.com/tlsca/tlsca.bjgoodwill.com-cert.pem
    138       #path: /opt/app/fabric/cli/user/member1.example.com/Admin-peer0.member1.example.com/tlsca.member1.example.com-cert.pem
    139 peers:
    140   peer0.cyorg.bjgoodwill.com:
    141     url: grpc://192.168.229.138:7051
    142     eventUrl: grpc://192.168.229.138:7053
    143     grpcOptions:
    144       ssl-target-name-override: peer0.cyorg.bjgoodwill.com
    145       keep-alive-time: 0s
    146       keep-alive-timeout: 20s
    147       keep-alive-permit: false
    148       fail-fast: false
    149       allow-insecure: false
    150     tlsCACerts:
    151       path: ${GOPATH}/src/github.com/prescriptionserver/client/go/crypto-config/peerOrganizations/cyorg.bjgoodwill.com/tlsca/tlsca.cyorg.bjgoodwill.com-cert.pem
    152       #path: /opt/app/fabric/cli/user/cyorg.bjgoodwill.com/Admin-peer0.cyorg.bjgoodwill.com/tls/ca.crt
    153  
    154   peer0.jhorg.bjgoodwill.com:
    155     url: peer0.jhorg.bjgoodwill.com:7051
    156     eventUrl: peer0.jhorg.bjgoodwill.com:7053
    157     grpcOptions:
    158       ssl-target-name-override: peer0.jhorg.bjgoodwill.com
    159       keep-alive-time: 0s
    160       keep-alive-timeout: 20s
    161       keep-alive-permit: false
    162       fail-fast: false
    163       allow-insecure: false
    164     tlsCACerts:
    165       path: ${GOPATH}/src/github.com/prescriptionserver/client/go/crypto-config/peerOrganizations/jhorg.bjgoodwill.com/tlsca/tlsca.jhorg.bjgoodwill.com-cert.pem
    166       #path: /opt/app/fabric/cli/user/member1.example.com/Admin-peer0.member1.example.com/tls/ca.crt
    167       
    168   peer0.wjworg.bjgoodwill.com:
    169     url: peer0.wjworg.bjgoodwill.com:7051
    170     eventUrl: peer0.wjworg.bjgoodwill.com:7053
    171     grpcOptions:
    172       ssl-target-name-override: peer0.wjworg.bjgoodwill.com
    173       keep-alive-time: 0s
    174       keep-alive-timeout: 20s
    175       keep-alive-permit: false
    176       fail-fast: false
    177       allow-insecure: false
    178     tlsCACerts:
    179       path: ${GOPATH}/src/github.com/prescriptionserver/client/go/crypto-config/peerOrganizations/wjworg.bjgoodwill.com/tlsca/tlsca.wjworg.bjgoodwill.com-cert.pem
    180       #path: /opt/app/fabric/cli/user/member1.example.com/Admin-peer0.member1.example.com/tls/ca.crt
    181 certificateAuthorities:
    182   ca.fbi.citizens.com:
    183     url: https://192.168.229.138:7054
    184     tlsCACerts:
    185       # Comma-Separated list of paths
    186       path: ${GOPATH}/src/github.com/prescriptionserver/client/go/crypto-config/peerOrganizations/cyorg.bjgoodwill.com/tlsca/tlsca.cyorg.bjgoodwill.com-cert.pem
    187       # Client key and cert for SSL handshake with Fabric CA
    188       client:
    189         key:
    190           path: ${GOPATH}/src/github.com/prescriptionserver/client/go/crypto-config/peerOrganizations/cyorg.bjgoodwill.com/users/User1@cyorg.bjgoodwill.com/tls/client.key
    191         cert:
    192           path: ${GOPATH}/src/github.com/prescriptionserver/client/go/crypto-config/peerOrganizations/cyorg.bjgoodwill.com/users/User1@cyorg.bjgoodwill.com/tls/client.crt
    193 
    194     # Fabric-CA supports dynamic user enrollment via REST APIs. A "root" user, a.k.a registrar, is
    195     # needed to enroll and invoke new users.
    196     registrar:
    197       enrollId: admin
    198       enrollSecret: adminpw
    199     # [Optional] The optional name of the CA.
    200     caName: ca.cyorg.bjgoodwill.com
    201 
    202 entityMatchers:
    203   orderer:
    204     - pattern: (w*)orderer.bjgoodwill.com(w*)
    205       urlSubstitutionExp: grpc://orderer.bjgoodwill.com:7050
    206       sslTargetOverrideUrlSubstitutionExp: orderer.bjgoodwill.com
    207       mappedHost: orderer.bjgoodwill.com
    View Code
    最近比较忙,先不写了,以后补起来
  • 相关阅读:
    读本地json的方法
    告诉你如何应对HR索要薪资证明!
    函数声明与函数表达式
    原型的动态性
    工作实际需求andjs进阶图书
    表单元素操作,button,点击下载按钮实现-长知识
    grunt注意要点
    重新认识块级元素--DIV
    GO语言学习:变量间赋值
    GO语言学习:单通道
  • 原文地址:https://www.cnblogs.com/apolov-fabric/p/9719377.html
Copyright © 2011-2022 走看看