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

推薦閱讀:

愛錢進蔡園竹:中國金融科技產業的三大潛在驅動力
專訪「璇璣」邱琦:我們是這樣用AI和大數據做智能投顧的
講真,不能與銀行合作的金融巨頭,可能沒有好下場
畢馬威發布2016全球金融科技100強,中國8家公司上榜

TAG:金融科技 | 区块链Blockchain | 虚拟货币 |