As one of the most influential open-source blockchain projects in the world, Hyperledger recently released Hyperledger Fabric v1.1. With this upgrade, rich new functions are provided, and the security, performance, and scalability are improved. The Alibaba Cloud Container Service Blockchain Solution has also been upgraded to support the new open-source blockchain ecology. During this upgrade, the Hyperledger Fabric v1.1.0 GA edition is supported on the Kubernetes cluster immediately and the following new functions and use experience optimization are provided:
The Alibaba Cloud Container Service blockchain solution is a simple and flexible generic solution used to develop and test the blockchain applications and solutions based on Hyperledger Fabric. The latest blockchain solution can be deployed through the acs-hyperledger-fabric GUI in the application directory of Container Service Kubernetes with a single click. Besides, you can directly edit relevant parameters for custom configurations on the parameter page, for example, modifying the blockchain network topology, specifying the network port, or enabling/disabling functions.
In Hyperledger Fabric v1.1, in addition to the Golang type, the popular Node.js-type smart contracts (the chaincode) are supported. Support for Java type is not officially declared yet. In this way, the Hyperledger Fabric application and development ecology is further expanded and enriched, attracting more developers for blockchain application innovation.
On this basis, the blockchain solution eliminates problems that may occur in a Chinese network environment, for example, Node.js-type chaincode instantiation failure due to time-out or chaincode image creation failure.
To experience the Node.js-type chaincode, you can configure relevant parameters to specify the chaincode language type in CLI or Client SDK mode. The solution provides sample scripts based on the official cli-test.sh and client SDK sample programs based on the official balance-transfer.
Sample of the Node.js-type chaincode in CLI mode
Position of the Node.js-type sample chaincode source code:
Sample of the Node.js-type chaincode in SDK mode
Note that, due to compiling and building characteristics of the Node.js application, the instantiation time of the Node.js-type chaincode is longer than that of the Golang-type chaincode in Hyperledger Fabric. Therefore, you have to wait for a time in this stage.
Hyperledger Fabric v1.1 supports encryption, decryption, signature, and verification of the transaction data at the chaincode level. In other words, Value in the StateDB Key-Value is input by calling the chaincode. In this way, after the business application submits sensitive commercial data to the blockchain, the whole data process (including recording data to the ledger) is further protected by standard or user scalable encryption and signature algorithms in addition to the original security mechanism, further improving the data security.
For the description on this function in the official documentation, visit
The Container Service blockchain solution provides the official EncCC sample program running in the CLI environment, helping you understand the usage and working mechanism of this function. In this sample, the system first encrypts and records the value1 of the key1, reads and decrypts the value of the key1, and outputs and displays the value1. Next, the system encrypts and records the value2 and digital signature of the key2, reads and decrypts the value of the key2 and verifies its signature to obtain a final value, and outputs and displays the value2.
Note that you need to create a corresponding channel (for example, by running cli-tset.sh) before using the CLI sample program.
For details about the sample program source code, visit
The blockchain network topology and connection information are described differently in different blockchain applications. To unify the application connection configuration, Hyperledger Fabric v1.1 starts to support the Connection Profile. The Connection Profile is mainly applicable for Node.js-type Client SDK applications now, and may support more types of SDK applications in the future.
This function is also supported during the blockchain solution upgrade this time. Besides, based on your blockchain network topology configurations (including channel, peer, orderer, and ca), public network access address, and port number, the Connection Profile application connection configuration file (network-config.yaml) can be automatically generated and provided for your download. In our Client SDK sample balancer-transfer-app, a script is provided for you to download all the certificate keys, Connection Profile, and other configuration files in one click.
The following example shows the position of the automatically generated Connection Profile and partial content:
For the description of each field of Connection Profile, visit
The blockchain solution upgrade this time officially supports running Hyperledger Fabric on Alibaba Cloud ECS Bare Metal Instance (X-Dragon). In addition to high computing performances comparable with those of physical machines, Alibaba Cloud ECS Bare Metal Instance can provide the security isolation function at the physical machine level. These features provide a sound runtime environment guarantee for improving the security risk prevention capability based on the blockchain business system and enhancing data and privacy protection. The combination of these features, high computing performance and elastic scalability of Alibaba Cloud ECS Bare Metal Instance, and improved performance and scalability of Hyperledger Fabric can further improve the business processing capability of the blockchain applications and system.
With this feature upgrade, you will have a seamless experience. You just need to select Alibaba Cloud ECS Bare Metal Instance from the Container Service Kubernetes cluster you created as the worker node and then make operations according to the creation and deployment processes in the standard blockchain solution. Currently, you need to submit a ticket to activate a whitelist for the pay-as-you-go Alibaba Cloud ECS Bare Metal Instance in advance.
The blockchain solution supports connection to the blockchain network through blockchain control tools or browsers developed based on standard SDKs. In this upgrade, the blockchain solution further containerizes the official open-source Hyperledger Blockchain Explorer. In this way, the Blockchain Explorer and its dependent MySQL database are provided in the solution as the service and deployment files of Kubernetes (these files are enabled by default; you can disable them). They can be automatically configured, deployed, and started when a blockchain network is created and provide, through SLB, Web graphic blockchain network business transaction monitoring services for external users.
Note that you need to create a channel (for example, by running cli-test.sh) before using the Blockchain Explorer.
The blockchain solution provides native support for you to view logs on the Container Service console or by running the
kubectl logs command of Kubernetes. On the Container Service console, you can conveniently view the container logs of Peer, Orderer, CA, Kafka, Zookeeper and other nodes in the blockchain network. The following is an example:
Besides, the latest Container Service solution further integrates with Alibaba Cloud Log Service, and provides advanced log functions for enterprise customers, including log storage, real-time indexing/query/analysis, log alarm, and visual reports. Integrated key parameters can be directly set on the blockchain network creation and deployment page. For details, see the product documentation of this solution.
The following figure shows the effect of log query and analysis on the Alibaba Cloud Log Service Container. For details about the complete query and analysis syntax and more advanced functions of Log Service, see the product documentation of Log Service.
Some blockchain solution users need to frequently create and delete blockchain networks in a development and test environment. To improve the efficiency, this solution upgrade optimizes the data directory clearing. Specifically, when a blockchain network is deleted (for example, by running the helm delete command), the suffix
-deleted-curremt timestamp is automatically added to the corresponding data directory name. The purpose is to avoid deletion by mistake and restoration of original data that is expected by some users.
Assume that the original data directory is:
When the blockchain network is deleted, the data directory is renamed as follows:
In this way, the operation experience with blockchain creation, deletion, and recreation is further improved for users needing to perform such operations frequently for development and debugging. Besides, to completely clear the data directory to release the storage space, you can run the rm command or use the automatic script.
Since its official release in October 2017, the Container Service blockchain solution has been widely recognized and adopted by many developers and enterprise users from the retail, financial, manufacturing, multimedia, and other industries. The enterprise-level blockchain development and test environment based on the solution can quickly be built for blockchain business innovation and application. The upgrade of Hyperledger Fabric v1.1 and the blockchain solution this time helps us create an enterprise-level blockchain business application of more functions, higher performances, higher security, and better ease-to-use.
For more information, visit the following links:
Alibaba Cloud Blockchain Service Team - August 29, 2018
Alibaba BlockChain Service Team - September 6, 2018
Alibaba Clouder - December 4, 2018
Alibaba BlockChain Service Team - August 29, 2018
Alibaba Cloud Blockchain Service Team - September 6, 2018
Alibaba Clouder - November 6, 2019
Alibaba Cloud Container Service for Kubernetes is a fully managed cloud container management service that supports native Kubernetes and integrates with other Alibaba Cloud products.Learn More
BaaS provides an enterprise-level platform service based on leading blockchain technologies, which helps you build a trusted cloud infrastructure.Learn More
A secure image hosting platform providing containerized image lifecycle managementLearn More
A high-performance container manage service that provides containerized application lifecycle managementLearn More
More Posts by Alibaba Cloud Blockchain Service Team