We’ve been working on building enterprise blockchain application for big giants from various verticals like Manufacturing Industry, Banking, Insurance and what not. In our earlier stages we were completely into IBM’s Hyperledger Fabric and Hyperledger Composer. It was all fine until the day we tried Hyperledger Sawtooth for the very first time in our R&D team. Soon we came to know that sawtooth is written in a very much better way and with a well thought design for a blockchain framework. In this article, I’ll summarize few things that we noticed which Sawtooth is handling better than Hyperledger Fabric.
The Component Designs
In Hyperledger Fabric, we have lot of components that are mandatory to run the network, which includes Peer, Orderer, Kafka, Zookeeper, CouchDB, Certificate Authority, Chaincode and Additionally the client application. Setting up a distributed architecture with these many components is such a tedious task. While in Sawtooth, we have only Validator, Transaction Processor & RestAPI. And that to setting up them is pretty straight forward unlike fabric where we need to create configurations for certs, genesis block, channel config, anchor peer etc.
When compared to performance, as I mentioned in one of my own article here (), Fabric is really good for a small scale, pre planned network but when the system grows and reaches are large data volume, Fabric wont be able to handle it efficiently like sawtooth because of it design. While Sawtooth stays with good performance even with large scale networks.
Below are our sample benchmarks.
5 Endorser Nodes - 120 TPS
above 10 Endorser Nodes - 30 - 40 TPS
5 Validators - 70-80 TPS
above 10 Validators - 70 TPS
In terms of querying the database or world state, fabric has only one way which is to query with help of chaincode, but it’s not scalable when you’re querying more than 10K records as it’s crossing various components. And also we dont have any other option other than CouchDB in fabric. While in sawtooth we have complete freedom on what database we want to write our world state to. We can write it to Databases like Rethink, CouchDB, MongoDB, MySQL, Postgres, etc. And if we need to do a lot of analytics on it, we can even write it to Google’s BigQuery.
One important thing that Fabric lacks is the world state management. When we talk about blockchain the blocks are used to track the entire network’s history. But in fabric the world state is separate from the ledger data and they both are working autonomously thus if one change without noticing other, we dont have a way to track that activity. While in Sawtooth the ledger and state is managed in one single merkle tree thus both are tightly couple to each other. This promises that if the state changed without a valid transaction, the node will become invalid as the chain will be broke.
These are some of the things that we noticed in both the frameworks and looking for more impressive stuff that sawtooth can get us. If you have some thoughts on these, please write it in our discussion.