没有合适的资源?快使用搜索试试~ 我知道了~
3. 使用Fabric SDK Go1
需积分: 0 0 下载量 110 浏览量
2022-08-03
22:25:15
上传
评论
收藏 885KB PDF 举报
温馨提示
试读
15页
3. 使用Fabric SDK Go1
资源详情
资源评论
资源推荐
使用Fabric SDK Go
a. 配置
应用程序需要很多参数,特别是Fabric组件的通信地址。 现在把所有内容放入新的
配置文件中(Fabric SDK Go配置和自定义参数)。
config.yaml 文件内容如下:
$ cd $GOPATH/src/github.com/kongyixueyuan.com/bill
$ vim config.yaml
name: "bill-network"
# Describe what the target network is/does.
description: "The network which will host my first blockchain"
# Schema version of the content. Used by the SDK to apply the
corresponding parsing rules.
version: 2
# 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
organization: Org1
logging:
level: info
# Global configuration for peer, event service and orderer
timeouts
peer:
timeout:
connection: 3s
queryResponse: 45s
executeTxResponse: 30s
eventService:
timeout:
connection: 3s
registrationResponse: 3s
orderer:
timeout:
connection: 3s
response: 5s
# Root of the MSP directories with keys and certs. The Membership
Service Providers is component that aims to offer an abstraction of
a membership operation architecture.
cryptoconfig:
path:
"${GOPATH}/src/github.com/kongyixueyuan.com/bill/fixtures/crypto-
config"
# Some SDKs support pluggable KV stores, the properties under
"credentialStore" are implementation specific
credentialStore:
path: "/tmp/bill-kvs"
# [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/bill-msp"
# BCCSP config for the client. Used by GO SDK. It's the Blockchain
Cryptographic Service Provider.
# It offers the implementation of cryptographic standards and
algorithms.
BCCSP:
security:
enabled: true
default:
provider: "SW"
hashAlgorithm: "SHA2"
softVerify: true
ephemeral: false
level: 256
tlsCerts:
systemCertPool: false
# [Optional]. But most apps would have this section so that channel
objects can be constructed based on the content below.
# If one of your application is creating channels, you might not use
this
channels:
mychannel:
orderers:
- orderer.example.com
# Network entity which maintains a ledger and runs chaincode
containers in order to perform operations to the ledger. Peers are
owned and maintained by members.
peers:
peer0.org1.example.com:
# [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
剩余14页未读,继续阅读
小埋妹妹
- 粉丝: 22
- 资源: 344
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0