![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Fabric
algiz_kk
武汉大学硕士,研究方向密码学与区块链。
展开
-
Hyperledger Fabric网络中增加组织/增加peer/恢复peer节点的思路
有空就写…原创 2021-03-02 17:27:49 · 1069 阅读 · 0 评论 -
Hyperledger Fabric链码单元测试
有空就写…原创 2021-03-02 15:21:28 · 743 阅读 · 5 评论 -
Hyperledger Fabric使用Golang SDK测试网络吞吐量
1. 使用github.com/panjf2000/antsfunc getContract() *gateway.Contract { wallet, _ := gateway.NewFileSystemWallet("resources/wallet-whu-cloud-org1") networkConfig := filepath.Join("resources", "connection-whu-cloud-org1.yaml") gw, err := gateway.Connect(原创 2020-12-22 15:24:07 · 1086 阅读 · 0 评论 -
Hyperledger Caliper测试Fabric网络性能
1. 启动一个fabric网络根据测试需要,在configtx.yaml中设置合适的参数以及排序服务类型。 BatchTimeout: 2s BatchSize: MaxMessageCount: 100 AbsoluteMaxBytes: 99 MB PreferredMaxBytes: 512 KB启动网络,以test-network为例cd test-network./network.sh up createChannel./原创 2020-10-27 00:16:26 · 2391 阅读 · 11 评论 -
Hyperledger Fabric多机部署思路
Machine Preparelaunch three hosts, they can reach to each other.host 1 with ip1host 2 with ip2host 3 with ip3Network Preparefrom host 1docker swarm init --advertise-addr <ip1>docker swarm join-token managerfrom host 2docker swarm join --原创 2020-10-06 10:47:07 · 467 阅读 · 3 评论 -
Hyperledger Fabric遇到的问题&解决办法(持续更新)
1. fabric2.0.0链码打包失败Error: error getting chaincode bytes: failed to calculate dependencies: incomplete package: github.com/hyperledger/fabric-contract-api-go/contractapi!!!!!!!!!!!!!!! Chaincode packaging on peer0.org1 has failed !!!!!!!!!!!!!!!!=======原创 2020-07-30 18:40:59 · 2207 阅读 · 0 评论 -
Alphin apk设置国内更新源
fabric 2.0之后的镜像开始使用alphin,有效减少了镜像的大小。但是在修改代码之后,自己构建docker镜像的时候,默认使用的是下面这个国外地址https://dl-cdn.alpinelinux.org下载速度极慢,通过下面的命令修改成阿里云的更新源sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories#使用sed工具将字符串dl-cdn.alpinelinux.org替换为mirror原创 2020-07-23 00:57:04 · 5587 阅读 · 0 评论 -
Hyperledger Fabric链码使用基于属性的访问控制
在用户证书中加入自定义属性使用fabric-ca-client在证书中加入自定义属性# 管理员register用户id的时候,加上自定义属性$ fabric-ca-client register --id.name user1 --id.secret user1pw --id.type user --id.affiliation org1 --id.attrs 'attr1=value1'# 管理员enroll用户的时候,指定之前注册的id中的哪些属性要加入到证书中fabric-ca-clie原创 2020-07-15 01:40:48 · 2632 阅读 · 4 评论 -
在WSL2下测试Fabric Go语言链码
安装WSL2和Docker参考这里。安装Fabric环境参考这里。添加Fabric源码#linux中执行cd ~/gomkdir -p src/github.com/hyperledgergit clone -b release-1.4 https://github.com/hyperledger/fabric.git#将项目名称改为fabric#确保"github.com/h...原创 2020-02-22 19:20:29 · 372 阅读 · 0 评论 -
ubuntu18.04安装Fabric1.4.4环境
安装最新版本curlsudo apt-get install curl安装python 2.7sudo apt-get install python安装golang 1.12.x#下载源码到当前目录wget https://dl.google.com/go/go1.12.13.linux-amd64.tar.gz #解压到/usr/localsudo tar -C /usr/...原创 2020-02-19 17:05:38 · 2061 阅读 · 0 评论