Thunder Whitepaper
Thunder Whitepaper
Thunder Research
1 Introduction
In this white paper, we introduce the Thunder protocol, a new and provably secure consensus
protocol, which overcomes the two main bottlenecks of classic blockchains:
Confirmation times: The security of Nakamoto’s blockchain protocol requires the block-time
to be significantly larger than the maximum network latency [20]; this is why in Bitcoin,
new blocks of transactions get mined every 10 minutes, and a transaction is only consid-
ered confirmed once it has been incorporated in a block and there are 5 subsequent blocks
following it; thus it takes on average one hour for a transaction to be confirmed (with low
confidence). While Ethereum uses a smaller block-time, the average confirmation time still
remains relatively high—approximately 13 minutes. These long confirmation times hinder
many important applications (especially smart contract applications).
Our Thunder protocol overcomes both of these issues, achieving both high throughput and fast
confirmation time (under typical circumstances within 2 network roundtrips), while being robust
up to a 50% attack.
While we are aware of several other recently suggested approaches for overcoming the above
two bottlenecks, these approaches are either restricted to only payments (and do not handle smart
contracts), or provide security only against a weaker 1/3-attack; additionally, many approaches are
based on heuristic arguments, whereas our protocol is accompanied by a rigorous proof of security;
see Section 4 for more details.
The design of Thunder is inspired by a new theoretical paradigm for consensus proposed in
our earlier work, Thunderella [21], and provides the first practical instantiation of this general
paradigm. This paradigm can be instantiated using either Proof-of-Work or Proof-of-Stake.
1
2 The Thunder Protocol
Following our Thunderella paradigm [21], the key idea behind Thunder is to combine a “standard”
blockchain—which we will refer to as the slow chain—with an optimistic fast-path. The fast path
is coordinated by a new entity referred to as the Accelerator, and requires the use of a committee of
“stake-holders”. As long as a) the Accelerator is acting honestly, b) network conditions are good,
and c)> 3/4 of the committee are honest, we barely need to use the slow-chain at all; instead,
transactions can be confirmed on the fast-path by the committee using an extremely simple and
lean fast-path protocol. This protocol offers both high throughput and instant confirmation of
transactions. But the fast-path only confirms new transactions assuming the above mentioned
good conditions are met. When they are not (e.g., the Accelerator misbehaves or is under attack),
we leverage the “slow chain” to recover in a provably sound manner.
We proceed to provide a more detailed description of our new consensus protocol.
2
assuming that a majority of the mining is done by honest users (a.k.a. “computational honest
majority”). More precisely, the Nakamoto protocol satisfies consistency and liveness if and only if
the mining-hardness is set as a function of the maximum network latency so that the block-time
(which in the Bitcoin system is set to 10 minutes) significantly exceeds the maximum network
latency. Ethereum’s protocol is related to Nakamoto’s and ought to satisfy them as well.
Security Contexts: We will distinguish between two different conditions on the network partic-
ipants.
Our new Thunder protocol will make use of a simple fast-path protocol in conjunction with an
underlying slow-chain to ensure worst-case security under W, and instant-confirmation and high-
throughput under O. As mentioned above, the key idea is to make use of the “fast-path” protocol
when things work well, and only use the slow-chain to recover from faults.
3
sequence of consecutive (in terms of their sequence numbers) notarized micro-blocks—all
transactions contained in them are considered confirmed. In this way, the fast-path instantly
finalizes transactions.
It is easy to prove (and well-known) that this protocol is consistent under the condition Wfast =
“> 1/2 of the committee members are honest”); additionally, it satisfies liveness with instant
confirmation under the conditions Ofast = “1) the Accelerator is online and honest, 2) > 3/4 of the
committee members are online and honest”. In fact, under these optimistic conditions, we only
need 2 communication rounds to confirm a transaction! This approach is extremely practical and
indeed similar protocols are often used in practice—for instance chain.com uses a related protocol
for their permissioned consensus protocol.
The problem with this approach, however, is that the protocol does not satisfy liveness (even
“slow” liveness) under condition Wfast . If the Accelerator is cheating (or is simply taken down from
the network), the protocol halts. (Indeed, in this case chain.com would have to manually fix the
issue, which is impossible in a decentralized setting.)
Heartbeats: For every length ` of the slow-chain, the Accelerator takes the hash h of the current
log (of the fast path) and sends out the tuple (`, h, seq) (where seq is the current sequence
number) to get notarized by the committee members (who all check that h is correct based
on the history they have seen); we refer to a notarized version of such a tuple (`, h, seq) as a
heartbeat. The Accelerator is subsequently required to post the heartbeat to the slow-chain.
Cool-down: Next, if some user notices that its transaction is not getting confirmed by the ac-
celerator/committee, some “evidence” of this will become apparent on the underlying slow-
chain—as we shall see shortly, the evidence is simply the fact that no heartbeat has been
observed on the slow-chain for a sufficiently long period of time. (Note that by liveness, and
the bounded chain growth properties of the slow-chain, if Accelerator and more than 3/4 of
the committee are online and honest, we are guaranteed that a heartbeat for length ` gets
incorporated close to length `). Whenever such evidence of cheating (i.e., no recent heartbeat
are contained on the slow-chain) has been found, we enter a “cool-down” period, where com-
mittee members stop signing messages from the Accelerator, yet we allow anyone to post any
“new” notarized transactions (which were not included in the most recent heartbeat) to the
slow-chain. The length of the cool-down period is counted in blocks of the slow-chain (say κ
blocks where κ is a security parameter).
Slow mode: Finally, after the cool-down period ends, we can safely enter a “slow period” where
transactions only get confirmed in the slow-chain blockchain (and the fast-path is no longer
active). We stay in the slow-chain for an appropriate amount of time counted in blocks on
the slow-chain (e.g., enough blocks to restore or replace a faulty Accelerator) and can next
reboot with a new epoch of the fast-path protocol; more details on the reboot step can be
found in Section 2.4.
4
Let us point out the reason for having a cool-down period: Without it, players may disagree on
the set of fast-path transactions that have been confirmed before entering the “slow mode”, and
thus may end up with inconsistent views. The cool-down period enables honest players to post all
notarized transactions they have seen to the slow-chain, and thus (slowly) reach consensus on this
set of transactions; once we have reached this consistent view (at the end of the cool-down), we
can finally fully switch over to confirming new transactions on the slow-chain.
Rely on recent miners: Perhaps the simplest approach is to select the committee as the min-
ers of, say, the 500 most recent blocks on the slow-chain (as was done in [23]). We note,
however, that to rely on this approach, we need to ensure that the underlying is slow-chain
is “fair” [22] in the sense that the fraction of honestly mined blocks is close to the fraction
of honest players. This is not the case for Nakamoto’s original blockchain nor Ethereum
(see e.g., [14]), but as shown in [22], any blockchain can be turned into a fair one. If we
use this approach, the resulting protocol will now be consistent and live under simply the
5
condition W =“computational honest majority” (as this condition implies that a majority
of the committee will be honest), and high-throughput and instant confirmation holds under
the optimistic conditions O = “1) The Accelerator is honest, 2) > 3/4 fraction of the mining
power is honest.”
Subsample from all stake-holders: If the blockchain is used for a cryptocurrency (as we intend
here), we may instead select the committee by subsampling from the recent stake-holders.
This can be done using the method from our earlier work Snow White [11]:
The committee that is active when the slow chain has a length ` is selected based on the
stake-holders when then the slow chain had length ` − 2κ by using a selection function that
takes as input the hash of the chain at length `−κ. As explained in more detail in our earlier
work [11], the reasons for the 2κ “look-back” is to prevent against attacks where an attacker
adaptively selects its keys to have a higher probability of getting elected to the committee.
This approach ensures consistency and liveness under the conditions W = “1) the slow-chain
is secure, 2) > 1/2 of the stake holders are honest”; and achieves fast confirmation under
the conditions O = “1) The Accelerator is online and honest, 2) > 3/4 of the stake holders
are online and honest”.
The drawback of this approach is that it may be too optimistic to assume that a majority
of stake-holders are online (and thus the conditions for the fast path may rarely hold). The
next approach deals with that issue.
Select from stake-holders putting down an escrow: One potential drawback of the above
approach is that not stake-holders may want to participate in transaction validation. Rather
than subsampling from the full set of stake holders, we may instead ask stake-holders that
intend to participate the to put down an escrow (as a message posted on the slow-chain). We
can then select from these stake-holders who have put down escrow. One idea is to select the
members putting down the most amount of escrow, since we would like to encourage more
stake to join the committee and protect the fast path. The actual algorithm we implemented
is motivated by this idea but a carefully crafted variant such that we can prove that the
equilibrium behavior satisfies certain desirable properties.
More generally, committee selection can be performed by applying a general predicate to a
stabilized part of the slow-chain.
6
3.1 Notations and Useful Definitions
• The underlying slow-chain. Nodes (a.k.a. “miners”) run an underlying blockchain protocol
referred to as the “slow chain”; we use the notation chain to denote a node’s the view of the
slow chain. We use the notation chain[: `] to denote the prefix of chain upto the `-th block;
we use chain[: −`] to denote chain where the last ` blocks have been removed. (Recall that the
consistency property of a blockchain does not guarantee that everyone has a consistent view of
the whole chains, but they do once the last κ, where κ is a security parameter, blocks—that is
the “unstable blocks” have been removed.) We chain[` : `0 ] to denote the part of chain from the
`-th block to the `0 -th block.
We assume there there is some commonly known starting length `start for the slow-chain at
which we begin the execution of the Thunder protocol.2 .
• Committee selection. We assume that there is a publicly-known function denoted comm which
takes as input the stabilized part of the blockchain chain[: −κ] and outputs a set of committee
members denoted comm(chain[: −κ]). (We discussed a few concrete committee selection methods
in Section 2.5.)
• Micro-blocks: Each micro-block in the fast-path log has the form
(mblock, seq, `, tx)
where seq ∈ N is a sequence number, ` is the slow-chain length associated with the micro-block
(indicating the slow-chain length when this transaction was proposed), and tx is a transaction.
• Heartbeats: A heartbeat has the same form as a micro-block except that the transaction tx is
replaced simply by the hash h of the log: more precisely, a heartbeat has the form
(heartbeat, seq, `, h)
We say that such a heartbeat is associated with slow-chain length `.
• Notarization. Let m be of the form (mblock, seq, `, ) or (heartbeat, seq, `, ). We say that σ is
the notarization of m w.r.t. chain if a) ` ≤ |chain| and b) σ is a valid aggregate signature from
more than 43 fraction of the members of comm(chain[: ` − κ]) as well as from the Accelerator.
Whenever chain is clear from context, we simply say that σ is a notarization of m. A node i
considers σ to be a notarization of m if σ is a notarization of m w.r.t. the node i’s view of the
slow-chain.
Finally, a notarized microblock (or heartbeat) is simply a pair consisting of a microblock (or
heartbeat) and a notarization of it.
• Skipped heartbeats. We say that the slow-chain chain has a skipped heartbeat if there exists
some ` such that a) `start ≤ ` ≤ |chain| − 2κ, and b) chain[` − κ : ` + κ] does not contain a
notarized heartbeat associated with length `.3
• Yell transactions. A yell transaction is a transaction on the slow-chain with a special type-
modifier yell.
2
Later when we may have multiple epochs of the fast-mode, we can use the slow-chain to reach common knowledge
on the starting length `start .
3
That is, there exists a 2κ windows in the stabilized part of chain which does not contain its appropriate heartbeat.
7
3.2 Fast-Mode Protocol
Everyone:
The Accelerator:
8
• Notarization: Upon receiving signatures from > 43 fraction of comm(chain[: ` − κ]) on some
message m of the form (mblock, , `, ) or (heartbeat, , `, ) for which a notarization request
was sent out, compute an aggregate signature σ from the collected signatures as well as the
Accelerator’s own signature on m and broadcast m as well as its notarization σ.
Committee members: Upon receiving a tuple m of the form (mblock, seq, `, tx) or (heartbeat, seq, `, h)
with a valid signature from the Accelerator:
• assert that the node is a member of comm(chain[: ` − κ])
• assert that ` is within ±0.5κ of |chain|;
• assert that no other tuple with the sequence number seq has been signed;
• If m is of type mblock, sign m and return the the tuple and signature to the Accelerator.
• If m is of the type heartbeat,
– assert that h = H(LOG0 ) where LOG0 is the node’s fast-path log up to sequence number
seq − 15
– let TXs∗ be all yell transactions in chain[: −κ]; assert that LOG contains all of them.
– sign m and return the the tuple and signature to the Accelerator.
Miners: Participate in the underlying slow-chain’s mining. The input to the slow-chain protocol
includes:
• every yell transaction the node is aware of that has not yet been included in the slow-chain;
• every notarized heartbeat that has not been included in the slow-chain so far.
Everyone:
5
If this condition does not hold, store the transaction in an incoming message buffer until the sequence number
in LOG exceeds seq.
9
• Broadcast the fast-path log including a notarization on every micro-block.
• Let ` be the earliest block such that chain[: `] contains a skipped heartbeat6 .
• Let LOG be the maximal lucky sequence (see Section 3.2) of notarized tuples (T1 , 1, `1 , tx1 ),
(T2 , 2, `2 , tx2 ), . . . , (TL , L, `L , txL ), where each notarized tuple has been observed up until the
end of the cool-down period, i.e., in the prefix chain[: ` + 2κ]7 . If there are multiple such lucky
sequences, let LOG be an arbitrary one.
• Suppose that chain[: −κ] contains heartbeats at consecutive slow-chain lengths `1 , `2 , . . . , `k ,
where `i := `start + i − 1. Let LOGstable be a lucky sequence of notarized tuples consistent
with the hashes of these heartbeats8 .
• Output the concatenation of the following in every round:
– LOGstable ;
– every tuple in LOG whose sequence number is not included in LOGstable ;
– all other transactions contained in chain[: −κ] that have not yet been output (in the same
order as they appear in chain).
10
1) PBFT can tolerate at most < 31 fraction corruption due to a well-known lower bound [12] (in
contrast, our approach tolerates up to a 50% attack); 2) PBFT requires more rounds of voting
in the normal path (which is necessary for an asynchronous recovery) and thus is at least twice
as slow as our protocol; and 3) in comparison, our approach is conceptually much simpler than
PBFT and thus friendlier to implementation and large-scale deployment [15, 19].
• The beautiful work of Algorand [10] designs a new synchronous state machine replication protocol
and builds a cryptocurrency on top. Just like ours, their protocol is provably secure. However,
it only tolerates up to 31 corruptions; moreover, their approach requires complete redesign of the
consensus layer, whereas our approach allows us to accelerate any existing blockchain using a
simple fast-path protocol.
• Several works rely on a DAG-based approach [4,25] (rather than chain-based) to prevent double-
spending. These works do not realize our notion of a linearly ordered log; they also do not support
general smart contracts/DApps.
• Dfinity’s approach [5] relies on offchain voting on blocks to reach finality in “2 blocks of time”.
Their approach does not improve throughput w.r.t. to the underlying slowchain.
• Ethereum’s Casper [7, 8] also relies on offchain voting on blocks, but they do so to checkpoint
blocks and not to improve speed and throughput. The elegant Plasma framework by Poon and
Buterin [24] and several sharding initiatives [3, 6, 16] are conceptually related to ours. These
approaches are orthogonal and complementary to our effort.
5 Acknowledgments
We are very grateful to the Thunder team and to Vitalik Buterin for his insightful feedback and
comments.
References
[1] https://lightning.network/.
[2] https://raiden.network/.
[3] https://www.zilliqa.com/.
[4] http://iota.org/.
[5] https://dfinity.org/.
11
[9] Miguel Castro and Barbara Liskov. Practical byzantine fault tolerance. In OSDI, 1999.
[10] Jing Chen and Silvio Micali. Algorand: The efficient and democratic ledger.
https://arxiv.org/abs/1607.01341, 2016.
[11] Phil Daian, Rafael Pass, and Elaine Shi. Snow white: Robustly reconfigurable consensus and
applications to provably secure proofs of stake. Cryptology ePrint Archive, Report 2016/919,
2016.
[12] Cynthia Dwork, Nancy Lynch, and Larry Stockmeyer. Consensus in the presence of partial
synchrony. J. ACM, 1988.
[13] Stefan Dziembowski, Lisa Eckey, Sebastian Faust, and Daniel Malinowski. Perun: Virtual
payment channels over cryptographic currencies. IACR Cryptology ePrint Archive, 2017:635,
2017.
[14] Ittay Eyal and Emin Gun Sirer. Majority is not enough: Bitcoin mining is vulnerable. In FC,
2014.
[15] Pedro Fonseca, Kaiyuan Zhang, Xi Wang, and Arvind Krishnamurthy. An empirical study on
the correctness of formally verified distributed systems. In Proceedings of the Twelfth European
Conference on Computer Systems, EuroSys ’17, pages 328–343, New York, NY, USA, 2017.
ACM.
[18] Andrew Miller, Iddo Bentov, Ranjit Kumaresan, and Patrick McCorry. Sprites: Payment
channels that go faster than lightning. CoRR, abs/1702.05812, 2017.
[19] Andrew Miller, Yu Xia, Kyle Croman, Elaine Shi, and Dawn Song. The honey badger of BFT
protocols. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communi-
cations Security, CCS ’16, pages 31–42, New York, NY, USA, 2016. ACM.
[20] Rafael Pass, Lior Seeman, and Abhi Shelat. Analysis of the blockchain protocol in asynchronous
networks. In Eurocrypt, 2017.
[21] Rafael Pass and Elaine Shi. Thunderella: Blockchains with optimistic instant confirmation.
https://eprint.iacr.org/2017/913.pdf.
[22] Rafael Pass and Elaine Shi. Fruitchains: A fair blockchain. In PODC, 2017.
[23] Rafael Pass and Elaine Shi. Hybrid consensus: Efficient consensus in the permissionless model.
In DISC, 2017.
[24] Joseph Poon and Vitalik Buterin. Plasma: Scalable autonomous smart contracts. https:
//plasma.io/.
12
[25] Yonatan Sompolinsky, Yoad Lewenberg, and Aviv Zohar. SPECTRE: A fast and scalable
cryptocurrency protocol. IACR Cryptology ePrint Archive, 2016:1159, 2016.
13