Know Hyperledger Fabric? Then moving to Sawtooth is easy

On , by

I’ve been using both Hyperledger Fabric and Sawtooth for sometime now. While they’re both great frameworks, they each have their own nicks and workarounds. In this article I aim to draw both the framework differences so that you can choose what suits you best.

Transaction Processor & Chaincode#transaction-processor-chaincode

One of the main advantages of Sawtooth is that the “smart contract” or transaction processors (as called in the Sawtooth world) can be written in wide verity of languages like Rust, Python or JavaScript. Migrating transaction processors to the chain is also different compared to Fabric.

Validators vs Endorsement Peers#validators-vs-endorsement-peers

The process of validating a transaction in Fabric involves a set of endorsing peers defined by the endorsement policy. After validation, the distribution of the transaction is handled by ordering services.

However in the Sawtooth architecture, there are validators which take care of validating the transactions in the network as well as distributing the transaction to other peers.

The State Store#the-state-store

Each framework handles maintaining the state of the blockchain network in its own way.

Hyperledger Fabric stores the data in either leveldb or couchdb based on the setup and manages a ledger per channel.

In the case of Sawtooth, all the data is stored in a specific address and this address is generated based on the corresponding transaction processor’s prefix. For handling rich queries an instance of rethinkdb is setup and the ledger is replicated and synced with rethinkdb.

Component Topology#component-topology

Hyperledger Fabric has a lot of components which function together to form a blockchain network. This includes Orderers, Peers, CAs, CouchDB and Tools.

But in the case of Sawtooth there is only three majors components which are Sawtooth Validator, Transaction Processors and the REST API for the Transaction Processors. This reduces the complexity of the network and brings more scalability.

Language Support#language-support

In order to write a Smart Contract on Hyperledger Fabric one has to rely on either GoLang or Javascript as no other languages are supported.

In Sawtooth, there is support for a wide variety of languages which helps organisations adopt it much more quickly. The support languages include Go, JavaScript, Python, Java and Rust. The most preferred language by the Sawtooth team is Rust since it provides native multi threading and comes with C level performance.

Share this article on Twitter or LinkedIn
Previous Blog Post: Gamification in Design - The Last Part
Subscribe to Sudo vs Root

Our newsletter rolls out every month. No fluff. Pure content.

Comments and Discussions
Skcript https://www.skcript.com/svr/hyperledger-fabric-to-sawtooth/ https://www.skcript.com/svrmedia/heroes/f/fabrictosawtooth.jpg

Connect with Skcript Global

In 72-hours, your business gets a clear blueprint of what we can do for your organization.

Contact us

Follow us on Twitter / LinkedIn / Instagram