Community

Blog
×
Community Blog 7 New Features of Alibaba Cloud Container Service Blockchain Solution

7 New Features of Alibaba Cloud Container Service Blockchain Solution

Alibaba Cloud Container Service Blockchain Solution has been upgraded to support Hyperledger Fabric v1.

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:

  1. Chaincode in Node.js and examples and compatible with cloud environments in China
  2. Chaincode encryption function and examples
  3. Connection profile and automatic generation function
  4. Support for other new functions of Hyperledger Fabric v1.1
  5. Support for Alibaba Cloud ECS Bare Metal Instance (X-Dragon)
  6. Built-in containerized Hyperledger Blockchain Explorer
  7. Integrated Alibaba Cloud Log Service
  8. Optimized data directory clearing during blockchain network deletion

1

Alibaba Cloud Container Service Blockchain Solution

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.

New Function No. 1: Support for Node.js-type Chaincode

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

2

3

Position of the Node.js-type sample chaincode source code:

4

Sample of the Node.js-type chaincode in SDK mode

5

6

7

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.

New Function No. 2: Ledger Data Encryption and Signature at the Chaincode Level

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

http://hyperledger-fabric.readthedocs.io/en/latest/chaincode4ade.html?highlight=chaincode%20encryption#chaincode-encryption.

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

https://github.com/hyperledger/fabric/tree/release-1.1/examples/chaincode/go/enccc_example.

8

9

10

New Function No. 3: Connection Profile used for the Client SDK application

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 one-click download all the certificate keys, Connection Profile, and other configuration files.

The following example shows the position of the automatically generated Connection Profile and partial content:

11

For the description of each field of Connection Profile, visit

https://github.com/hyperledger/fabric-samples/blob/release-1.1/balance-transfer/artifacts/network-config.yaml.

New Function No. 4: Support for Alibaba Cloud ECS Bare Metal Instance (X-Dragon)

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.

New Function No. 5: Built-in Containerized Blockchain Browser

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.

12

13

14

Note that you need to create a channel (for example, by running cli-test.sh) before using the Blockchain Explorer.

New Function No. 6: Integrated Alibaba Cloud Log Service

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:

15

16

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.

17

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.

18

New Function No. 7: Optimized Deletion of the Process Data Directory

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:

/data/fabric/network01

When the blockchain network is deleted, the data directory is renamed as follows:

/data/fabric/network01-deleted-2018-03-21-041756

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.

Conclusion

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:

  1. Alibaba Cloud Container Service Blockchain Solution
  2. Blockchain Solution Documentation of Alibaba Cloud Container Service
0 0 0
Share on

You may also like

Comments

Related Products

  • Container Service for Kubernetes

    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
  • Dataphin

    As a unified PaaS platform for intelligent data creation and management at Exabyte Scale, Dataphin applies Alibaba Group’s unique and proven OneData, OneID & OneService technologies to help enterprises thrive in the new era of data intelligence.

    Learn More
  • Quick BI

    A new generation of business Intelligence services on the cloud

    Learn More
  • Container Service

    A high-performance container manage service that provides containerized application lifecycle management

    Learn More