一文帶大家瞭解Fabric 2.0的新特性

前言

Fabric 2.0 在2020年1月29號終於release了,我們來看下有哪些新的變化。

主要體現在:對新應用和隱私的支持,增強了智能合約的管理,增加了對節點的操作。

需要注意的是,只能由fabric-1.4.x升級到2.0。

智能合約的去中心化管理

fabric 2.0引入了智能合約的去中心化管理,在鏈碼的安裝和實例化的時候都發生了變化。新的鏈碼的生命週期中,只有多個組織達成了共識,鏈碼和賬本才可以進行交互。做了如下的改進:

  • 多個組織必須同意鏈碼的參數。在2.0之前,一個組織可以為channel中的所有成員設置鏈碼的參數(例如實例化鏈碼時指定的背書策略),拒絕安裝鏈碼的組織將不能參與鏈碼的調用。在2.0中,同時提供中心化的模型和去中心化的模型。
  • 鏈碼的升級更加安全。在之前的鏈碼生命週期中,一個組織即可升級鏈碼。在新的版本中,需要別的組織進行同意。
  • 簡化了背書策略和private data的更新
    。我們不必重新打包/安裝鏈碼即可更新背書策略。同時我們設置了默認的背書策略,默認的背書策略在我們增加或者刪除組織的時候會自動生效。
  • 鏈碼package可檢查:會打包為tar文件,方便進行閱讀。
  • 之前鏈碼是通過名字+版本號來決定的,現在一次打包,可以多次安裝(在相同或者不同的通道上)
  • 打包chaincode的成員不必完全一致。

CouchDB中使用了狀態數據庫緩存來提高性能

  • 使用外部CouchDB狀態數據庫時,背書和驗證階段的讀取延遲歷來是性能瓶頸。
  • fabric 2.0中,每個peer都進行了緩存,在core.yaml中的cacheSize來進行配置。

基於Alpine來打包docker鏡像

Alpine Linux是以安全為導向的,輕量級別的,可以減少空間的佔用。

Release notes

新特性

FAB-11237:去中心化的智能合約管理

新的應用程序模式:

  • FAB-10889: Implicit org-specific collections
  • FAB-15066: Endorsement policies for collections
  • FAB-13581: memberOnlyWrite collection configuration option
  • FAB-13527: GetPrivateDataHash chaincode API
  • FAB-12043: Option to include private data in block events

FAB-103: State database cache for CouchDB

重要變化

  • FAB-5177: The ccenv build image no longer includes the shim
  • FAB-15366: Logger removed from chaincode shim
  • FAB-16213: The go chaincode entities extension has been removedFAB-12075: Client Identity (CID) library has movedFAB-14720: Support for CAR chaincode package format removedFAB-15285: Support for invoking system chaincodes from user chaincodes has been removed.FAB-15390: Support for peer's Admin service has been removed.FAB-16303: GetHistoryForKey returns results from newest to oldestFAB-16722: The 'provisional' genesis method of generating the system channel for orderers has been removed.FAB-16477 and FAB-17116: New configuration for orderer genesismethod and genesisfileFAB-15343: System Chaincode Plugins have been removed.FAB-11096: Docker images with Alpine LinuxFAB-11096: Bash not available in Docker images with Alpine Linux使用sh或者ashFAB-15499: Ledger data format upgradeFAB-16866: Chaincode built upon installation on peerFAB-15837: Orderer FileLedger location moved if specified with relative pathFAB-14271: Policies must be specified in configtx.yamlFAB-17000: Warn when certificates are about to expireFAB-16987: Go version has been updated to 1.13.4.

廢除

  • FAB-15754: The 'Solo' consensus type is deprecated.
  • FAB-16408: The 'Kafka' consensus type is deprecated.
  • FAB-7559: Support for specifying orderer endpoints at the global level in channel configuration is deprecated.
  • FAB-17428: Support for configtxgen flag --outputAnchorPeersUpdate is deprecated.
一文帶大家瞭解Fabric 2.0的新特性


分享到:


相關文章: