Blockchain区块链架构设计之六:Fabric 1.0账本设计(1)
Fabric是一种开源区块链实现,部署环境可以是私有服务器,也可以直接部署在公有云上,部署方式可传统可docker化,共识算法插件化,支持用Go和JavaScript开发智能合约,尤以企业级的安全机制和CA机制为特色。Fabric之于区块链,很可能正如Hadoop之于大数据。经过在Hyperledger超级账本将近一年的孵化,社区计划在3月发布1.0的预览版本。本文将重点对Fabric 1.0(alpha&beta)的重点架构升级 - 1)账本 2)数据库 整体的设计思路进行一些介绍。
一、设计目标
总体的思路是1)提升性能 2)提升可拓展性 3)提供更丰富的查询功能 4)更多模块的可插拔
二、账本的组成
最大的不同是增加了对基于文件系统的区块链账本的支持,可以更好地支持不可篡改的特性。
三、完整交易步骤
鉴于Consenter部分还没完全完工,从目前的交易执行过程来看,对节点角色的功能拆分,解决了Fabric0.6的拓展性问题。
四、交易流程图
五、传递的消息结构
六、使用智能合约数据的方式
依托可插拔特性引入的CouchDB数据库,提供了基于JSON数据格式的多种数据查询能力,丰富了合约代码可以实现的功能。
未完待续,下一部分更新数据库的具体改变。
最后,为了实现Fabric V1.0 的设计目标,依然有大量Todo工作需要广大技术人士支持,感兴趣的可关注如下JIRA未关闭问题,对代码进行开源贡献。
Network setup and administration
- FAB-359 Bootstrap a blockchain network with orderers and peers
- FAB-686 Create channels among subset of network peers for private communications and ledgers
- FAB-290 Optionally configure Gossip protocol for high availability of peer node
- FAB-678 Ability to deploy fabric from dockerhub
Fabric CA and Security
- FAB-361 Provide a Fabric certificate authority
- FAB-266 Use transaction certificates with Fabric CA that are anonymous and unlinkable
- FAB-1219 Support access control policies for chaincode (creation, termination, invocation - in terms of chaincode library)
- FAB-1329 Support access control policies for channels (create, read, write)
- FAB-353 Pluggable interface for crypto algorithms to accommodate alternative implementations
- FAB-1321 Pluggable interface for an identity manager to accommodate alternative implementation
- FAB-1978 Multiple roots of trust
- FAB-1986 Ability to use an existing (commercial) CA
Ordering service
- FAB-1971 Serialize concurrent chain code transactions into a block
- FAB-1972 Provide an ordering service that ensures transactions are well formed with correct signatures
SDK - Java, NodeJS
- FAB-51 Common API design for SDKs implemented in all languages
- FAB-1967 Event notifications form peer on transaction commits
- FAB-1968 Ability to deploy, invoke, and query Chaincode on pre-existing channels
Chaincode
- FAB-1973 Ability to write Smart Contracts (Chaincode) in Java
- FAB-1974 Ability to write Smart Contracts (Chaincode) in Go
- FAB-1975 Ability to create endorsement policies for a chaincode during deployment
Ledger
- FAB-758 Ledger support for endorsement/validation/commit model, including file-based block storage
- FAB-788 Ledger state based on embedded LevelDB (RocksDB replacement)
- FAB-199 Ledger option for external/queryable state database (CouchDB beta)
- FAB-1257 Chaincode APIs for JSON-based data structures (Replace Table-based APIs)
- FAB-196 Ledger APIs to query Blocks/Transactions, including rich query and history of key values
编辑于 2017-02-07 13:25