Today Hyperledger announced its 14th project, focused on treating smart contracts as a component that can be added to different blockchains such as Fabric or Sawtooth. Simplistically, smart contracts are the brains in a blockchain used to run advanced functionality. After all, smart contracts are network-enabled programs. The distributed ledger is responsible for participants on the network agreeing to store the same thing and then storing it, often in blocks which are chained.
As blockchains mature, we’re seeing more mix and match between the underlying distributed ledgers and smart contracting languages. One example is the recent integration of Digital Asset’s DAML smart contracting language with several blockchain platforms, including both Sawtooth and Fabric.
One of the drivers behind the creation of Transact was the desire to incorporate WebAssembly smart contracts in both Hyperledger Sawtooth and Fabric. Sawtooth already does this with Sabre.
Several Hyperledger projects such as Fabric and Sawtooth were built with modularity in mind. For smart contracts, Fabric, for example, already supports its own ‘Chaincode’ as well as Ethereum’s Solidity.
Rather than integrating every new smart contract language with multiple distributed ledgers, it makes more sense to have a smart contract project (Transact) that supports a variety of smart contract language flavors. Then Transact can be integrated once with each distributed ledger such as Fabric, Sawtooth and Iroha. As new smart contract languages are integrated with Transact, they should ‘just work’ on Fabric and Sawtooth.
The project was initiated by startup Bitwise IO and agribusiness company Cargill which are both working on Hyperledger Grid. Given Grid is based on Sawtooth, there’s a lot of Intel influence there, and the company is involved in Transact. And to get Transact integrated with Fabric, IBM is also participating.
Another influence was the Hyperledger Burrow project which delivered a permissioned version of the Ethereum virtual machine. What happens to Burrow now?
IBM’s Blockchain CTO Gari Singh responded via email: “The entirety of Burrow would not be replaced by Transact, but Transact will allow its consumers [distributed ledgers] to leverage the Burrow EVM. In this way, consumers [distributed ledgers] can integrate with Transact and gain support for one or more engines as opposed to integrating each engine separately.”
Monax is both the contributor and maintainer of Hyperledger Burrow. Casey Kuhlman, Monax’s CEO clarified: “Burrow is very different from Transact. It’s a full blockchain framework. Transact is a library that can provide a piece of the puzzle. We plan to evaluate whether Transact is something we can use within Burrow over the coming months.”
Where does the distributed ledger end and the smart contract begin?
Transact deliberately unhooks itself from the “blocks” in a blockchain, which is how it manages to be blockchain agnostic. It takes the starting “state”, executes the transaction based on the smart contract, and gives a result which is a new state.
Nonetheless, one of the trickiest questions is what belongs in the distributed ledger and what should live in Transact. Some elements more obviously live in Transact such as the smart contracts and the engines or smart contracting languages as noted above. Others belong with the distributed ledger such as the consensus, blocks and chaining. But there’s some functionality which is more borderline.
One aspect that could cause some debate is the scheduling which decides the order of transactions. Transact includes a serial scheduler and, for higher network throughput, a parallel scheduler.
IBM’s Singh said that in fact there was little debate. “Serial schedulers are expected to work with any consumer (e.g. Current Fabric transaction processing would require the serial scheduler initially). The parallel scheduler will not be able to be used by all consumers, but makes sense to include for those that can (e.g. Sawtooth) and there are optimizations others (e.g. Fabric) can make in the near future.”
Updated to include comments from Gari Singh and Casey Kuhlman