Traditional Crypto Mining: Proof-of-Work

        When Satoshi Nakamoto released the original Bitcoin whitepaper he was lauded for his ingenuity and creativity. One of his finer achievements was harnessing the concept of proof-of-work, a process which uses computer processing power to simulate the effort of real-life mining, simultaneously creating an artificial scarcity which gave his “fake” money real value. This system works very well – for now, that is. In this article I will touch on what mining really is, and how it actually works in respect to the blockchain. While I will focus on Bitcoin, this process is applicable to the vast majority of other cryptocurrencies that use proof-of-work.

        People who have some idea of what mining is will typically explain it as a process where “computers solve complicated math problems to create blocks of transactions on the Bitcoin network”. This is not wrong by any means, but there’s a little more to it than that. Transactional data is hashed by computers performing proof-of-work into “blocks”. Functionally, there are five main parts to a “block” (this does not include the block number itself):

  1. The nonce. This number is arbitrary and meaningless. It is the variable of the block that is manipulated to change the hash – more on this later.
  2. The coinbase transaction. This is the first transaction in each new block. Since each new block generates (mines) new Bitcoins, this transaction dictates where these new Bitcoins go.
  3. The general transaction ledger. This portion includes data from all other transactions verified in that block.
  4. A reference. This portion of the block simply contains the hash of the previous block. By including the previous block’s hash, it creates a chain – the blockchain.
  5. The hash. This is the output of all the rest of the block’s data, combined and “hashed” into one value, which is random and has a fixed length.
Image result for bitcoin block
Image courtesy: https://thenextweb.com

        Now, take all of that information about what each portion of the block actually is and stow it away for the time being; I want you to think of these pieces simply as data, numbers in an equation. Bitcoin uses a SHA-256 hash algorithm to generate it’s hashes, meaning it takes all 5 of the variables above and puts them into an equation that generates the hash itself – a random string of numbers and letters that is always the same length. Even a slight change to any part of the input data will completely change the hash value. This serves to encrypt the information and also to condense it. Simple enough?

        Now, a little elaboration on the nonce: the nonce is the part of the block that is most important to the mining process; it is the independent variable in the equation that gives us our hash. This means that unlike the other information (previous hash, transaction data, etc.) it can be manipulated without affecting the content of the block. The reason the nonce exists is so that the difficulty of solving each block can be increased. The network strives to keep on a specific time frame, and to accomplish that it is automatically adjusted “such that it targets a goal of solving an average of 6 blocks per hour. Every 2016 blocks (solved in about two weeks), all Bitcoin clients compare the actual number created with this goal and modify the target by the percentage that it varied. The network comes to a consensus and automatically increases (or decreases) the difficulty of generating blocks” (6). In simpler terms, the “target” of the hash is changed accordingly to ensure a time of around 10 minutes per block.

        The “complex mathematical problems” that people are talking about when they describe mining are simply the miner’s attempts at guessing the nonce of the next block. When miners “mine” they are using brute computer processing force to guess the fixed value of the next block’s nonce which, once hashed, will have the correct number of leading zeroes and have a lower value than the “target”, which is predetermined value based on the difficulty explained above, and will unlock that transaction block.

        All of the technical aspects behind us, it is easy to understand how the blockchain works. Since each piece of the block is a value that is input to generate the hash, any change made to any transaction would change that block’s hash, making it invalid. This would then invalidate the next block (because of the reference hash) and subsequently the entire chain after that point. Since the ledger of the blockchain is distributed between all the miners, they would quickly and easily realize any time another miner was operating on an incorrect blockchain. It’s an intricate and highly functional system that removes the factor of trust. In the beginning, the concept was pretty flawless. Unfortunately, as we progress and adopt more miners (and in turn higher hash difficulty) there are some serious issues that arise.

        To learn more about the shortcomings of proof-of-work mining, check out my follow-up article, “Why Proof-of-Work is Unsustainable”.

Sources
  1. http://nakamotoinstitute.org/mempool/the-proof-of-work-concept/
  2. https://decentralize.today/how-does-proof-of-work-um-work-f44642b24215
  3. https://spectrum.ieee.org/energy/policy/the-ridiculous-amount-of-energy-it-takes-to-run-bitcoin
  4. https://www.coindesk.com/rethinking-proof-of-work-the-quest-to-improve-bitcoin-heats-up/
  5. https://www.coindesk.com/bitcoin-law-conservation-energy/
  6. https://en.bitcoin.it/wiki/Block
  7. https://en.bitcoin.it/wiki/Nonce

Join our community on Telegram


Learn How To Build Wealth With Crypto.  Get Started Now.



Leave a comment

Cookies Policy | Privacy Policy

2018 © Jeffinko.Guru (H.K.) Limited (CR No. 2475230), 25th Floor, Workington Tower, 78 Bonham Strand, Sheung Wan, Hong Kong, Hong Kong

The above references an opinion and is for information purposes only.
It is not intended to be investment advice. Seek a duly licensed professional for investment advice.

My Newsletter

Sign Up For Updates & Newsletters

[mc4wp_form id="456"]