Sassafras Part 3: Compare and Convince
Authors: Elizabeth Crites, Handan Kılınç Alper, Alistair Stewart, and Fatemeh Shirazi
This is the third in a series of three blog posts that describe the new consensus protocol Sassafras, which is planned to be integrated into Polkadot, replacing the current BABE+Aura consensus mechanism.
Here is an overview of the three blog posts:
Part 1 - A Novel Single Secret Leader Election Protocol: The aim of this blog post is to give an introduction that is understandable to any reader with a slight knowledge of blockchains. It explains why Sassafras is useful and gives a high-level overview of how it works.
Part 2 - Deep Dive: The aim of this blog post is to dive into the details of the Sassafras protocol, focusing on technical aspects and security.
Part 3 - Compare and Convince: The aim of this blog post is to offer a comparison to similar protocols and convince the reader of Sassafras's value.
If you have not read Part 1 and Part 2
Here is a a summary:
- Sassafras is a consensus protocol for electing the leader who will produce the next block. It may be combined with a finality gadget that ensures transactions are finalized, such as Grandpa, to achieve a blockchain with blocks that are finalized in constant time intervals (e.g., every 6 seconds on Polkadot).
- It works by validators sending the tickets they have generated using online public randomness to other validators, who act as identity guards. Validators then publish these tickets on-chain where they get sorted. The first validator in the sorted list reveals their identity and produces the next block.
- Sassafras achieves a unique balance: it ensures enough security to make forking attacks infeasible, while being extremely efficient. This combination makes it an attractive option for deployment in the real world.
Let's jump into a comparison with other leader election protocols.
Non-Single Leader Election
In Part 1 of this series, we discuss how BABE finds block producers. More formally, BABE is based on probabilistic leader election (PLE), which is quite common in proof-of-stake (PoS) protocols. Due to the probabilistic nature, multiple leaders may be elected for a slot, or no leaders at all. The additional runoff procedure for selecting a leader increases the time needed to extend the blockchain. Concretely, Azouvi and Cappelleti show that the block finality time for a PoS protocol is decreased by 25% when single secret leader election (SSLE) is used versus PLE. Even more important, for an adversary who controls at most of the validators, SSLE provides higher security than PLE against private attacks, the most damaging kind of attack, where an adversary can create a private chain that overtakes the honest chain.
PLE-based PoS protocols provide security with more adversarial power (up to 49%), but are significantly slower (25%) to finalize the blocks. Sassafras provides security with less adversarial power (), but finalizes the blocks significantly faster.
Single Secret Leader Election
Given the advantages of SSLE, several protocols have been proposed. We begin by providing a brief overview of various approaches.
Shuffling
The most common approach to SSLE is shuffling, where each participant registers a commitment in a list, which is repeatedly shuffled, and the winning index is selected via a randomness beacon (i.e., a public source of randomness). The main drawback of these protocols is the significant overhead associated with the proofs for correct execution of the shuffle operations. The cost to verify a proof scales linearly with the number of parties, which is impractical for on-chain use. To address this issue, Boneh et al. suggest dividing the list into sublists of size and shuffling only the sublist instead of the entire list (called "stirring"). We refer to this protocol as Shuffle-1.
WHISK
WHISK is an efficient SSLE protocol proposed for Ethereum, based on the Shuffle-1 approach (i.e., "stirring"). Like Sassafras, it performs batch leader elections, in which a single leader is selected for several elections at once. The batch capability enables scalable deployment as a leader election protocol for blockchain, as the rate of leader election aligns with the rate of block production. We give a detailed comparison of WHISK and Sassafras at the end of this blog post.
PEKS
Functional encryption is a generalization of public key encryption where decryption yields a function of the encrypted message (instead of simply the encrypted message itself as in standard encryption). Public key encryption with keyword search (PEKS) is a form of functional encryption, which is used by Catalano et al. to construct an SSLE protocol as follows. Each participant who registers in an election is given a secret key for . A subset of participants collaboratively generate a ciphertext that encrypts a random "keyword" . The participant holding is able to decrypt , and provides a proof that attests to this fact in order to claim leadership.
Other Approaches to SSLE
There are other approaches to SSLE, including indistinguishability obfuscation (IO) and threshold fully homomorphic encryption (TFHE); however, they are impractical due to the heavy cryptographic operations required.
Comprehensive Comparison
We now give a comprehensive comparison in terms of the security guarantees and communication and computational overhead of the above protocols and Sassafras.
Security Comparison
We assess the security of SSLE protocols based on three criteria, summarized in Table 1.
- Public Slots: A public slot is one in which the leader for that slot is known (either publicly or to the adversary).
In Sassafras, a slot is public if the repeater of the ticket assigned to a slot is malicious, as described in Part 2. The leader of a public slot may be attacked.
- Unpredictability Level: The unpredictability level of a leader is the reciprocal of the anonymity set.
Shuffle-2 and Shuffle-3, by Catalano et al., as well as the PEKS-based protocol exhibit the highest level of unpredictability. For all non-public slots, Sassafras achieves a similar level of unpredictability.
- Security Model: Protocols are proven secure via a security game, or in the universal composability (UC) model, which guarantees security when composed with other protocols in a larger system. Security is proven either against a static adversary, who is assumed to control a set of parties from the onset only, or against a stronger adaptive adversary, who may dynamically corrupt parties as the protocol progresses.
Sassafras and Shuffle-3 achieve the highest level of security, against adaptive adversaries in the UC model. Shuffle-1 and WHISK are insecure in our threat model. We discuss this in detail at end of this blog post.
Protocol | Public | Anonymity Set | Security |
---|---|---|---|
Shuffle-1 | none ✓ | game-based, static (insecure in our threat model) | |
Shuffle-2 | none ✓ | ✓ | UC, static |
Shuffle-3 | none ✓ | ✓ | UC, adaptive ✓ |
PEKS-based | none ✓ | ✓ | UC, static |
WHISK | no formal security analysis (insecure in our threat model) | ||
Sassafras | ✓ | UC, adaptive ✓ |
Table 1: Single secret leader election (SSLE) protocols. is the total number of participants, is the fraction of corrupt parties, and is the fraction of honest parties. For batch election protocols WHISK and Sassafras, values are given per election. Public is the fraction of leaders in an election that are leaked. The unpredictability level of a leader is the reciprocal of the anonymity set, e.g., . UC is the universal composability model.
We now give a detailed efficiency comparison of SSLE protocols.
Communication Overhead
We consider validators running an SSLE protocol to elect single leaders for slots. These are the parameters proposed for WHISK as well as the PEKS-based scheme.
Our analysis demonstrates that Sassafras outperforms other protocols in terms of computational and communication costs on the blockchain.
In particular, we conducted a comprehensive comparison of various protocols based on message size during the setup phase and off-chain and on-chain election communication. The setup overhead includes messages added on the chain or exchanged off-chain related to the keys or commitments used by validators before the elections. Similarly, the election overhead includes messages added on the blockchain and exchanged off-chain during the election protocol to elect leaders.
While the setup phase is expected to be rare in PoS blockchain protocols, shuffle-based solutions (with the exception of WHISK) impose impractical levels of message overhead. For election messages on the blockchain, Shuffle-2 and Shuffle-3 are highly inefficient. In stark contrast, Sassafras introduces a mere 7.64 MB overhead on the blockchain.
Protocol | Setup | Election | |
---|---|---|---|
Shuffle-1 | Off-Chain On-Chain | - MB | - MB |
Shuffle-2 | Off-Chain On-Chain | - MB | - MB |
Shuffle-3 | Off-Chain On-Chain | - MB | - MB |
PEKS-based | Off-Chain On-Chain | MB MB | MB MB |
WHISK | Off-Chain On-Chain | - MB | - MB |
Sassafras | Off-Chain On-Chain | - MB ✓ | MB MB ✓ |
Table 2: Communication overhead of SSLE protocols on a blockchain.
Computational Overhead
We similarly conducted a comparison of various protocols based on on-chain computation required to verify election messages and the leader. Efficient on-chain computation is crucial in blockchain protocols, as they need to be performed quickly to facilitate timely block propagation.
In terms of both communication and computational overhead, Sassafras outperforms other SSLE protocols by an order of magnitude or more. Further details of our benchmark analysis can be found in the paper.
Protocol | On-Chain Comp. during the Election | Benchmark |
---|---|---|
Shuffle-1 | ms | |
Shuffle-2 | ms | |
Shuffle-3 | ms | |
PEKS-based | ms | |
WHISK | ms | |
Sassafras | ms ✓ |
Table 3: Computational overhead of SSLE protocols on a blockchain. is the total number of participants.
Key Takeaways
This concludes the three-part blog post series on Sassafras. Here are some key takeaways:
- Single leader election: Sassafras elects a single block producer for each slot, ensuring faster consensus compared to protocols that rely on probabilistic leader election, which may not guarantee a unique leader or a leader at all times.
- Maintaining the secrecy of a block producer: Sassafras ensures the secrecy of block producers to mitigate against denial-of-service (DoS) attacks.
- Lightweight: Sassafras features exceptionally low communication and computational complexity and scales better than existing solutions.
Further Reading: Security Comparison with WHISK
For the interested reader, we now give a detailed comparison of the unpredictability levels achieved by WHISK and Sassafras under the assumption that the adversary can corrupt up to of parties. These can be a combination of corrupted and weakly corrupted parties, captured by , where is the maximum fraction of weak corruptions (e.g., DoS-type attacks; see Part 2 for more details.) WHISK, like Sassafras, permits a fraction of leaders to be leaked, as seen in Table 1 under the "Public" column.
Let us consider the following toy example to demonstrate the implications of this in both protocols. Out of one million validators on Ethereum, the proposed number of validators to run the WHISK protocol is . Now consider when , so that parties can be corrupted, and parties can be weakly corrupted. Sassafras results in leaked leaders, but the anonymity set is of size , so the leaders remaining achieve good privacy, and, as discussed in Part 2 , the leaked leaders still allow consensus to succeed. In contrast, WHISK only leaks leaders, but the anonymity set is only of size for the remaining honest leaders. That is, all honest leaders in the set of parties can be easily targeted for weak corruption. Indeed, it is in the adversary's interest to simply weakly corrupt all parties in its "corruption budget." Thus, WHISK is insecure under our threat model, as is the single election protocol Shuffle-1. The main purpose of deploying SSLE protocols in blockchains is to mitigate against DoS attacks, which our model accounts for strongly, and Sassafras achieves by design.
WHISK targets efficiency over other SSLE protocols by performing batch elections with communication and computational complexity (see Table 3). Sassafras's efficiency surpasses that of WHISK by performing an arbitrary number (not restricted to ) of batch elections with communication and computational complexity.