Hyperledger’s Sawtooth Lake Bets on Modular Blockchains and Elapsed-Time Consensus
What is Sawtooth Lake?
At a recent Hyperledger meetup, Intel’s Head of Technology for Blockchain and Distributed Ledger Technology Dan Middleton gave an overview of the organization’s new distributed ledger platform, Sawtooth Lake.
Intel describes Sawtooth Lake as a highly modular platform for building, deploying, and running distributed ledgers. The key components for a distributed ledger are as follows:
- A data model that captures the current state of the ledger.
- A language of transactions that change the ledger state.
- A protocol used to build consensus among participants around which transactions will be accepted by the ledger.
Sawtooth Lake is also Intel’s contribution to the Hyperledger Project incubation.
What makes it different?
According to Dan, Sawtooth Lake heavily emphasizes the distributed aspect in distributed ledger technology as well as modularity. To achieve this, Sawtooth Lake makes use of the following features:
- Proof of Elapsed Time (PoET)
- Transaction families
“A distributed ledger should be both of those things.” —Dan Middleton, Intel
While Sawtooth Lake allows for pluggable consensus, the project does have its own method for consensus available—PoET. The PoET consensus provides fair leader election across a large number of nodes without the computational race of Proof of Work (PoW). Based on the Nakamoto consensus algorithm, PoET achieves distributed consensus through a lottery function with several characteristics:
- Fairness. The function should distribute leader election across the broadest possible population of participants.
- Investment. The cost of controlling the leader election process should be proportional to the value gained from it.
- Verification. It should be relatively simple for all participants to verify that the leader was legitimately selected.
PoET uses a trusted execution environment like Intel Software Guard Extensions (SGX) to ensure the safety and randomness of the leader election process without requiring the costly investment of power and specialized hardware. Intel claims that this algorithm scales to thousands of participants and will run efficiently on any Intel processor that supports SGX.
What’s the data model?
Sawtooth Lake makes use of transaction families to encapsulate business logic. According to the presentation, a transaction family can be either:
- Something as simple as a single transaction format with associated validity and state update logic.
- Something as complex as a virtual machine with opcode accounting and bytecode stored in smart contracts.
Sawtooth Lake allows these concepts to coexist in the same instance of the blockchain. The choice is up to the developer.
While Intel expects its users to build custom transaction families to cater to individual requirements of their ledgers, Sawtooth Lake does provide three transaction families sufficient for building, testing, and deploying a marketplace for digital assets.
- EndPointRegistry. A transaction family for registering ledger services.
- IntegerKey. A transaction family used for testing deployed ledgers.
- MarketPlace. A transaction family for buying, selling, and trading digital assets.
Sawtooth Lakes architecture segregates transaction payload definition, validation, and state management logic from the core system.
The core system is responsible for:
- Message handling
- Block publishing/validation
- Global state management
Based on the presentation, transaction flow proceeds as follows:
- Transactions are wrapped in batches, which provide an atomic unit of commit for multiple transactions.
- Transactions declare input and output addresses to allow for state access isolation calculations in the scheduler.
- These inputs and outputs are enforced by the Context Manager on the context established for the transaction.
- This enables parallel validation and state delta aggregation across a potentially large number of transactions.
Sawtooth Lake has been a part of the Hyperledger Project incubation since last year. Since then, a number proofs of concept have undergone development. One such application is the Marketplace Navigator, which is a browser-based GUI designed to allow users to inspect blocks and to create marketplace transactions.
Intel has a more comprehensive guide to Sawtooth Lake for anyone interested to learn the more technical aspects of the project. Anyone looking to contribute can find Sawtooth Lake in GitHub and in Slack.
Additionally, Dan will be leading a Sawtooth Lake webinar on March 7, 2017. Stay tuned!
Want details? Watch the video!
Table of contents
The meetup included other speakers including Linux Foundation’s Brian Behlendorf who talked about general updates regarding the Hyperledger Project, Iroha’s Makoto Takemiya who went over the basics of the Iroha blockchain, and Hitachi’s Satoshi Oshima who gave an update of Hyperledger Fabric v1.0. The rest of the presentations can be seen in the following video:
- The Iroha Project to Bring Mobility to Blockchain with Simple APIs
- R3 CEV Unveils Distributed Ledger with Pluggable Consensus
- Hyperledger Fabric v1.0 to Bring Improved Transactions and a Pluggable Data Store
About the speaker