What’s So Great About Casanova, Anyway?
The Casanova paper starts out by describing it as an “optimistic consensus protocol designed for a permissioned blockchain.” The question I most often get from people reading it is, “What does it mean to be optimistic?” There have been a few different articles (here, here, and here) trying to get at what’s going on, but I wanted to write one that explains in plain terms what the leaps forward are.
The answer is scalability. It’s all about scalability. This is the main limiting factor for most—if not all—current cryptocurrencies. The reason that we desperately need scalability is simple: if we’re going to use crypto as a genuine currency, it needs to be fast and easy to use by millions of people all at once. Not only that, but it has to be comparable in speed to Visa-level transaction speeds, which run at about 60k transactions per second (gee whiz!). Needless to say, the forefronts of cryptocurrency right now don’t get anywhere close.
CBC Casper was a major effort to make, as Vlad calls it, a “fully scalable blockchain.” While we think Casper makes some important observations and steps forward, it is not too hard to show that the algorithm is fundamentally incomplete. The first red flag should be that liveness has still not been proved! And indeed, as we have shown, cannot be proved on a general network. On top of that, it’s not too hard to show that Casper is limited in the same way that Bitcoin and Ethereum are. While Casper will likely be faster than both of these, we can guarantee you that it won’t reach 60k transactions per second.
Enter Casanova. Not only does it already have all the strong proofs (woo!), but Casanova makes an observation that we see as totally fundamental to reaching this goal of 60k transactions per second. You guessed it—it’s in that word “optimistic.” In the Casanova paper, by “optimistic” we mean that it’s optimized for the situations that transactions don’t conflict—in other words, it’s built on the assumption that most people don’t try to maliciously spend a coin twice. That means that Casanova doesn’t fire up the expensive, prohibitively time-consuming consensus mechanisms unless it notices that it has to.
Because of this, validators in Casanova mostly occupy themselves by recording transactions, and not debating with the entire network about which transaction to record. Add in some more incentives, like slashing, and you’ve got a system with incentivizes for users to be honest. Because of the way that Casanova is set up, the honest users will get their transactions through quickly, while dishonest users will get slowed down. Even better, dishonest users can’t slow anyone else down. Kyle likes to say that we’ll respond to dishonest users by saying, “Stop hitting yourself!” because they can only do harm to themselves.
Besides the optimism, there is another important shift that Casanova makes from traditional blockchains. That is, it doesn’t build a chain, but a directed acyclic graph (DAG). All that means is that people can all be recording transactions, all at the same time, together without having to put them into blocks on a single chain. The network keeps track of what’s called a partial order on the blocks, instead of the total order that a chain requires. This dramatically increases the speed at which blocks can be added to the blockchain (or, in our case, the blockdag), and therefore the number of transactions that can make it through the system every second.
Casanova, in one sentence, is a protocol that mostly occupies itself with recording transactions (in a partial order) and only needs to start consensus when a malicious user tries to double spend. This, along with the partial order on blocks, is the secret to the speed!
Will we make it to the fully scalable blockchain? I guess we’ll have to find out. Here at Pyrofex, though, we are certainly optimistic!