Saturday, June 2, 2018

Introduction to Hyperledger


One of the most common questions that I see is 'What is hyperledger?' and soon followed by 'Is hyperledger IBM's blockchain?'. In this post I will aim to answer these two, and other questions around this topic.

What is Hyperledger?

From it's website, "the Hyperledger project is an open source collaborative effort created to advance cross-industry blockchain technologies. It is a global collaboration including leaders in finance, banking, IoT, supply chain, manufacturing and technology." The project aims to bring together a number of independent efforts to develop open protocols and standards, by providing a modular framework that supports different components for different uses. This would include a variety of blockchains with their own consensus and storage models, and services for identity, access control, and contracts.

Hyperledger Approach:
  • The collaborative and open source nature of Hyperledger project is best reflected in the 'umbrella' approach:
  • Hyperledger project is an incubator for multiple blockchain projects
  • It provides consistent license, IP and standards
  • Hyperledger provides common branding and encourages interoperability of components
  • It is a community with over 100 members, and several projects in incubation
  • It provides a robust community blockchain technical projects, with well-defined governance controlled by no single company.

Hyperledger's objective:

The objective of the Hyperledger project is to advance cross-industry collaboration by developing blockchains and distributed ledgers, with a particular focus on improving the performance and reliability of these systems (as compared to comparable cryptocurrency designs) so that they are capable of supporting global business transactions by major technological, financial and supply chain companies.
The project will integrate independent open protocols and standards by means of a framework for use-specific modules, including blockchains with their own consensus and storage routines, as well as services for identity, access control and smart contracts.

Members and governance:

Early members of the initiative included blockchain ISVs, (Blockchain, ConsenSys, Digital Asset, R3, Onchain), well-known technology platform companies (Cisco, Fujitsu, Hitachi, IBM, Intel, NEC, NTT DATA, Red Hat, VMware), financial services firms (ABN AMRO, ANZ Bank, BNY Mellon, CLS Group, CME Group, the Depository Trust & Clearing Corporation (DTCC), Deutsche Börse Group, J.P. Morgan, State Street, SWIFT, Wells Fargo), Business Software companies like SAP, Systems integrators and others such as: (Accenture, Calastone, Wipro, Credits, Guardtime, IntellectEU, Nxt Foundation, Symbiont). This list is growing every day..

The governing board of the Hyperledger Project consists of twenty members chaired by Blythe Masters, (CEO of Digital Asset), and a twelve-member Technical Steering Committee chaired by Christopher Ferris, CTO of Open Technology at IBM.


Hyperledger Frameworks:
Hyperledger is just one of the many projects run by The Linux Foundation. 

1. Fabric - Modular, Smart Contracts, configurable consesus

Hyperledger Fabric is a permissioned blockchain infrastructure, originally contributed by IBM and Digital Asset, providing a modular architecture with a delineation of roles between the nodes in the infrastructure, execution of Smart Contracts (called "chaincode" in Fabric) and configurable consensus and membership services. A Fabric Network comprises "Peer nodes", which execute chaincode, access ledger data, endorse transactions and interface with applications. "Orderer nodes" which ensure the consistency of the blockchain and deliver the endorsed transactions to the peers of the network, and MSP services, generally implemented as a Certificate Authority, managing X.509 certificates which are used to authenticate member identity and roles.  It leverages container technology to host smart contracts (“chaincode”) that comprise the application logic of the system.

Fabric is primarily aimed at integration projects, in which a Distributed Ledger Technology (DLT) is required, offering no user facing services other than an SDK for Node.js, Java and Go.

Fabric supports chaincode in Go and JavaScript (via Hyperledger Composer, or natively since v1.1) out-of-the-box, and other languages such as Java by installing appropriate modules. It is therefore potentially more flexible than competitors that only support a closed Smart Contract language.

2. Sawtooth - Implementation of PET (Proof of Elapsed Time) using SGX

Contributed by Intel, Hyperledger Sawtooth utilises a novel consensus mechanism known as "Proof of Elapsed Time," a lottery-design consensus protocol that builds on trusted execution environments provided by Intel's Software Guard Extensions (SGX). An effort is underway to mount the Hyperledger Burrow EVM application engine as a Sawtooth transaction processor. It was written mostly in Python instead of Go. 

The consensus algorithm is called “Proof of elapsed time” and actually wants to improve what we know as a Proof of Work (also called “mining”) especially from the world of cryptocurrencies. PoET implements a hardware-based random number generator that selects which network node is allowed to close the next block of the Blockchain. The hardware requirements for this are the Software Guard Extensions (Intel SGX). This is an extended x86 CPU architecture that provides a particularly protected memory area for processes. The tedious puzzle process at the PoW is therefore abbreviated by a quick draw about the SGX at the PoET. This creates a much more scalable and energy-saving consensus mechanism. Unfortunately, this mechanism is heavily dependent on the hardware, which in turn depends on Intel. Ideologically, the PoET is questionable because consensus could be controlled by a central authority. The required SGX architecture also makes homogeneous blockchain networks difficult to manage because all nodes depend on the right physical machines.

The use of Sawtooth makes sense in some contexts. Nevertheless, one should know exactly on what technical conditions the consensus is based and how it can be manipulated. After all, an untrustworthy consensus undermines the entire effort required for blockchain usage.

3. Burrow – Build to support Ethereum Virtual Machine

Burrow is a blockchain client including a built-to-specification Ethereum Virtual Machine. Contributed by Monax and sponsored by Monax and Intel. The goal of Burrow is to build a technological bridge to the Ethereum blockchain. This is because many organizations behind project Hyperledger have also joined the Ethereum Enterprise Alliance. They are therefore interested in both ecosystems and want to benefit from them. What Burrow already offers at its early stage is a simple Blockchain architecture. This consists of three components, which (as with Fabric and Sawtooth) must be distributed redundantly over the built private blockchain network.

One of Burrow’s components is responsible for building consensus on the network, implementing Proof of Stake using the Tendermint protocol. On the subject of Proof of Stake you can hear a lot about Casper from the ranks of the Ethereum project. Casper and Tendermint differ in their approaches to implementing PoS, and there is a very informative article on Medium that explains and compares both of them.

The second component is the implementation of the Ethereum Virtual Machine (EVM). With this, Burrow actually doesn’t want to deviate very far from the EVM specification. Rather, identities are added to it. Specific authorizations can be defined for each identity. Thus, Burrow turns the normal Public Ethereum VM into a VM for a permissioned blockchain.

The third component is the API gateway, which provides the state from the local ledger of a node and the state of the distributed ledger via REST and JSON-RPC to the outside world.

The choice of Burrow is therefore particularly interesting if existing smart contracts from the Ethereum world are to be used in a private or permissioned blockchain. The Solidity programming language is also used in the development of smart contracts at Burrow. The reality of Proof of Stake as an experimental consensus mechanism should also be included in a decision.

4. Indy - Supports decentralized identity management

Indy is a Hyperledger project for supporting independent identity on distributed ledgers. It provides tools, libraries, and reusable components for providing digital identities rooted on blockchains or other distributed ledgers. Contributed by the Sovrin Foundation. The project’s mission is to manage unique identities for global use. The identities are managed in a separate distributed ledger and are also to be made usable outside the private blockchain network via interfaces. The Sovrin Foundation’s identity tool “Sovrin” uses Indy and contributes significantly to development in this way.

The heart of Indy has another name: Plenum. It implements features similar to those in Fabric (organizations, participants and related identities), but specifically for the use case of identity management, which is different from Fabric’s general approach. This document provides a helpful overview of Plenum and its integration with Indy. Plenum implements the Redundant Byzantine Fault Tolerance (RBFT) protocol.

Indy is interesting for permissioned blockchain consortia who want to manage unique identities between each other in a trustworthy way. These can optionally be consumed by other groups or even publicly. The project is technically of a high quality and fully concentrates on the needs of this one use case. Therefore, use for decentralized identity management is recommended. Indy’s tools can also be combined with other platform solutions, so that an individual identity blockchain network is not required at all cost for its usage.

5. Iroha - Light weight variant of Fabric developed in C++, with focus on mobile applications.

Iroha is also an active project that is currently working on version 1.0. The initial work on the project came from the Japanese companies Hitachi, Soramitsu, Colu and NTT Data. The principles of Iroha are very similar to Fabric, but based on a different codebase. Iroha is developed in C++, using a modern codebase and clean design. The project therefore sees its unique selling points in a high performance and simplicity of the architecture. It is aimed at applications in which fast synchronous transactions with small payloads are required. For this purpose, decentralized backends of mobile applications are considered a valid use case.

Business logic is also achieved as chain code in Iroha, usually written in Java. The resulting artefact is executed in a sandboxed JVM on each node. Aspects such as currencies and communication with mobile devices are, however, already features of Iroha. This means that you do not have to implement separate chain code for each application.


Hyperledger Tools: 

The tools from the Hyperledger project are each aimed at one of the presented platforms. They can generally not be used with each other or across several solutions.

1. Composer - Collaboration tools for building blockchain business networks

Hyperledger Composer is a set of collaboration tools for building blockchain business networks that make it simple and fast for business owners and developers to create smart contracts and blockchain applications to solve business problems. Built with JavaScript, leveraging modern tools including node.js, npm, CLI and popular editors, Composer offers business-centric abstractions as well as sample apps with easy to test devops processes to create robust blockchain solutions that drive alignment across business requirements with technical development.

Blockchain package management tooling contributed by IBM. Composer is a user-facing rapid prototyping tooling, running on top of Hyperledger Fabric, which allows the easy management of Assets (data stored on the blockchain), Participants (identity management, or member services) and Transactions (Chaincode, a.k.a Smart Contracts, which operate on Assets on the behalf of a Participant). The resulting application can be exported as a package (a BNA file) which may be executed on a Hyperledger Fabric instance, with the support of a Node.js application (based on the Loopback application framework) and provide a REST interface to external applications.

Composer provides a GUI user interface "Playground" for the creation of applications, and therefore represents an excellent starting point for Proof of Concept work.



2. Caliper - to measure the performance of a specific blockchain implementation

Hyperledger Caliper is a blockchain benchmark tool and one of the Hyperledger projects hosted by The Linux Foundation. Hyperledger Caliper allows users to measure the performance of a specific blockchain implementation with a set of predefined use cases. Hyperledger Caliper will produce reports containing a number of performance indicators, such as TPS (Transactions Per Second), transaction latency, resource utilisation etc. The intent is for Caliper results to be used by other Hyperledger projects as they build out their frameworks, and as a reference in supporting the choice of a blockchain implementation suitable for a user’s specific needs. Hyperledger Caliper was initially contributed by developers from Huawei, Hyperchain, Oracle, Bitwise, Soramitsu, IBM and the Budapest University of Technology and Economics.

3. Explorer - Web application to view, invoke, deploy, query data stored in ledger

Hyperledger Explorer is a blockchain module and one of the Hyperledger projects hosted by The Linux Foundation. Designed to create a user-friendly Web application, Hyperledger Explorer can view, invoke, deploy or query blocks, transactions and associated data, network information (name, status, list of nodes), chain codes and transaction families, as well as any other relevant information stored in the ledger. Hyperledger Explorer was initially contributed by IBM, Intel and DTCC.

The Explorer can also be used in conjunction with Fabric. It is to be configured for one or multiple channels in a Fabric network. From then on, a web interface can be used to make the state and history visible in the distributed ledger. The tool is therefore suitable for different needs under the use of Fabric, e. g. if parties are supposed get a simple view of data in the blockchain or as a tool for administrators and auditors.

4. Quilt - offers interoperability between ledger systems by implementing the ILP 

Hyperledger Quilt is a business blockchain tool and one of the Hyperledger projects hosted by The Linux Foundation. Hyperledger Quilt offers interoperability between ledger systems by implementing the Interledger protocol (also known as ILP), which is primarily a payments protocol and is designed to transfer value across distributed ledgers and non-distributed ledgers. The Interledger protocol provides atomic swaps between ledgers (even non-blockchain or distributed ledgers) and a single account namespace for accounts within each ledger. With the addition of Quilt to Hyperledger, The Linux Foundation now hosts both the Java (Quilt) and JavaScript (Interledger.js) Interledger implementations. Hyperledger Quilt was initially contributed by NTT Data and Ripple.

5. Cello - DevOps and on-demand service model to blockchain
Hyperledger Cello is a blockchain module toolkit and one of the Hyperledger projects hosted by The Linux Foundation. Hyperledger Cello aims to bring the on-demand “as-a-service” deployment model to the blockchain ecosystem to reduce the effort required for creating, managing and terminating blockchains. It provides a multi-tenant chain service efficiently and automatically on top of various infrastructures, e.g., baremetal, virtual machine, and more container platforms (like Kubernetes and Docker Swarm). It can manage multiple blockchain networks, not just one. The status of the systems is also displayed via a dashboard. This means that resources can also be scaled and managed. So far only Fabric 1.0 networks are supported in Cello. As a short summary, Cello is meant to bring DevOps approaches and practices to the Hyperledger platform projects.Hyperledger Cello was initially contributed by IBM, with sponsors from Soramitsu, Huawei and Intel.

Baohua Yang and Haitao Yue from IBM Research are committed part-time to developing and maintaining the project.

Conclusion:

The Hyperledger project pursues several approaches for the implementation of private and permissioned blockchain applications. Fabric seems to be considered the most mature and active of them. For the beginning, however, this was an overview of Hyperledger, which should help to roughly understand the individual projects. Since the platforms provide different approaches for different scenarios, the overview can help you make a decision for the right platform.

However, the most extensive and flexible project, designed with the widest range of use cases in mind, is Fabric. The biggest tool from the project, Composer, can be seen as a framework for Fabric. It facilitates the development and modeling of business networks. Cello and Explorer can also be used with Fabric. This shows that Fabric is working hard on good tooling. Fabric is currently the best choice for most applications.

2 comments:

  1. A great piece that sheds much needed light on some of the great theoretical/ideological debates in the contemporary crypto space. At CleanApp Foundation, we appreciate the emphasis on pragmatism, and emphasis on Blockchain/DTL/Crypto projects that offer real social utility. Looking forward to engaging more with your crew!

    ReplyDelete
  2. I have found that this site is very informative, interesting and very well written. keep up the nice high quality writing AI-900: Azure AI Fundamentals

    ReplyDelete