Hyperledger Fabric 1.0 架构与开发.pdf

上传人:飞****9 文档编号:134041461 上传时间:2020-06-02 格式:PDF 页数:75 大小:5.10MB
返回 下载 相关 举报
Hyperledger Fabric 1.0 架构与开发.pdf_第1页
第1页 / 共75页
Hyperledger Fabric 1.0 架构与开发.pdf_第2页
第2页 / 共75页
Hyperledger Fabric 1.0 架构与开发.pdf_第3页
第3页 / 共75页
Hyperledger Fabric 1.0 架构与开发.pdf_第4页
第4页 / 共75页
Hyperledger Fabric 1.0 架构与开发.pdf_第5页
第5页 / 共75页
点击查看更多>>
资源描述

《Hyperledger Fabric 1.0 架构与开发.pdf》由会员分享,可在线阅读,更多相关《Hyperledger Fabric 1.0 架构与开发.pdf(75页珍藏版)》请在金锄头文库上搜索。

1、Hyperledger Fabric 1 0 架构与开发架构与开发 华东师范大学数据科学与工程学院 邵奇峰 shao 2 报告提纲 报告提纲 Introduction Hyperledger Projects Hyperledger Fabric Architecture Hyperledger Fabric Development 基于区块链的可信仓单平台基于区块链的可信仓单平台 Hyperledger Fabric Deployment 3 Introduction 4 区块链区块链 Blockchain 区块链是一种去中心化 去信任 不可篡改 可追溯 多方共同维护的分布式数据库 关系数据

2、库 NoSQL Blockchain 5 Bitcoin Block 6 Bitcoin Block 476522 Number Of Tx 1932 Output Total 11 824 61691753 BTC Transaction Fees 1 22238693 BTC Timestamp 2017 7 19 11 58 Bits 402742748 Size 999 135 KB Nonce 680199806 Block Reward 12 5 BTC Hash 000000000000000000c03 Previous Block 00000000000000000136 M

3、erkle Root f6a57b63731929b2ae37 7 Transaction 8 Transaction How it works 9 Traditional Database Regulator Car Leasing Business Network Ownership Transfer In house ledger Synchronisation Slow Error prone Multiple ledgers Who owns what when could get confused 1 Manufacturer In house ledger 2 Dealer In

4、 house ledger 3 Leasing Company In house ledger In house ledger 4 Lessee 5 Scrap Merchant In house ledger 11 10 Blockchain 11 比特币的局限 比特币的局限 Limited Throughput Slow Transaction Confirmation No Settlement Finality Designed for Cryptocurrency Poor Governance No Privacy 12 Hyperledger Projects 13 Hyperl

5、edger Projects Since Dec 17 2015 Apache v2 License 36 142 China Members 8 Top Projects 200 Contributors 10000 Commits 14 Hyperledger Projects 15 Hyperledger Fabric Open sourced at Dec 2015 Proposed by IBM and DAH Written in Golang 90 contributors 5000 commits Core code loc v0 6 49k v1 0 91k 1 0 is R

6、eleased at July 11 16 17 Hyperledger Fabric Architecture 18 Architecture 19 20 Ledger Blocks States 7 Ledger for Fabric v1 0 asset name marble1 owner jerry date 9 6 2016 Txn Reads Writes Txn Reads Writes Txn Reads Writes Txn Reads Writes State Database Blockchain File system Latest wri en key values

7、 for use in transac5on simula5on Immutable source of truth Indexes point to block storage loca on blockNum block fi le off set blockHash block fi le off set txId block fi le off set blockNum txNum block fi le off set Block index LevelDB embedded KV DB Materialized view of the blockchain data organiz

8、ed by key for effi cient queries Two op5ons LevelDB default embedded KV DB supports keyed queries composite key queries key range queries CouchDB external op on supports keyed queries composite key queries key range queries plus full data rich queries Beta in v1 History index LevelDB embedded KV DB

9、Index of the blockchain to track history of a key key marble1 value ns key blockNum txNum byte 21 Smart Contract Chaincode 22 Consensus Submission 11 How a PBFT Network Works 1 4 Submission V VL V V N N N N N Non validaUng peer V ValidaUng peer VL ValidaUng Leader 456 TransacUon submi ed to network

10、123 TransacUon submi ed to network 789 TransacUon submi ed to network 789 123 456 456 789 123 456 123 789 123 456 789 23 Consensus Ordering 12 How a PBFT Network Works 2 4 Ordering V VL V V N N N N N Non validaUng peer V ValidaUng peer VL ValidaUng Leader 456 123 789 123 456 789 123 456 789 123 456

11、789 123 456 789 123 456 789 Consensus network establishes order as 24 Consensus Execution 13 How a PBFT Network Works 3 4 Execu on V VL V V N N N N N Non validaUng peer V ValidaUng peer VL ValidaUng Leader 123 456 789 123 456 789 123 456 789 123 456 789 123 456 789 Consensus network establishes orde

12、r as 25 Consensus Distribution 14 How a PBFT Network Works 4 4 Distribu on V VL V V N N N N N Non validaUng peer V ValidaUng peer VL ValidaUng Leader 123 456 789 123 456 789 123 456 789 123 456 789 123 456 789 Consensus network establishes order as 26 Byzantine Fault Tolerant BFT 1989 1998 Lamport L

13、 The part time parliament 1982 Lamport L Shostak R Pease M The Byzantine generals problem 2002 Castro M Liskov B Practical Byzantine fault tolerance and proactive recovery 1999 Proof of Work PoW 27 Consensus PBFT Ordering Solo Kafka SBFT 28 Simplified Byzantine Fault Tolerance SBFT 29 Fabric 1 0 Dep

14、loyment Scenarios 25 VP0VP1 VP2VP3 NVP NVPNVP NVP NVP NVPNVP NVP v0 6 E O O O O Orderer C C C E E C C v1 0 Member Service CA SDK A peer can be a E C physically 30 Architecture 31 Transaction Lifecycle 8 Ledger for Fabric v1 0 Endorsing Peer subset of peers Commijng Peer all peers Ordering Service Tr

15、ansac9on Reads Writes 2 Execute chaincode to simulate proposal in peer Query State DB for reads Build RWSet Applica on SDK 4 Submit transac on includes RWSet Transac9on Reads Writes Transac9on Reads Writes Transac9on Reads Writes 7 Validate each transac on and commit block Validate endorsement polic

16、y VSCC Validate ReadSet versions in State DB MVCC Commit block to blockchain Commit valid trans to State DB Commit history index of valid trans to goleveldb 5 Ordering service creates batch block of transac ons Transaction lifecycle and interaction with ledgers 32 Transaction Flow 33 Multi Channel Chain 34 Fabric CA 35 Fabric CA Identity Registration Management Enrollment Cert Ecert Transaction Cert Tcert not supported in 1 0 36 Fabric CA PKI 37 Block type Block struct Header BlockHeader Data Bl

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > IT计算机/网络 > 其它相关文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号