Understanding Hyperledger Sawtooth
Hyperledger Sawtooth is one of the finest implementations of blockchain-as-a-service (BaaS) with most standard blockchain-based systems and protocols to ensure betterment in the broad concept of Hyperledger.
- Sawtooth is basically one of the projects under the umbrella of Hyper ledger which was developed by Linux Foundation in sponsored collaboration with IBM, Intel, and SAP.
- It is an open-source blockchain platform for enterprises where smart contracts are customized without the requirement of knowing the core design system.
- It is used to create and operate distributed ledger applications and networks for enterprise use.
- It supports several consensus-based algorithms such as Practical Byzantine Fault Tolerance (PBFT) and Proof of Elapsed Time (PoET) to name a few.
- It is a highly modular structure that enables the consortium to take best-equipped policy decisions.
- The languages supported by the Sawtooth project include C++, Go, Java, JavaScript, Python, and Rust.
Features of Hyperledger Sawtooth
The Hyperledger Sawtooth project contains the following distinctive characteristics:
1 Separation Between Application level and core system
The separation provided by Sawtooth between the core blockchain system and application-level development eases the development and deployment of the application.
It facilitates developers to write contract logic in the language of their choice. The structure allows the existence of multiple layered applications in the same blockchain such as native business logic or smart contract virtual machine consensually. Each application defines the transaction processors as per their distinct requirements to streamline the creation of new contract languages.
2 Private Network with Sawtooth Permissioning feature
The addition of this feature aims to solve the challenges associated with the permissioned (private) networks. The absence of a centralized pattern increases the probability of confidential information getting leaked.
Thus, the feature enables permission as an attribute to provide more secure transactions.
3 Parallel Transaction Execution
In the general course, the serial transaction requires a consistent order guarantee for each node whereas the advanced parallel mechanism in the Sawtooth maintains the contextual changes.
It separates the execution of transactions from each other. It helps to prevent double-spending and provides a substantial increase in the performance of serial transactions.
4 Event System
It supports the creation and broadcasting of an event that allows applications to subscribe to existing or new blockchain defined by the transaction family. The subscriptions in this project are submitted and serviced through the ZMQ socket.
5 Ethereum project compatibility with Seth
The interoperability of the Sawtooth platform could be witnessed by its association with the Ethereum blockchain where the smart contracts can be deployed giving regard to the Seth transaction family.
6 Pluggable Consensus algorithm
The development of Sawtooth intends to abstract the core concepts of consensus and their required isolation from the transaction semantics. The interface supports plugging in several consensus implementation platforms.
Sample Transaction Families in Sawtooth
The data model and languages are implemented in a transaction family which reflects the unique requirements of the ledger. There are several transaction families as models which are as follows:
- The integer key is the first amongst them which is used for deploying ledgers.
- Settings, being the next transaction family model provide a reference algorithm for storing on-chain configuration settings.
- Identity handles permission structure for transactor and validator keys to manage identities for public key lists.
- Small bank: Being the transaction family that is an area specified it regulates the performance of the blockchain system which is based on the H-store Small bank benchmark
- Block Info: It provides a mechanism & methodology for storing information for configured blocks.
Consensus Algorithm Supported by Sawtooth
The Sawtooth is the pluggable consensus algorithm that supports and provides access to the following algorithm:
- Devmode (version 0.1): The Devmode is the best suitable for testing TPs with just one validator deployment. It is not meant for production use and uses only a simplified leader algorithm chosen randomly for testing and development.
- PBFT (version 0.1): It is a leader-based algorithm backed by non-forking consensus which provides Byzantine Fault Tolerance (BFT) finality. It proves ideal for a smaller-styled consortium that does not require membership.
- PoET CFT (version 0.1): It is also known by the name PoET Simulator. With adherence to the SGX environment, it provides CFT similar to other blockchains.
- This runs on any available processor not necessarily Intel OR SGX but requires poet-validator-registry TP. It also has Crash Fault Tolerance (CFT) but is not BFT.
- PoET SGX (Version 0.1): It enjoys the advantage of the SGX module in order to provide consensus with BFT alike PoW algorithms but consumes comparatively less CPU processing. To date, it is the only algorithm that requires hardware supporting SGX. Thus, it is supported currently in Sawtooth 1.0 only.
- Raft (version 0.1): It is one of the consensus algorithms that facilitate the electing of a leader for an arbitrary time. In the case of time-lapse, the leader gets replaced. It has been proved to be faster than PoET but is based on CFT, not BFT. Further, it does not even fork the transaction but seems to be a more stabilized algorithm for Sawtooth.
Applications of Hyperledger Sawtooth
- XO: The Sawtooth demonstrates the construction of basic playing Tic-tac-toe. The XO transaction family creates and takes the XO command into consideration which further allows the participants to play the game.
- Sawtooth Supply Chain: It assists in tracing the asset’s performance and textual information too. It also provides the application backed by transaction processor, custom REST API & web app.
- The provided application also demonstrates the solution that is secure and decentralized for in-browser transaction signing and illustrates synchronization of blockchain to the local database for requires queries too.
- Sawtooth Marketplace: This application contains several components together with a Sawtooth validator which helps the Sawtooth blockchain run smoothly. Additionally, it also provides a simple API for the interaction.
- Sawtooth Private UTXO: It guides on how can SGX be used for assets to be transferred off the ledger and traded in private without sharing transactional information with unauthorized parties.