Ethereum’s Big Switch: The New Roadmap to Proof-of-Stake

shutterstock_454902730-scaled
5 May 2017

After years of development, ethereum has a new plan to update the algorithm that keeps its entire network in sync.

Vitalik Buterin, ethereum’s creator, recently released a rough implementation guide that reveals the network’s developers will first start with a ‘hybrid’ system that merges bitcoin-style proof-of-work mining with its much-anticipated and still-experimental proof-of-stake system called Casper, created by Buterin.

The plan effectively means ethereum will begin alternating between the two systems, so that some transaction blocks (one out of 100) are secured via proof-of-stake and the rest remain on proof-of-work.

Buterin has notably been working on his implementation in parallel with ethereum developer Vlad Zamfir, “cross-pollinating” their ideas. According to Karl Floersch, blockchain engineer for ethereum startup ConsenSys and a coder working with Buterin on Casper’s development, the result is that the network is choosing the more conservative of two potential paths forward.

Floersch told CoinDesk:

“What Vitalik has come up with is a get-it-out-the-door, working version, that works, but might be less theoretically revolutionary than Vlad’s.”

Because Buterin’s implementation of Casper can, he thinks, get to production faster, it will be used in the first stage of ethereum’s evolution.

If implemented, this would be the first time proof-of-stake would be employed on the live ethereum platform, albeit playing a minor role. It also would a large real-world test of proof-of-stake, enabling the cryptocurrency community to determine whether the proof algorithm is a superior one, as proponents have argued.

To advocates, the goal of this potentially revolutionary change to proof-of-stake is to reduce the electricity ethereum requires to reach agreement on the state of transactions and contracts on the network. But, since it has been pushed back several times, detractors see this hybrid as the latest evidence that proof-of-stake won’t ever be fully implemented successfully on ethereum.

Others say the hybrid implementation is just about security given that the network now secures millions of dollars in value.

Blockchain consultant Ciaran Murray, for example, called this move a “precautionary” measure, while Buterin called it a “stepping stone” that he expects to take place after ethereum shifts to stage three of its development process, a planned phase called Metropolis.

Buterin told CoinDesk:

“[T]his is going to be our primary focus after Metropolis from a development standpoint, and right now we are very actively in the process of developing a prototype in Python.”

Virtualizing mining

To take a step back, the big idea behind proof-of-stake is to ‘virtualize’ the mining process.

In proof-of-work, miners compute puzzle answers at dizzying speeds, a process that requires money for equipment and electricity. In proof-of-stake, participants similarly commit money to the system, but not with electricity and equipment. With Casper, virtual miners, known as validators, commit money to the system with the understanding that they will lose their deposits if they don’t follow the rules.

Recently, alongside advancements in the algorithm theory, Ethereum Foundation formal verification engineer Yoichi Hirai has been running the Casper scripts through a mathematical bug detector, a process known as ‘formal verification’.

According to general notes on his formal verification work, Hirai is using the mathematical tool on smart contracts “so that no surprises happen after deployment”.

Since smart contracts can’t be changed after deployment, developers are proceeding with extra caution. The same caution applies to Casper, which is itself enabled by a smart contract.

Casper’s stage one

In stage one of Buterin’s plan, proof-of-stake will be used as a ‘checkpoint’ every 100 blocks, and will offer further evidence that blocks store the correct transactions (what the devs call ‘finality’).

Floersch is currently coding the ‘fork choice rules’ for pyethereum, the Python ethereum client. These rules outline how validators determine which ethereum chain to build on, he explained. Validators look at the chains in front of them and make their choice partially based on how much ether is committed to each chain.

If validators make the wrong decision, they’ll lose money.

“You can see how it forms a consensus, or it forms a single chain instead of a bunch of chains,” said Floersch.

Casper developers will publish the smart contract on ethereum, creating an official Casper account where anyone can deposit ether if they want to engage in the virtual mining process.

Once the pyethereum version is done, the team will pass on the work to be incorporated in the Casper daemon, a package that will eventually be run along with each ethereum client, whether Geth or Parity, for example.

Stage two, then, is to deploy this process on a larger scale.

A good idea?

Whether proof-of-stake will work or not has already been debated ad nauseum, with sides largely split based on people’s previous cryptocurrency purchases.

But dissenters have some reason to worry. If the network doesn’t work as planned, there’s a chance transactions won’t go through as users expect, or that smart contract rules might not add up. This is why ethereum’s engineers are trying to work out the ‘finality’ property.

Others are skeptical of the hybrid approach in general.

“I’m not exactly sure about the wisdom of a staged transition. You either have faith and confidence in your consensus algorithm or you don’t,” said Charles Hoskinson, CEO for blockchain tech firm IOHK.

It should be noted that IOHK is heavily involved in the development of ethereum classic, which is often viewed as a competitor to ethereum.

“Adding an untested or insecure component to your network as a wait and see is a terrible idea,” he continued. “Also where is the peer review? What conferences have they submitted a proper white paper to and what feedback have they gotten?”

But, to some in this nascent field of ‘cryptoeconomics’, this back and forth is exciting. Floersch mentioned the combination of economics and cryptography that underpins Casper can potentially be applied to other global problems.

“Of course [proof-of-stake] a really cool problem and it’s great. But, I think down the line, there will be other applications of cryptoeconomics, which I think is a whole new field of mechanisms to use economics to provide a desired outcome,” he said, concluding:

“Casper is one of the first ones that do that.”

Alarm clock image via Shutterstock