Mastering Ethereum
上QQ阅读APP看书,第一时间看更新

Envisioning the future

Ethereum core developers are working on the next version of Ethereum's consensus with the scheme proof-of-stake (PoS), which will be released in the hard fork named Serenity somewhere in the near future, in about one or two years. Instead of using Ethash as the algorithm for achieving and processing consensus with PoW, Ethereum will use something called Casper as the protocol for achieving consensus with a combination of PoS and PoW.

Why are they changing the protocol for generating blocks and reaching consensus? Because PoW is not sustainable resource-wise, since it forces miners to waste insupportable amounts of energy and resources. There's no real need to waste all that energy in cryptographic challenges. We can reach the same goal with simpler protocols that don't require much energy. Also, the biggest crypto-organizations are able to afford large amounts of computing power, making a few companies the owners of almost the entire mining network. This is a serious problem, since it destroys decentralization principals. If they can control the entire network, then the system can be considered centralized, so they attain a stronger position to decide how the cryptocurrency develops.

Theoretically, they can combine efforts and launch a 51% attack to manipulate transactions as they please.

Casper plans to solve those issues that the unexpected growth of PoW created by using a PoS algorithm. Miners then lock a specific amount of Ether on the network to be able to validate transactions while getting paid in transaction fees, since new block creations will stop being rewarded. Each miner bets whatever number of Ether they want on the blocks they think are valid and they get paid a portion of their bet if they are right. This makes the entire network more decentralized, because many more computers are able to participate in the consensus process for speeding up and freeing resources from the hands of a few big players.

In the following diagram, you can see a visual representation of how validations generate blocks by proposing bets on randomly generated blocks:

In Casper, there will be a special type of miner, called forgers, who will generate blocks by combining transactions and adding their public key in the process to demonstrate that they were the ones that created that block. They will also get rewarded with fees if they end up adding the right block to the blockchain. Those that bet on the right block will be known as validators. Whenever a block has enough bets in it and if it's in the right time, meaning that it was generated within the standard block time of the blockchain, the block will be added. Forgers will be randomly selected from all the validators so that a few are able to create the blocks.