The Hyperledger Sawtooth is described as an open source Blockchain platform. It was developed by Hyperledger, Linux Foundation’s open source blockchain project. This enterprise-grade distributed ledger was proposed by Intel becoming the flagship project under the Hyperledger Umbrella. The platform is scalable, modular, and supports permissioned and permissionless infrastructure.
Hyperledger Sawtooth features a pluggable consensus model. Its underlying design aims to add business logic to smart contracts and keep ledgers distributed. In most basic blockchain platforms, apps and core are hosted and executed on their platform. That alone could cause security concerns and performance issues.
However, Hyperledger Sawtooth isolates the core ledger system from the application specific ecosystem. Hence, it simplifies the application development while maintaining the system safe and secure. Developers can develop applications in any programming language that they prefer using Sawtooth’s modular architecture. Additionally, they can host, run, and operate their applications on system periphery without hindering the core blockchain system.
An application developed on Hyperledger Sawtooth can run as a core business logic that developers can use to run business operations. It could also be created and run as a smart contract virtual machine with a self-governing mechanism. The mechanism then creates, notifies, and executes the contracts between multiple members on the blockchain network.
Sawtooth’s core system enables both applications to co-exist enabling various applications to stay in the same instance of the blockchain network. Applications on this blockchain can define the consensus mechanisms, select transaction rules, and choose the needed permissioning to determine the working of the digital ledger in a strategy that meets all the needs of an enterprise.
Sawtooth can deliver high transaction throughput of data since it is extremely scalable. Thus, it is an excellent option for handling production supply chains.
Hyperledger Sawtooth Features
Sawtooth is designed to overcome the permissioned network challenges since the cluster of its nodes can be deployed with isolated permissioning. Its private networks have permissioning features and no centralized service will leak confidential information or transaction patterns. The blockchain manages the settings that specify identities and roles that enable participants within the network to access all information on the network.
Sawtooth has an advanced parallel scheduler that classifies transactions into parallel flows hence supporting parallel transaction execution. Sawtooth meticulously separates the transactions’ execution from each other while simultaneously handling contextual alterations subject to the locations in state accessed by a transaction.
All transactions in this network are executed in parallelism to avoid double spending even with multiple modifications to the same state. This method of scheduling enhances the performance of the network compared to the serial execution method.
Every application can define the custom transaction processors to meet the distinct needs. It offers transaction families to serve as the approach for low-level functions that include managing chain-wide settings and storing on-chain permissions. It may also be useful for particular applications like performance analysis and saving block information.
Sawtooth’s Ethereum Contract compatibility with Seth (Sawtooth-Ethereum) enables efficient interoperability of the platform on Ethereum. Thus, it is possible for Ethereum smart contracts to get successful deployment to the Sawtooth platform with Seth transaction family.
Hyperledger Sawtooth has pluggable consensus mechanisms enabling the platform to support many consensus types on the same blockchain that is chosen originally during the network setup. These consensus types can be changed on a running blockchain with a transaction.
Sawtooth also eases the deployment and development of an application by separating the application level from the core system level. It supports smart contract abstraction to enable developers to develop contract logic in the programming language that they want.
Sawtooth supports a variety of consensus implementations that include Dev mode, Proof of Elapsed Time (PoET), and PoET Simulator.
PoET is a Nakamoto-style consensus developed as a production-grade protocol. The protocol can support large network populations. It can achieve the scalability of Nakamoto-style consensus mechanism without experiencing the power consumption drawbacks of the PoW algorithm while primarily relying on a secure instruction execution.
The PoET simulator enables PoET-style consensus on a virtualized cloud environment and any hardware. The Dev mode is a simplified random-leader mechanism that is used for testing and development.
Transaction language together with data model is implemented in one transaction family. Sawtooth provides multiple transaction families as models although developers can create custom families to represent their unique needs. The IntergerKey tests the deployed ledgers while the settings offer an implementation for saving on-chain configuration settings.
The smallbank manages performance analysis for testing and benchmarking performances when doing various comparisons of the blockchain systems’ performance. BlockInfo provides an approach for the storage of all information about a number of the historic blocks. Identity is designed for the management of on-chain permissioning for validator and transactor keys to simplify identity management for all the public keys’ lists.
Starting Hyperledger Sawtooth Application Development
For starters, developers must set up and execute a local validator to test their application before they start developing their application on the Hyperledger Sawtooth platform. Once the network is up and running, they can execute new transactions and get the block data from the blockchain through HTTP and Sawtooth REST API.
Validators can operate from prebuilt Docker containers deployed in AWS from the AWS marketplace or installed using Ubuntu 16.904. Docker Engine and Docker Compose can be installed on Windows, Linux OS, and MacOS.
Setting up Sawtooth Environment
A Docker Compose file is available to start building a Sawtooth environment. The Sawtooth environment features the following containers:
- The Settings, XO transaction processors and IntegerKey
- REST API connected to the validator
- A single validator that uses dev-mode consensus
- A client container that will run Sawtooth commands
The Docker Compose file also acts as a representation of the container images to get from Docker Hub and the network infrastructure necessary for containers to interact correctly. Docker Compose File acts as the basis for the multi-container Sawtooth application development environment.
Developers can just download the Docker Compose File and create the environment for the entire development of Sawtooth application. Starting up the Sawtooth environment involves opening a terminal window, switching the working directory to the same directory where you stored the Docker Compose file, and running the command.
Downloading the docker images takes several minutes and once you get the containers that register and build the initial blocks you can move to the next step. If the environment needs resetting or stopping, the developer must log out of the client container to return to the default state and press CTRL- C from the Windows system where they first executed docker-compose.
To create and submit transactions to the Sawtooth network, follow the guidelines here.