Ethereum Casper Consensus Protocol
On May 8, 2018, the first version of PoS Casper was released on GitHub, marking the beginning of the so-called move from Proof of Work to Proof of Stake Casper consensus mechanism. It is, however, a hybrid consensus, according to Vitalik Buterin and Virgil Griffith in the Casper FFB (the Friendly Finality Gadget) white paper. PoW isn't going away; instead, it'll be layered with a combination of PoS and Benzitile fault-tolerant philosophy to improve security. So, what exactly is Casper PoS and what value does it add to the Ethereum network? Let's see what we can find out together.
What's the deal with Casper?
The Ethereum team is working to eliminate the roadblocks in its path to becoming a widely adopted decentralised platform for DApp development:
By its very nature, the blockchain is a distributed ledger, which means that each participant has a copy of all blocks on their computers. The platform's work is slowed as the number of blocks continues to increase. Miners get paid, but not immediately, developers must wait for smart contracts to be deployed, and ordinary users are not receiving ETHs as quickly as they should be.
Proof of Stake is more efficient in terms of transaction processing time: on the EOS blockchain, for example, 100,000 transactions are processed per second.
Vlad Zamfir suggested employing sharding to speed up the platform. The sharding principle permits transactions to be processed concurrently after they have been shared among the shard chains. Sharding can only be accomplished using the Proof-of-Stake protocol, according to Vlad.
Plasma, Plasma Cash, and the Raiden Network are three solutions that have been developed to address this issue. What will the implementation of these three technologies look like in terms of scalability? You can learn more by visiting the Cryptoauxiliary blog.
Bitcoin is well known for not being as decentralised as it appears. Three pools are used to distribute the hashrate. Ethereum had the same problem:
hashrate distribution of mining poolsIn PoW, pools with greater hashrates benefit from a cost reduction in mining. Casper's implementation on Ethereum will solve this problem.
This has certain ramifications for blockchain users' peace of mind, as the consolidated mining pool can fend off a coordinated attack (51 percent attack). The pool has a very slim chance of succeeding because the final choice is always made by each individual miner; yet, the prospect that someone may have to coordinate miners makes some users uncomfortable with its continuous use in more valuable areas.
The fact that electrical expenses will no longer exist is what motivates individuals to switch to PoS consensus. Depending on your stake percentage, a minimum stake of 32 ETH will now enrol you in a validator queueing pool and allow you to validate blocks.
Another issue that Ethereum-based governance programmes face is security. This is why Vitalik Buterin devised the Casper protocol, which enlists the aid of each node to safeguard Ethereum's security.
The slashing tool, which prevents double-spending, ensures that the system is safe from malicious users. Validators care about the network's survival since empty stakes and double-spending will cause them to lose their stakes permanently.
Casper's full implementation of Proof of Stake with empty-stake and double-spending avoidance, high-level responsibility of validators, and quick transaction processing are the ultimate reasons for choosing it. Because of all of these variables, Ethereum will become a supercomputer for developing DApps and implementing large-scale initiatives in the future.
PoW vs. PoS is a debate that has been going on for a long time.
Like the Bitcoin network, the Ethereum blockchain is powered by its users: miners. Both networks employ PoW as a consensus method, therefore let's go through what PoW is, why Ethereum is switching to PoS, and what the differences are.
Miners solve mathematical challenges in order to validate transactions and bundle them into a block that will be added to the ledger. They can only accomplish this with GPU and ASIC processors, though.
As network complexity and the quantity of transactions increase, so does the demand for electricity, which is highly expensive. Ethereum miners, for example, used the same amount of electricity as Cyprus and Cambodge in 2017.
Thousands of miners validate a packed block after it enters the network. Later, as part of the blockchain, it is added to the distributed ledger.
The obvious disadvantage of PoW is that it consumes a lot of electricity. According to Digiconomist's research, miners using PoW-based platforms will consume as much electricity as the entire world consumes currently by 2020.
The need for increased computational power is causing the blockchain, which is already decentralised, to become more centralised. A 51 assault can be launched by a group of miners who together hold more than 50% of the processing power on the blockchain. As of 2018, three pools were responsible for 50 percent of the hash rate. They could launch a 51 percent attack and destabilise the network if they want to collude.
Users deposit their stake instead than employing computer resources to mine the block (lock their coins). The higher the stake, the more likely it is that the following block will be mined. In essence, this is the same expensive technique as PoW (the rich become richer), except that customers do not expend electricity.
Your vote carries more weight if you have a larger stake in the outcome.
If the block is verified by other users, miners are rewarded.
The network is safe from a 51 percent attack because the nodes that collaborated will be hit harder than the rest of the network.
One of the biggest drawbacks of PoS is the "nothing at stake" situation, which means that a node without coins can find an empty block in a sidechain without using any computational effort and still get paid. It's possible that this will result in double-spending.
Casper vs. PoS
There are two projects that work together to make the transition from PoW to PoS consensus as painless as possible:
Vitalik's Casper, also known as FFG (a finality-friendly device). This is a hybrid consensus that includes both PoW and PoS components. The network will continue to function through mining, but every fiftyth block will be a checkpoint with PoS implementation – a completed block that cannot be changed or rewritten.
CBC (correct by construction), also known as Vlad's Casper. This version allows you to use PoS without the need for miners. Validators determine the security level in CBC on their own; for example, validator A might set four votes to validate the block, node B might choose six, and so on. Unlike FFG, where the blockchain is finalised at a certain block, CBC allows for incremental finalisation of the blockchain.
Casper differs structurally and economically from a typical PoS consensus. Casper, unlike PoS, protects against the “nothing at stake” dilemma by requiring validators to deposit (block) their stake. If a validator is found to have confirmed an empty fork chain, he or she forfeits the deposit as well as an equal amount for allowing double-spending on the network.
The validator must actively participate in Casper. When a validator goes offline, he or she loses a percentage of their ETH.
In FFG, there is a concept known as "supermajority," which states that a block is valid only if two-thirds of the whole network has validated it. If a branched chain happens, one-third of the validators will be fired, but the validator who discovered it will receive a bonus of 4% of the total.
Casper PoS as a Hybrid Protocol
In an interview with the Center for Intellectual Governance Innovation, Vitalik Buterin stated that 70% of mining is done in China, and 70% of mining is done with gear manufactured by a single manufacturer — which is, in essence, governed by a group of people who eventually own a majority stake. Vitalik claims that PoS is more efficient for network security for this and a variety of other reasons.
One more thing: when the network follows PoW, cooperating on an attack is impossible. As a result, discovering rogue nodes becomes extremely difficult. In a PoS network, the system will trace and blame the nodes that validate suspicious transactions for tampering with the protocol. Those nodes will lose their stakes if this happens.
Let's take a closer look at what Casper is and what it can do for you.
Casper Protocol on Ethereum
The version 2.0 of Casper is made up of three chains:
Ethereum Chains with the Casper Protocol Currently, Ethereum users mine blocks by using their processing capacity to solve an NP-class puzzle.
Anyone in the network can deposit 32 ETH to become a validator in a new Beacon (PoS) chain and begin contributing to the network's security.
In the upgraded Ethereum network, the Beacon chain will serve two purposes: it will serve as the main chain for Ethereum, following PoS consensus, and it will connect all shard networks. On the Beacon chain, a decision will be made about which blocks should be added to the main chain.
Shard chains will be used to store and share transactions, as well as play a role in Ethereum's scaling solution.
Chains of Shards
Theoretically, implementing sharding speeds up transaction processing. However, due to a variety of difficulties, this technology is exceedingly difficult to use in practise:
There is no way to know which node handles a particular transaction.
There hasn't been built a node-to-node trust mechanism, which goes against the blockchain's rules: nodes must reach a specific level of consensus in order to trust each other.
Only PoS-based blockchains are capable of implementing sharding.
When the sharding mechanism was suggested as one of the ways to solve the scalability problem, it sparked a lot of interest. Despite how tough it has become, the Ethereum blockchain is the only one that is ready to implement this technology.
The exact method through which sharding will be integrated into the Ethereum platform has yet to be announced. However, this article about the Raiden Network has more specific information about how it works.
Validators: Their Roles and Responsibilities
A smart contract that implements and monitors a Proof of Stake consensus process is an Ethereum future consensus protocol.
What is the role of validators, what is their commitment, and how does mining with Casper work? Let's take each piece of information one at a time.
Users who have placed a 32-ETH deposit and become validators have two voting options: propose and attest. The amount of stake owned by the validator will determine the weight of each vote. The greater the stakes, the higher the priority of voting.
Validator for Proposers
Proposer validators are important in Casper 2.0 since their job is to pack and suggest a block that has cross-links to shard chains. After two rounds of voting by attester validators, this block will be added to the Beacon chain.
Finally, the proposer validator connects to a Beacon chain node and calls an RPC function to propose a block.
The Validator of the Attester
Users who have the power to sign off on proposed blocks, or vote for them, are known as attesters. After the attester signs off on a block, he or she must validate it in order for it to be included in the ledger and to serve as the chain's head (becomes a valid block on the public blockchain).
A verified block indicates that the attester has completed all transactions or events and has requested a fork-choice rule.
Casper will be in charge of implementing two rounds of voting and punishing maleficent validators.
On the Ethereum blockchain, these two rounds of voting will build consensus. Let's look at how this validation works in detail:
A Perfect Validation
A proposer validator selects a block for verification or selects an attester validator to select the block for verification. Once the chosen block has received two-thirds of the votes, it becomes a ready block that will be voted on again in a commitment round (second round of voting). The prepared block is finalised to the blockchain after passing the second round of voting. On the Ethereum blockchain, this validation procedure will continue on any appended block.
Validators pay their two-thirds stake to submit their vote, but the money is refunded if the vote is verified. Validators are rewarded for selecting the blocks that are most likely to be put to the blockchain.
Furthermore, when validators vote, they refer to their most recent prepared commitment block - these are the blockchain's linkages.
Casper's implementation on Ethereum was originally mentioned in 2017, followed by a testing period in 2018. The most often asked question concerns how the Casper team plans to move the entire network to a new consensus.
The implementation process, according to Vitalik Buterin, is made possible by decreased mining payouts. This will result in a mining halt, forcing users to focus on staking more Ethereum work.
Risks to Consider
When Casper is fully implemented, it will put an end to Ethereum's mining era, as well as the market for ASIC-processor users, and radically alter the platform's economy.
Despite slashing, which will safeguard the network from tampering with the system, the risk of Ethereum being centralised still exists. Only 200-300 nodes will enforce the network after Casper is implemented, allowing them to become a "supermajority" and start forcing their own rules to the network.
In terms of resource utilisation, POS is more efficient than PoW, and it is more resistant to a 51 percent attack; but, it does not guarantee complete decentralisation.
On Bitcoin, the largest pools control the music; if Casper is implemented, the power will be in the hands of people with the largest stake on Ethereum. The required stake, however, drops to 32 ETH, increasing the number of validators and preventing centralization.
When the CryptoKitties game grew popularity and the network had to execute a large number of transactions quickly, Ethereum users experienced major scalability challenges. This led Ethereum's developers to the conclusion that the network needed to tackle the problem, which led to the proposal of switching from the present PoW consensus system to PoS. Vitalik Buterin and Vlad Zanfir began working on their own version of PoS in order to integrate it on Ethereum, the most popular platform for DApp development.
Casper, as previously stated, is an Ethereum smart contract that monitors Proof of Stake consensus.
Each fifty-first block will be a checkpoint with PoS implementation in order to move the entire network from PoW to PoS. Furthermore, because the payout for mining would be lower, members of the network will focus on staking rather than mining.
All of the modifications brought about by Casper's implementation will be in line with Ethereum's ideology. Ethereum isn't simply a project for mining cryptocurrency (Ether), as Vitalik Buterin points out; it's also a platform for developing decentralised apps.
Despite the fact that the testing period has ended, little information on Casper has been revealed. Nonetheless, the Cryptoauxiliary consulting staff is always available to answer any queries you may have about Casper and its benefits and drawbacks.