WTF?! (What’s a Transaction Family?!)

As a maintainer of Hyperledger Sawtooth, I’ve been getting that question frequently to the point it’s a meme for me.

I thought it would be helpful to walk through the definition of a transaction family for anyone who may also be wondering what it is or who may just be getting started working with Hyperledger technologies.

As quick background, Hyperledger Sawtooth is an enterprise solution for building, deploying, and running distributed ledgers (also called blockchains). It provides an extremely modular platform for implementing transaction-based updates to shared state (data) between untrusted parties.

That last part is important because without special abilities to handle multiple companies changing the same database, Sawtooth, or any other blockchain, would be pretty useless. Simply put, a Transaction Family is a group of operations or transaction types that you allow on your ledger. It’s an “Economy of Mechanism” (KISS if you prefer) approach to transaction APIs. Some networks will want fully programmable smart contracts. In that case you would use our EVM transaction family we have created with Hyperledger Burrow.

Other networks will instead require fixed transaction semantics to limit certain risks. In that case you will use families of transactions that offer just those operations. A simple example is the Integer Key family which provides just 3 operations (increment, decrement, and set). With just 3 operations and no looping constructs it’s very hard to have intentional or accidental transaction script problems.

A sophisticated example that still precludes arbitrary syntax is the bond trading family in our 0.7 branch. The semantics of that family include about 17 operations necessary to trade bonds and no extraneous operations that could be intentionally or unintentionally misused.

The motivation behind Transaction Families is to allow businesses to pick the level of versatility/risk that’s right for their network.

There’s a lot of other interesting characteristics of Transaction Families that have been built into the coming Hyperledger Sawtooth 1.0…

  • they can be written in almost any language
  • they run in separate processes for parallel compute and easier upgradeability
  • there is even a Settings transaction family intrinsic to Sawtooth to enforce configuration agreement on settings that impact all nodes (like interblock time).

If you’re interested, you can learn more about Hyperledger Sawtooth and see real world examples of how the technology is being used. You can also read the documentation, join the community on RocketChat or pull the code from GitHub to kick the tires today.