Essential Developer Guide for Building Blockchain Applications Using Hyperledger Sawtooth
Hyperledger Sawtooth is an enterprise blockchain platform for building distributed ledger applications and networks. The design philosophy targets keeping ledgers distributed and making smart contracts safe, particularly for enterprise use.
Sawtooth simplifies blockchain application development by separating the core system from the application domain. Application developers can specify the business rules appropriate for their application, using the language of their choice, without needing to know the underlying design of the core system.
Sawtooth is also highly modular. This modularity enables enterprises and consortia to make policy decisions that they are best equipped to make. Sawtooth’s core design allows applications to choose the transaction rules, permissioning, and consensus algorithms that support their unique business needs.
For those who are not familiar with Hyperledger project Intro to Hyperledger Family and Hyperledger Blockchain Ecosystem and Hyperledger Design Philosophy and Framework Architecture articles are strongly recommended.
The features offered by Hyperledger Sawtooth are the following:
- A truly distributed DLT: The Hyperledger Sawtooth blockchain network is made up of validator nodes. The ledger is shared between all validator nodes and each node has the same information. They participate in a consensus to manage the network.
- Proof of Elapsed Time (PoET) consensus and support for large-scale networks: Hyperledger Sawtooth includes a novel consensus algorithm, PoET. PoET is a Byzantine Fault-tolerance (BFT) consensus algorithm that supports large-scale networks with minimal computing and much more efficient resource consumption compared to proof of work algorithms. PoET was invented by Intel and utilizes the special CPU instruction set called Software Guard Extensions (SGX), to achieve the scaling benefits of the Nakamoto-style consensus algorithms. Each node waits for a random period of time and the first node to finish is the leader and commits the next block.
- Fast transaction performance: Hyperledger Sawtooth keeps the latest version of assets in the global state and transactions in the block chain on each network node. This means that you can look up the state quickly to carry out CRUD actions, which provides fast transaction processing. Sawtooth requires transactions to be processed in batches and supports parallel scheduling of transactions. Parallel transaction execution not only accelerates the execution of transactions but also correctly handles the double spending problem known as Unspent Transaction Output (UTXO).
- The ability to configure private, public, and consortium blockchain networks:
Sawtooth can be configured with different permissions to build private, consortium, or public networks by specifying which nodes are allowed to join the validator network and participate in the consensus, and which clients are allowed to submit batches and transactions.
In short, we follow below steps:
- Install Hyperledger Sawtooth on a cloud service like AWS
- Configure Sawtooth validators and REST API
- Design a namespace and address for a transaction family
- Implement a transaction family
- Build a transaction processor
- Grant permission on the Sawtooth network
- Develop client applications with the Sawtooth REST API and SDK
To help blockchain developers to find their feet in Hyperledger Sawtooth development, I’ve written a series of hands-on tutorials to cover each topic in depth as follows.
Install Hyperledger Sawtooth
Follow Install and Work with Hyperledger Sawtooth recipe.
Configure Sawtooth Validators and REST API
Design a Namespace and Address for Transaction Family and Implement Transaction Family
Build a Transaction Processor and Grant Permission on the Sawtooth Network
Develop Client Applications with the Sawtooth REST API and SDK