- 博客(13)
- 收藏
- 关注
原创 fabric2.0 orderer core structure
structure chartRegistrarRegistrar is core structure of orderer, which holds all chain, consenters and ledger. It is the only entrance to operate chain.chains stores all chains;consenters store 3 ...
2020-03-27 23:02:41 246
原创 fabric2.0 raft code analyse
code version: fabric 2.0.1fabric use ectd-io/etcd as raft library, which is located in vendor, but the library only implements the Raft algorithm; both network and disk IO are left to the user. Libr...
2020-03-27 15:48:30 886
原创 run client with fabric2.0 sdk go
development envfirstmkdir -p ~/fabriccd ~/fabricexport FABRIC_CFG_PATH=$PWDcp $GOPATH/src/github.com/hyperledger/fabric/integration/chaincode $GOPATH/src/github.com/hyperledger/fabric/integratio...
2020-03-20 17:31:47 1013 4
原创 让fabric 2.0 external builder在windows上跑起来
前言fabric2.0 可以使用external builder跑chaincode源码,方便chaincode调试,但是external builder编译和启动chaincode等操作使用的是4个bash脚本,而windows原生不支持bash。折腾经过一番研究(折腾),我发现只要完成以下3个步骤,即可在windows上run external chaincode。1、安装git-wi...
2020-03-20 14:14:28 566
原创 fabric2.0 chaincode handler register
code version: fabric 2.0.1registerchaincode need to register in peer before work, it start after stream is established, end with receiving REGISTERED meessage from peer. After registered, both chain...
2020-03-20 12:04:54 736
原创 How to write fabric chaincode and How it work
code version: fabric 2.0.1shim package is located in vendor/github.com/hyperledger/fabric-chaincode-go. It is a little old, we can get newer code in hyperledger/fabric-chaincode-go repo, which includ...
2020-03-18 17:16:11 200
原创 bitswap wantmanager代码解读
代码版本:go-bitswap@v0.1.11wantlist目前bitswap代码有两处用到了wantlist,一处是engine,另外一处是wantmanager。engine.ledgerMap[ID_of_other_peer].wantlist是wantlist类型,记录的是别的peer的wantlist。wantmanager.wl用于记录本节点所有session的wantli...
2020-03-09 22:34:51 380
原创 从bitswap学习使用libp2p
代码版本:go-bitswap@v0.1.11前言bitswapNetwork是bitswap的网络接口,负责bitswap的网络通信和dht调用,从bitswapNetwork可以知道bitswap是如何使用libp2p的。阅读本文,最好看过bitswap的代码以及了解libp2p中host、swarm、conn和stream的基础知识。如果没看过代码,那么看看主干,也能学到如何使用lib...
2020-03-09 18:35:23 1198
原创 fabric应用grpc解读
fabric应用grpc解读++本代码解读基于fabric v1.4.4版本++fabric proto文件主要集中在protos目录下,实现grpc服务的proto全在protos目录下,其中实现grpc服务的有:一、discovery / 服务发现discovery服务定义于discovery/protocol.proto:17,主要用于peer向cli/sdk提供查询服务,具体如下:...
2020-03-04 18:18:31 2277
原创 ipfs pubsub代码解读
Pubsub: Publish-subscribe发布订阅模式运行环境版本:go-ipfs@v0.4.23 go-libp2p-pubsub@v0.0.3本文运行两个节点,一个在ubuntu,另外一个在windows,下文用ipfs1代表ubuntu端的ipfs,用ipfs2代表windows端的ipfs。两个节点将彼此的地址添加到彼此的bootstrap中,形成由2个节点组成的测试网。两...
2020-03-02 10:17:26 1111
原创 go libp2p dht流程解读
运行环境版本:go-ipfs@v0.4.23 go-libp2p-kad-dht@v0.0.15本文运行两个节点,一个在ubuntu,另外一个在windows,下文用ipfs1代表ubuntu端的ipfs,用ipfs2代表windows端的ipfs。两个节点将彼此的地址添加到彼此的bootstrap中,形成由2个节点组成的测试网。两者的peerID分别为:ipfs1: QmdvR13vcQ...
2020-03-02 09:43:34 3740 3
原创 ipfs filestore解读
IPFS中的filestore作用类似于Git中的LFS,主要用于存储大文件,在blockstore只存储大文件的dag root,在FileManager存放文件的metadata, 避免大文件充斥blockstore,节省blockstore的空间。Git LFSLFS全称Large File System,是git用来存放大文件的地方。它有几个优点:1、在git仓库只存储了大文件的链接...
2020-03-02 09:41:15 1075 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人