Everyone’s favorite Friendly Finality Gadget doesn’t replace mining; it just provides Ethereum with increased security. But will it lead to greater centralization? Its creators have tried to ensure it does not.
UPDATED | May 9, 2018:
Specifications of Casper FFG have been posted to the GitHub coding repository. The finalized source code, part of version 0.1.0, promises greater coordination and project tracking for continued Casper development. Chief FFG developer Danny Ryan noted how v0.1.0 will assist developers and researchers with “more clearly tagging releases to help clients” while also helping “external auditors more easily track the contract and changes.”
Ryan further commented on v0.1.0 via Casper’s Gitter chat forum, stating, “Hope this helps client [developers] lock in versions and be aware of breaking changes in the future.”]
ORIGINAL | May 8, 2018:
Given that pretty much everybody enjoys a little validation, we’ve decided to give you a breakdown of Vitalik Buterin’s presentation during the Community Ethereum Development Conference (EDCON), in Toronto.
This Friendly Finality is Not the End
It should be known that the Casper “Friendly Finality Gadget” (FFG) is an “overlay process that lives on top of the existing proof-of-work chain,” to give blocks additional security. It does not replace proof-of-work; it only verifies it. “Finality” in this case is defined as an operation that, once completed, cannot be reverted.
Casper FFG is an important stepping stone on the road to fully switching Ethereum to proof-of-stake. It basically recruits nodes into becoming validators of the network. While this does not replace miners, it does in some way transfer an amount of power, and ability to earn ETH, into the hands of the validators.
“A validator,” says Buterin, “is someone who has a pile of ETH and deposits it into a smart contract, and [who] runs a node that basically signs coins with the same key that controls that ETH, in order to participate in Ethereum’s consensus algorithm and keep the network running.”
There is a disincentive for bad behavior, too. Nodes that attempt to hedge their bets and stake Ether in conflicting votes will be flagged by the system. That user will be logged out, bumped off the network, and could lose between 1 percent to 100 percent of their stake.
Here’s how it works.
Step 1: Choose Your Validation Code
Buterin is trying to keep the Casper code very simple and clear. “One of the goals that I’m really trying to accomplish with the design proposals for Casper and sharding is to make it so that the Ethereum protocol has no inherent built-in security assumptions other than information theory and hash algorithms.”
This means the public key/private key system used elsewhere is an inelegant adjunct for verifying identity in Casper, where the goal is to strip things down to the bare minimum. Instead, the developer proposes that “instead of specifying your public key, you literally specify a piece of code that will be used to verify any signatures that you sign.”
That functional piece of code is designed to prevent stake equivocation by a bad actor; it cannot be used to stake two different votes to safeguard a user’s position. In this way, that pure function code prevents Byzantine faults and ensures that the stakeholder is acting in good faith.
Buterin also explains that much of this will be done by the EVM client itself. “You, as a user, basically just click a button that says ‘deposit,’ and the client will automatically figure out which validation code to use.” The client will then send your Ether stake into the validation contract.
Your validation code then performs the task of verifying other transactions on the platform; this is “some private key that’s more readily accessible online,” said Buterin. This is the work output of the proof-of-stake.
Step 2: Choose Your Withdrawal Address
Your withdrawal address is where you want your staked Ether to go when you’re done validating. Generally, a cold wallet will be good for this. You’re not actually withdrawing yet, you’re just telling the EVM where you want your stake sent when you’re done verifying. Easy peasy.
Step 3: Make Your Deposit
“Your deposit transaction,” Vitalik clarified, will be “included in the Ethereum blockchain.” This process, in which the minimum of 1,500 ETH can be staked, takes about 45 minutes, as the staked ETH induces the EVM to verify other transactions. After those 45 minutes, your identity-as-code has been written into the platform itself and “you are now staking.” At this point, you will need to…
Step 4: Stay Online
The Friendly Finality Gadget (FFG) consensus is split up into a series of time periods called “epochs.” An epoch consists of 50 blocks generated to the Ethereum blockchain, taking approximately 20 minutes to do so. Every epoch, you as a validator can send one transaction – a cryptographically signed “vote” of Ether – which will allow your node to vote for a block at the start of a new epoch. “Keep your node online, keep your node running,” Buterin says, and you will continue to contribute to the security of the Ethereum network.
“Who here knows how to keep a computer connected to the internet?” he quipped. “Welcome to being a Casper validator.”
Membership in Casper FFG has its rewards: Those who stay in the pool and validate are rewarded with Ether proportional to the amount already staked in the system, at a rate between 0 percent and 5 percent each year. This is the carrot that had previously been held out only to miners, the chance to win Ether from one’s labor on behalf of the network.
Casper Doesn’t Like Bad Guys
Out of concern for network security, the FFG incorporates a mechanism that “slashes” (evicts from the system) any node that attempts to submit votes inappropriately (or “obviously evil,” according to Buterin). Here are the two “slashing conditions”:
- “NO_DBL_VOTE,” which disallows one actor from staking two different votes in the same epoch, thereby allowing one bad actor who’s created two identities/accounts to participate in validating the network without risking ETH.
- “NO_SURROUND,” which disallows a vote referencing a block over one block backward in the chain, thereby “forgetting” or overwriting recent transactions on the blockchain.
These conditions are in place to ensure no one can mess with the record of the blockchain, giving themselves an unfair advantage or erasing transactions. No shady agents can negate their stake’s expenditure by double voting, or by rewriting the chain to suit themselves.
Some onlookers posit that PoS could centralize network power in the hands of those who can afford to make regular stakes. Casper FFG does involve a disincentive to expanding the pool of stakeholders and keeping it limited to all but a few large mining pools or whales: Each additional stakeholder in the system detracts from an individual stakeholder’s earnings. “If more people deposit, then every validator earns slightly less,” admitted Buterin. While this is true on paper, it seems unlikely that a group of developers so committed to the equitable distribution of systemic power would fail to consider, or to plan to avoid, such an eventuality.
They’ve addressed this issue, to a degree, by ensuring that slashed stakers lose 3p of their stake (where p = the portion of other validators slashed within four months of that user’s slash). Stake more Ether, lose more money. Not only that, but the system is designed to encourage a user to utilize “failure modes [that] are maximally discorrelated” from other users’ failure modes. To avoid getting bunched in with a cluster of other slashed actors within four months’ time, you would want to avoid staking pools. You would also want to avoid using the same operating systems, virtual private servers (VPS), or implementations as others. “You’ll be much better off if you fail alone than if you fail with a whole bunch of other people,” Vitalik noted. You’d want to decentralize yourself from other folks running nodes, which would help the whole platform stay decentralized – one would hope.
Step 5: Log Out
Should you decide to end your involvement with the network, you’d need to log out. Once you’ve initiated logging out via your client, it takes about a week for the Ethereum blockchain to write you completely out of the blocks – about 700 “dynasties” of validated blocks. Once logged off, you have to wait the span of those four months, discussed above, in order to reclaim your staked Ether. That way, your Ether remains unsettled until it’s determined whether you’ll have any deducted as a result of being slashed in concert with other parties. After four months, you get your Ether back in your hot little (virtual) hands.
Buterin signed off his talk by wishing the audience a “happy, joyful, validating experience.”
Lucinda Michele Knapp is a journalist with over fifteen years of experience covering tech, art, and culture in Los Angeles. Her articles have appeared in the Los Angeles Times, Variety, and Out Magazine among others. She spins fire, dispenses grammar advice, and knows kung fu.
ETHNews is committed to its Editorial Policy
Like what you read? Follow us on Twitter @ETHNews_ to receive the latest Vitalik, Vitalik Buterin or other Ethereum technology news.
Source: ETHNews