Blockchain Secrets by Archi Mackfly - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.

 

Chapter 4 – Proof of Work vs. Proof of Stake

img11.jpg

A majority of the public blockchains that are currently available   are based on a proof of work system. However, in 2018, the second biggest cryptocurrency, Ethereum, began testing a new system that would change its blockchain from a proof of work to a proof of state system. Before we can get into what exactly this means, it is essential to understand what exactly is occurring   when a transaction is verified.

Proof of Work

The mining of bitcoin is accomplished by using a high-powered machine that will utilize a SHA256 double round has a verification process with the purpose of validating bitcoin transactions as they happen. This is done to provide security for the sanctity of the bitcoin blockchain. The speed that your machine can mine bitcoins is measured regarding hashes per second.

Bitcoin, in exchange for this service, compensates those that are doing the mining by offering them a fraction of a bitcoin for every validation. They do this to offset time and energy costs.

Additionally, those who initiate the transaction will typically provide some amount of a transaction fee to help offset costs as well. The higher the computer processing power of your bitcoin mining machine, the more you can make through the process.

To be accepted into the blockchain, each block must have a valid proof of work. A proof of work is a type of data that is both difficult to produce as well as time-consuming. Creating proof of work is essentially a random process with a low probability of success.

This means that a bitcoin mining machine that is trying to complete the process requires a significant degree of trial and error to be successful. Bitcoin uses what is known as the hashcash proof of work.

The hashcash proof of work is a type of cryptographic algorithm that makes use of a hash function as a core building block of the mining process. The most common hashcash function that is   used today is the haschash-Sha256. This particular proof of work function was created by Dr. Adam Back in the 1990s. It was  initially used as a way to prevent email spam abuse because successfully generating the hashcash for a single email was simple. However, creating one for a vast number of emails at the same time proved to be much more difficult.

You can tweak hashcash proofs of work for the difficulty to ensure that new blocks aren't being generated faster  than  the  network can handle. This means that a new block can't be generated more than once every ten minutes at this time. As the probability of    each successive generation is low, this makes it challenging to determine which bitcoin machine is going to generate the next block.

For a new block to be considered valid, its hash value must end    up being less than that of the current target. This means that each block will have to naturally indicate that work has been completed  to generate it. Each block also contains the hash of the preceding block, which is how the chain understands where each block falls within the overall blockchain. To change a block, the work must    be redone on all the previous blocks, and new and connected hashes must be generated for all of them. The blockchain is then essentially protected from tampering, because of the enormous computational power that is needed.

Proof of Stake

Most of the significant cryptocurrencies today work off of some variation of the proof of work model, either through the SHA256 hash or through another, similar hash. However, Ethereum, bitcoin’s largest competitor, has been working on an alternative that could significantly change the way blockchain transactions are verified.

In early 2017, Ethereum released the implementation guide for a hybrid proof of work/proof of stake system. They are rolling out this new system in phases before they make it the platform’s primary verification system. The plan currently states that the blockchain platform will alternate between the two systems. With the new system, about one out of every 100 blocks will use the new system while the rest will continue to use the old system.

There hope is that the new system will improve the rate at which they can produce new blocks. This will mark the first step in the plans for Ethereum’s evolution. This will be the first time a proof of stake system will be used to secure a blockchain, which will be a significant step forward. This new system  will serve  as the proof   of concept test for an alternative to the proof of work model that dominates the cryptocurrency today and provide proponents the ability to test their claim of its superiority. When the new proof of stake model is rolled out on a larger scale, it will significantly  reduce the amount of electricity that is required to verify a single block.

It's important to understand just how the proof of stake system differs from the proof of work model. With proof of stake  verification, rather than having the miner solve the equation to verify the block, a validator, who is confirmed reliable by the stake they have in the system, will commit to its accuracy. They know  that if they lie, they will lose their own ether as well.

During the first stage of deployment, all of the blocks that are verified through the new system will also be checked through the old system to help double verify that the blocks contain the information that they should, while also testing the accuracy of the new system. Validators will then look at the various chains that    are available and make a decision based on how much ether is currently in the chain. If they make a poor choice, they will lose  their money. This process will help form a consensus that leads to  a single more massive chain from the many smaller ones.

Benefits of the Proof of Stake Model

While the process of implementing the proof of stake model isn't smooth sailing, it doesn't mean that the proof of stake system is going to lose out. It contains many clear benefits over the more traditional process. This first clear benefit that this new model will have is that it will drop the more than one million dollars Ethereum miners spend on electricity each day to around $100,000 or just   ten percent.

In addition to making it cheaper to mine cryptocurrency, the proof of stake model will also make it more unrestricted because it   won't matter how fast the user's computer is because the calculations will be completed within the blockchain itself. As a bonus, this makes the 51 percent attack much more difficult to   pull off successfully. A 51 percent attack happens when a group   of miners comes together to control more than 51 percent of all nodes running a particular blockchain in an attempt to add completely false blocks to the system that the unaffected nodes  will then accept as accurate because a majority of the nodes are already reporting it that way.

Proof of stake will also make it possible to ensure the validators stay honest by forcing them to be vested in the transactions that they verify because they know if they don’t play fair, they will lose their own money. Finally, the proof of stake model makes it easier to produce blocks faster than ever thanks to a process called sharding, which is the process of breaking a more extensive database down into more manageable pieces. When databases  are broken down, it allows each piece to have its own set of validators who complete their own transactions within the shard.

Once this occurs, it makes scalability more modular and even faster.

Proof of Stake Challenges

The new process won't be without its own share of issues. The first issue will be that the new system isn't guaranteed to work. This is because this type of model hasn't been put into play at a large scale before. This means that there is a chance that the original blockchain could be damaged if the transactions aren't processed as planned, or if a smart contract is miswritten. To combat this scenario, the Ethereum team is working on what is called the finality property. This will ensure that the current state of the blockchain will be secure before the new one can be implemented.