Vlad Zamfir hopes to pressure Ethereum into innovation with CBC Casper work
The most efficient way of being correct is to be correct by definition.
One sign of the changing times is when you encounter formal job titles that didn't exist just a few years ago. Vlad Zamfir's new role at CasperLabs, as Lead Consensus Protocol Architect, is one of them.
The eventual goal is for CasperLabs to launch its own proof-of-stake blockchain, broadly similar to Ethereum's plans for a versatile proof-of-stake blockchain, but ideally somewhat tidier and more scalable.
"I believe that decentralised, scalable, and secure public "proof-of-stake" consensus protocols that are much more usable and secure than existing blockchains are possible, and will eventually make mining and Nakamoto consensus obsolete," Zamfir said. "However, I am not sure if the Bitcoin and Ethereum blockchain communities are going to be able to upgrade their protocols.
"I'm excited that CasperLabs has taken an interest in implementing a scalable blockchain protocol from the CBC Casper family of protocols, and hope that their efforts are both independently successful and put pressure on other projects (like Ethereum) to adopt the technology. I am very grateful for CasperLabs' support of my research and look forward to working with them to see it become a reality."
A specific proof-of-stake (PoS) mechanism called Correct by Construction (CBC) Casper is at the foundation of CasperLabs' plans. And as the inventor of CBC Casper, Zamfir is obviously a good person to have on the team.
Now, CasperLabs and Ethereum are racing to be the first to implement the most effective live form of Casper proof of stake.
Correct by construction
CBC is sometimes called "the other Casper." It was one of the proof-of-stake mechanisms put forward by the Ethereum community as it started putting together the nuts and bolts of how exactly Ethereum's proof of stake should work.
But in the end, CBC was passed over in favour of Vitalik Buterin's Casper FFG (Casper the Friendly Finality Gadget), primarily because CBC wasn't deemed quite as production ready and would be more complex to implement. The plan as laid out by the Ethereum team in 2017 was to implement Casper FFG while pencilling in a shift to Casper CBC down the line.
A non-technical explainer
As the name suggests, Correct by Construction Casper basically works by ensuring that the blockchain itself is built correctly, block by block, and can be finalised on the blockchain. This is in contrast to Casper FFG, which has a separate mechanism (that "friendly finality gadget") watching over the blockchain.
Why finality matters
"Finality" in this case refers to the idea that a block is confidently entrenched on the blockchain to the extent that you can reasonably assume it's final and will be there forever. If a block is later scrapped and replaced, such as in the event of two miners simultaneously discovering a valid block and accidentally forking the blockchain or in the event of a 51% attack, it obviously isn't final.
Finality on blockchains is probabilistic. For example, if there's a 50% chance of any given block being finalised, you can send a transaction and
- Be 50% certain it will stick on the first block
- Be 75% certain it will stick after two blocks
- Be 88.5% certain it will stick after the third block
And so on. You'll never reach 100%, but you can eventually get close enough to rightly call a transaction finalised.
The main goal is finding a way to get as close to 100% as quickly as possible. This is extremely difficult on blockchains because it's a network composed of countless different nodes. Some are lagging, some are trying to attack the network, some are spamming the network with conflicting transactions and it's generally an extremely chaotic environment that makes it difficult to achieve this level of certainty.
Casper FFG cuts through the noise with periodic checkpoints that declare finality every 50 blocks, while CBC uses a system that's intended to build the blockchain in a way that it can be reasonably final right out of the gate without checkpoints.
As Vitalik Buterin explains, this gives CBC two big advantages over Casper FFG.
- Its short-term chain selection algorithm and finality algorithm are both part of the same mechanism, rather than just being "two awkwardly glued together distinct components" as in Casper FFG. In FFG, the short-term chain selection algorithm (which says the longest chain is the correct chain) and the finality mechanism (that checkpoint system) are two separate mechanics.
- The safety settings are client side. This means that with CBC Casper, individual users can set their own "finality" thresholds as needed, while Casper FFG inflexibly imposes the same finality settings on everyone.
These benefits make CBC more usable and practical than Casper FFG. The reason it wasn't implemented in Ethereum was because it needed a system that could help transition it as a live network from proof of work to proof of stake. As an all-in-one, CBC couldn't be so easily implemented, whereas with Casper you can overlay elements onto the existing network in a less disruptive way.
How CBC does it
"Implementation-wise, CBC may arguably be considerably more complex than FFG, but in terms of ability to reason about the protocol, and the properties that it provides, it’s surprisingly simple," Buterin said.
At its heart, the main innovation of CBC Casper is that it goes beyond the "longest chain is the correct chain" rule that governs most blockchains in favour of a more nuanced approach. Specifically, CBC uses a fancy-sounding "latest message driven greedy heaviest observed subtree" (LMD GHOST) system.
The greedy heaviest observed subtree rule is the "longest chain is the correct chain" system. The "subtree" refers to the fork of the blockchain, while the "greedy heaviest observed" part essentially says the biggest one that consumes most miner/staker efforts is the correct one.
But when you turn this into a "latest message driven" system, you get a new way of picking which block is the correct one. The "messages" in this case refer to the messages that a node broadcasts when it's found or relayed information regarding a block.
So, under LMD GHOST, when you're trying to work out which block is the current correct block – which is what nodes constantly do – you start at the genesis block, and then each time there's a fork, you choose the side where more of the latest messages from other nodes support that block or its descendants. You know you've reached the end when you find a block with no children.
This is how all the nodes can asynchronously end up following the same fork. The next question is how to decide that new blocks are valid as soon as they're added.
How to add new blocks
"For the block to be valid, the block's parent must be the result of executing the LMD GHOST fork choice rule given the information included in the chain including in the block itself," Buterin explained.
In other words, for a block to be valid, it has to include a message explaining how it's a valid block according to the LMD GHOST decision-making rules, which is itself a message that the nodes read to determine the correct next block.
In this way, the new blocks are correct by definition once they've been added. CBC is quite literally correct by construction.
Of course, you still need to defend the system against hostile attacks.
In this case, CBC Casper works a lot like Casper FFG in that nodes are stakers who hold collateral, and if they're found to do the wrong thing, that stake can be slashed.
The exact definition of "the wrong thing" has not yet been conclusively established for CBC, but it will generally include any situation where the chain can get stuck on a certain block, or where someone could feasibly broadcast an incorrect block to the blockchain in a way that it's accepted by the nodes.
These can be programmed in different ways, with corresponding impacts on elements such as blockchain fault tolerance (the minimum amount of hostile nodes needed to take over a network), and how many confirmations someone will want to wait for before they can safely assume finality.
The upshot of a live CBC Casper blockchain
Although relatively simple in theory, and subtle in impacts, the CBC Casper proof-of-stake system could bring a lot of tangible benefits to blockchain users.
First, by eliminating some of the more arduous performance requirements anyone could more accessibly run a node to spur greater uptake. Nodes don't have to be high performance and they can drop offline without issue. It's also expected to be more energy-efficient than other proof-of-stake systems where the verification of correctness can be quite burdensome.
But most of all, it's expected to offer much higher throughput and efficiency thanks to its concurrent execution of smart contracts and other transactions.
As with most things in blockchain though, more work is needed.
Disclosure: The author does not hold any cryptocurrencies at the time of writing.
- How $1.9 trillion of stimulus could push Bitcoin’s price to a new all time high
- Ethereum price dips below $1,500 in midst of marketwide correction
- Bitcoin price drops as Fed Chair attempts to squash inflation concerns
- Ethereum price dips by 25% over the past week. What happens next?
- Ethereum price crumbles as dApps flee for cheaper platforms