The original address: www.xuanzhangjiong.top/2019/04/11/…

Author: TopJohn

Hyperledger Fabric 2.0 Alpha released!

With the recent release of Fabric V1.4.1 LTS, the focus of work on the Fabric project is now moving towards the official releases of 1.4.1 and 2.0. V2.0.0 is a major target for 2019 and focuses on more new features including enhanced chain code lifecycle management, RAFT consensus mechanism for gradual migration to Byzantine fault tolerant algorithms, and stronger token support. The recently released version 2.0 is recommended as an early adopter, not a production environment.

Fabric chaincode lifecycle

Fabric 2.0 Alpha introduces the features of distributed governance chains, including a new process for installing chains on your nodes and launching chains in a channel. The new Fabric life cycle allows multiple organizations to agree on the parameters of the chain code, such as the endorsement strategy for the chain code before it starts interacting with the ledger. The new model improves on the previous lifecycle:

  • Multiple organizations must agree on chain code parameters: In the Fabric 1.x version, one organization can set chain code parameters (such as endorsement policies) for all other channel members. The new Fabric chain code lifecycle will be more flexible, providing a centralized trust model (such as the previous version of the lifecycle model) as well as a decentralized model that requires the consent of a sufficient number of organizations to be effective.

  • Safer chain code upgrade process: In the previous chain code life cycle, the chain code upgrade could be issued by a single organization, thus putting channel members who have not yet installed the new chain code at risk. The new model requires a sufficient number of organizations to approve the upgrade chain code.

  • Easier endorsement policy upgrades: The Fabric life cycle allows you to change endorsement policies without repackaging or installing chain codes. Users can experience the benefits of a default policy that requires the consent of a majority of members within the channel. This policy is automatically updated as channels add or remove organizations.

  • Checkable chain code packages: The Fabric life cycle packages chain codes as easy-to-read tar files. This makes it easier to examine chain code packages and coordinate installations across multiple organizations.

  • Start multiple chains with the same installation package: Chains on a channel in previous lifecycle management could specify an installed chain by name and version. In the current version you can use a chain code installation package to deploy multiple times on the same channel or different channels using different names.

Use the new chain code lifecycle

You can use the following tutorial to get started with the new code life cycle:

  • Chaindoce for Operators: Provides a detailed overview of the steps required to install and define chaincodes, as well as the capabilities available to the new model.

  • Building Your First Network: If you want to start using the new life cycle right away, the BYFN tutorial has been updated to install and define chains using the new chain life cycle.

  • Using Private Data in Fabric: Has been updated to demonstrate how to use Private Data collections with a new chain code lifecycle.

  • Calm Policies: Learn how to use policies in channel configurations as Endorsement policies using the new chain code life cycle.

limit

The chain code life cycle has not been completed in Fabric V2.0 Alpha. Specifically, note the following restrictions in the Alpha release:

  • CouchDB indexing is not yet supported
  • Chain codes defined using the new life cycle cannot yet be discovered through service discovery

These limitations will be addressed later.

FabToken

Fabric 2.0 Alpha also provides users with the ability to easily convert assets into tokens over the Fabric channel. FabToken is a token management system that uses the Unspent Transaction Output (UTXO) model to publish, transfer and exchange tokens using the identity and member service infrastructure provided by Hyperledger Fabric.

  • Using FabTokens: This how-to provides a detailed overview of how to use tokens on a Fabric network. The guide also includes examples of how to use tokenCLI to create and transfer tokens.

Alpine images

Starting with V2.0, Hyperledger Fabric Docker images will use the Alpine Linux operating system, a lightweight security-oriented Linux distribution. This means Docker images will now be much smaller, providing faster download and startup times, and taking up less disk space on the host system. Alpine Linux was designed with security in mind, and the minimalist nature of Alpine’s distribution greatly reduces the risk of security breaches.

Raft Sorting service

Raft, introduced in V1.4.1, is an ETCD-based crash tolerant (CFT) sorting service. Raft follows a “leader and follower” model where each channel elects a leader and its decisions are copied to the follower. The Raft based sorting service will be easier to set up and manage than Kafka based sorting services, and its design allows organizations around the world to become discrete sorting service contribution nodes.

  • The Ordering Service describes The Ordering Service in a Fabric and provides an overview of The three Ordering services implemented: Solo, Kafka, and Raft.
  • Configuring and Operating a Raft ordering Service shows the configuration parameters and precautions for deploying Raft based ordering services.
  • Setting up an ordering node: describes the process of deploying a ordering node, not related to its implementation.
  • Building Your First Network: Updated to allow Building sample networks using Raft based sorting services.