一文带大家了解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的新特性


分享到:


相關文章: