Hyperledger Transact: Simplifying Distributed Ledger Development

Hyperledger is an umbrella project offering the necessary standards, guidelines, frameworks, and tools, to build open-source blockchains and related applications to use across numerous industry verticals such as banking, supply chain management, technology, production, and manufacturing. Hyperledger is a hub where various individual blockchain-based projects and tools adhering to its defined design policy operate under its umbrella.

 

Hyperledger is an open-source, global collaboration hosted by The Linux Foundation. It helps create and develop enterprise-grade, distributed ledger frameworks to support business transactions. Hyperledger was launched in the year 2016 with an organizational and technical governance structure and 30 founding corporate members. It uses a modular approach to build blockchains, and this helps companies develop what works best for them. It has attracted big companies such as J.P.Morgan, IBM, Intel, and Samsung.

AD-Blockchain-Council-01

 

Let us now move on to understand the basics of Hyperledger transact, the 14th newest project to join the hyperledger greenhouse.

 

What is Hyperledger Transact?

 

Hyperledger transact has been built based on the insights and experience gained from Hyperledger Sawtooth. Transact provides a platform-agnostic library for executing transactions with smart contracts. It helps in the rapid integration of smart contract technologies such as WebAssembly across hyperledger projects.

 

As we know, smart contracts are a fundamental concept of distributed ledger technology. Transactions are interpreted by smart contracts that update the current state of the system. Transact is informed from the experiences and design of several hyperledger frameworks such as Hyperledger Fabric and Hyperledger Sawtooth. Hyperledger Transact simplifies distributed ledger technology as it allows hyperledger developers to easily write software by providing a shared software library that takes care of all the aspects of smart contract execution such as scheduling, transaction dispatch, and state management.

 

Delving Deeper

 

All the framework-level projects and custom distributed ledgers can make use of transact’s state management and advanced transaction execution to take advantage of transact’s additional features and simplify the transaction execution code of their projects. Hyperledger transact, inspired by hyperledger sawtooth, uses architectural elements from the current transaction execution platform of hyperledger sawtooth. This includes the approach to state management, transaction isolation, and scheduling. Transact also includes some requirements from hyperledger fabric used to support different database backends and joint experiences between hyperledger fabric and hyperledger sawtooth for flexible models for execution adapters.

 

Transact uses an extensible approach to implement ‘smart contract engines,’ the new smart contract languages. Every smart contract engine implements an interpreter or a virtual machine that processes smart contracts. Seth and Sabre are those that handle WebAssembly smart contracts. Transact also provides the Software Development Kit (SDKs) to implement smart contract engines and smart contracts. This makes it easy to write the smart contract business logic in various programming languages.

 

Features of Hyperledger Transact

 

Some current and upcoming features of hyperledger transact are:

 

  • Serial and parallel transaction scheduling– This offers options for flexibility and performance. In serial scheduling, one transaction is processed at a given time, and the transactions are processed in order. In the case of parallel scheduling, multiple transactions are executed at the same time and not necessarily in order. There are specific constraints to guarantee a resulting state that matches the in-order execution that may happen with serial scheduling. Parallel scheduling offers a substantial performance benefit.

 

  • Transaction execution adapters– These allow for different execution mechanisms. The in-process adapter helps create a single custom process to execute specific types of transactions. The external adapter allows execution to happen in a separate process.

 

  • Pluggable state backends– with initial support for an in-memory Merkle- Radix tree and an LMDB-backed Merkle-Radix tree. In the future, it will also support SQL databases and key-value databases.

 

  • Transaction receipts– This contains information about resulting state changes and other aspects from transaction execution.

 

  • SDKs for languages such as Python, Rust, Go, Javascript, Java, C++, and .NET.

 

  • Events– This includes events that can be generated by smart contracts. These are captured and stored in the transaction receipt.

 

  • Support for multiple smart contract styles such as Seth (Ethereum Virtual Machine smart contracts) and Sabre (WebAssembly smart contracts).

 

 

The Architecture of Hyperledger Transact 

 

Hyperledger transact is basically a transaction processing system for state transitions. State data is generally stored in a key-value database, a Merkle-Radix tree, or an SQL database. If there are an initial state and a transaction, transact executes the transaction to produce a new state. These transitions are considered ‘pure’ as only the transaction and the initial state are used as input. Hyperledger Transact deliberately omits other features such as blocks, consensus, chaining, and peering. Frameworks such as fabric and sawtooth are responsible for these features.

The architecture of hyperledger transact includes the following components:

 

  • State– The transact state implementation offers get, set, and delete operations against a database. In the case of the Merkle-Radix tree state implementation, the tree structure is implemented on top of an in-memory database or LMDB.

 

  • Scheduler– This controls the order in which the transactions must be executed. Concrete implementations comprise a serial scheduler and a parallel scheduler. Parallel transaction execution is important for enhancing network throughput.

 

  • Context manager– This implements the context lifecycle and services the calls that write, read, and delete data from the state. In hyperledger transact, state reads and writes are sandboxed (scoped) to a specific context that has a reference to a state id and one or more previous contexts.

 

  • Executor– It obtains transactions from the scheduler and executes them in a specific context. Execution is done by sending the transaction to specific execution adapters, and these then send the transaction to a specific smart contract.

 

  • Smart contract engines– This provides virtual machine implementations and interpreters that run the smart contracts. Some of the popular engines are Sawtooth Transactions Processors, Ethereum Virtual Machine, Fabric Chain Code, and WebAssembly.

 

 

People Who Are Involved

 

The initial code of hyperledger transact was developed by Cargill and Bitwise IO. Transact aims to encourage interface alignment between projects. Bitwise IO, Intel, IBM, and Cargill are currently involved in this project. Maintainers from various hyperledger frameworks such as fabric, grid, and sawtooth have shown interest in using hyperledger transact. Hyperledger developers and blockchain enthusiasts believe this to be just the beginning. They expect that the adoption of a distributed ledger technology like this will increase once it matures.

 

To get instant updates about hyperledger certifications, check out Blockchain Council.