Upgrade to Pro — share decks privately, control downloads, hide ads and more …

DAY 3 - Blockchain Essentials - Consensus Algor...

DAY 3 - Blockchain Essentials - Consensus Algorithms & Mining

This is our Blockchain Essentials Course which introduces Consensus Algorithms & Mining.

Learn how to mine with The Whive Protocol on your CPU machine(laptop)!

Download 133 Pages of Notes for the Module Here: http://bit.ly/TABOEBOOK

Apply For Training & Internship Here: https://bithub.africa/academy/

Join the Discussion: https://t.me/BitHubAfrica

#MelaninAcademy

May 15, 2021
Tweet

More Decks by #MelaninAcademy

Other Decks in Technology

Transcript

  1. MINING Proof-of-work is called “mining” for a very good reason.

    Like with physical mining, there is something that miners are searching for. A typical gold mining operation processes 45 tons of dirt and rock before accumulating 1 oz of gold. This is because gold is very rare. However, once gold is found, it’s very easy to verify that the gold is real. There are chemical tests, touchstones, and many other ways to tell relatively cheaply whether the thing found is gold. Similarly, proof-of-work is a number that provides a very rare result. To find a proof-of-work, the miners on the Bitcoin network have to churn through the numerical equivalent of dirt and rock. Like with gold, verifying proof-of-work is much cheaper than actually finding it. SOURCE: Vijay Mukhi The Undocumented Internals of the Bitcoin, Ethereum and Blockchains
  2. What is Bitcoin Mining? • Primary Method of Securing the

    Bitcoin Network. • Use of specialized computers(ASICs) to solve a puzzle built into the protocol. • Miners get rewarded for each block mined. • Rewards consist of transaction fees generated within the network. • Involves costly “Work” that uses Electricity!
  3. WHERE MOST GET IT WRONG! The purpose of mining is

    not the creation of new bitcoin. That’s the incentive system! Mining is the mechanism by which bitcoin’s security is decentralized over a large network! https://www.youtube.com/watch?v=kZXXDp0_R-w Source: Mastering Bitcoin (Page 276)
  4. BITCOIN MINING ISSUANCE SCHEDULE The maximum amount of newly created

    bitcoin a miner can add to a block decreases approximately every four years (or precisely every 210,000 blocks). Based on this formula, bitcoin mining rewards decrease exponentially until approximately the year 2140, when all bitcoin (21 million) will have been issued. After 2140, no new bitcoin will be issued. Source Mastering Bitcoin (Page 277)
  5. CONSENSUS ALGORITHIMS A consensus mechanism is a fancy way of

    describing rules that everyone agrees on, in regards to who gets to update the ledger. There are many types of consensus mechanisms. For example:  Proof-of-Work(PoW) [Egalitarian]  Proof-of-Stake (POS) [Rich get Richer]  Hybrid PoW/PoS Consensus [Best of Both Worlds]  Byzantine Fault Tolerance (BFT) [Speed L1 BSC]
  6. PROOF OF STAKE (PoS) Proof of stake uses a set

    of validators to reach consensus on the main chain. These validators deposit an amount of the blockchain’s cryptocurrency and cast votes weighted by their stake. Not much electricity is consumed. Hybrid PoW/PoS Consensus The objective of hybrid Proof of Work and Proof of Stake systems is to capture the benefits of the respective approaches and use them to balance each other’s weaknesses. Decred is among the few cryptocurrencies to utilize both PoW and PoS in recognizable forms and merge them together to produce a multi-factor or hybrid consensus mechanism.
  7. Mining: CPU, GPU & ASIC  Blockchains fall into two

    categories, PoW and PoS. Bitcoin, the first ever cryptocurrency, runs on a PoW consensus mechanism.  This is a form of mathematics known as cryptography.  Cryptography uses very difficult mathematical equations that can only be solved by computers.
  8. CENTRAL PROCESSING UNIT (CPU)  It is considered the brain

    of a computer because it controls the operations of all parts. CPUs perform all types of data processing operations; without one, a computer cannot work properly.  In the early days of Bitcoin, you could mine it on your CPU. As mining became more competitive, this was no longer feasible.  However, there are still other blockchains that can be mined using a CPU today, such as the Whive protocol.
  9. GPU(GRAPHIC PROCESSING UNIT)  GPUs are more powerful than CPUs

    in executing some very specific functions. GPUs are meant to be effective at doing massive amounts of calculations. This feature makes them well suited for mining certain blockchains, such as Ethereum.  Although it’s technically possible to mine Ethereum using a CPU, it is discouraged. GPUs are far more effective for mining Ethereum and other cryptocurrencies such as Ravencoin and Beam.  There are different models of GPUs. Websites such as WhatToMine allow you to input different GPU models and estimate which will be the most profitable cryptocurrencies for you to mine.
  10. APPLICATION-SPECIFIC INTEGRATED CIRCUIT ASIC  An ASIC is a chip

    that can be used for one purpose only. It used to be possible to mine bitcoin using a CPU/GPU. But this changed as it got more competitive.  Today, Bitcoin is mined using ASIC chips. Litecoin is another popular cryptocurrency that is mined using ASIC chips.  The majority of large-scale blockchain mines are running ASIC machines. Because these machines are purpose built, they prove to be more effective and reliable at mining.
  11. POW - MINING Solo Mining: Mining directly on the network

    with your hashpower. Pool mining: Coming together with other miners to combine hashpower and increase your chances to mine block; rewards are shared.
  12. Hardware Requirements CPU Mining (Laptop, Cloud) ASIC Mining ( ASIC

    Miner, Motherboard GPU Mining: Mining Rigs ( RX 450, Motherboard, Power supply, Memory
  13. MINING POOL A mining pool is a joint group of

    cryptocurrency miners who combine their computational resources over a network to strengthen the probability of finding a block or otherwise successfully mining for cryptocurrency.
  14. HOW A MINING POOL WORKS Individually, participants in a mining

    pool contribute their processing power toward the effort of finding a block. If the pool is successful in these efforts, they receive a reward, typically in the form of the associated cryptocurrency. Rewards are usually divided between the individuals who contributed, according to the proportion of each individual's processing power or work relative to the whole group. In some cases, individual miners must show proof of work in order to receive their rewards. whivepool.cointest.com
  15. BITCOIN ENERGY CONSUMPTION Bitcoin may be a useful way to

    send and receive money, but cryptocurrency isn't created for free. The computer-based miners who create bitcoins use vast amounts of electrical power in the process. The energy-heavy process leads some experts to suggest that bitcoin harms the environment. The creation process, known as "mining" requires computers around the world to complete rapid calculations to try to solve the same mathematical puzzle. It always takes 10 minutes, and the winner is rewarded with some digital bitcoin. Then a new puzzle is generated, and the whole process repeats for another 10 minutes. According to the University of Cambridge’s bitcoin electricity consumption index, bitcoin miners are expected to consume roughly 130 Terawatt-hours of energy (TWh), which is roughly 0.6% of global electricity consumption.
  16. BITCOIN NODE Some estimate that there are over 10,000 operational

    full nodes on the Bitcoin network. These nodes then propagate the blockchain to all other nodes on the network to ensure the most trusted blockchain is maintained. The more nodes, the more decentralized the network, and the harder it is to hack.
  17. DRIVING FINANCIAL & ENERGY ACCESS! . Peer-to-peer model Bitcoin brings

    allows people who are financially excluded to enter the Global Digital Economy, Nigerians in 2020 moved $500 Million Dollars… Bitcoin as a settlement monetary network is very efficient recently $2.4 Billion Dollars was moved on the network for $26 in transaction fees. Lightning Network scales this to allow for Automated M2M transactions Bitcoin Mining is currently using 74% renewables in its energy mix. This is making redundant energy projects more viable and also innovations in computer processing.
  18. WHIVE PROTOCOL  Whive, is an open source & peer-to-peer

    blockchain protocol that is incentivizing the building of sustainable distributed solar energy solutions through Trustless Rewards.  The Whive protocol’s mining is biased towards smaller mobile computing CPU devices built on the ARM architecture to encourage fast & sustainable growth of the solar energy sector
  19. YESPOWER PoW SCHEME Yespower is a proof-of-work (PoW) focused fork

    of yescrypt, which in turn builds upon scrypt. While yescrypt is a password-based key derivation function (KDF) and password hashing scheme, and thus is meant for processing passwords, yespower is meant for processing trial inputs such as block headers (including nonces) in PoW-based blockchains. Why Yespower? Different proof-of-work schemes in existence vary in many aspects, including in friendliness to different types of hardware. There's demand for all sorts of hardware (un)friendliness in those - for different use cases and by different communities. yespower in particular is designed to be CPU-friendly and GPU- unfriendly. In other words, it's meant to be relatively efficient to compute on current CPUs and relatively inefficient on current GPUs.
  20. WHIVE PROTOCOL FEATURES Efficient ARM Focused CPU Mining The Whive

    protocol’s mining is biased towards smaller mobile computing devices built on the ARM architecture to encourage fast & sustainable growth of the solar energy sector 20 Year PoW Mining Schedule Mining of 100M Whive Rewards ends in the year 2040 ensuring maximum distribution of solar micro-grid ecosystems across the World Bitcoin Fork & Auxiliary Chain 18,500,000+ Whive Rewards can be claimed by Bitcoiners hodling 0.2 or more bitcoins starting April 2021, learn more at https://whive.io/claim
  21. WHIVE MINING SCHEDULE Figure 3: 2020-2021 Whive Development Timeline YEAR

    BLOCK REWARD TOKENS 2024 200 60,598,000 2028 100 21,024,000 2032 50 10,512,000 2036 25 5,256,000 2040 12.5 2,628,000
  22. WHIVE MINING SCHEDULE Figure 3: 2020-2021 Whive Development Timeline 0

    10,000,000 20,000,000 30,000,000 40,000,000 50,000,000 60,000,000 70,000,000 2024 2028 2032 2036 2040 WHIVE REWARDS ISSUANCE SCHEDULE
  23. WHIVE NETWORK STATS  Launched 02/02/2020 No Premine/ No ICO

     MAX Supply – 100,000,000 (5x Bitcoin)  Circulating Supply - 13,216,400 (5/15/2021)  Block Reward – 200  Mined across 15+ countries globally  Mining ends sometime in 2040  18,500,000 WHIVEs can be claimed by BTCers  Unclaimed WHIVEs will be redistributed incl contributor(in 2022) whiveexplorer.cointest.com
  24. WHIVE MILESTONES Figure 3: 2020-2021 Whive Development Timeline Apr-20 Jul-20

    Oct-20 Jan-21 May-21 Aug-21 Nov-21 Analysis Processor & Timezone Optimization v1 Developing Processor Optimization v2 Testing & Release of Processor Optimization v2 Developing Whive Oracle Location API Integrating Location & Processor Optimization v2 Testing Location Optimization Whive Protocol V3 Complete Feature Release WHIVE PROTOCOL ROADMAP Start Date Days
  25. COURSE REFERENCES  The African Blockchain Opportunity, Karanja 2017, http://TheBlockchainOpportunity.com

     The Whive Protocol Greenpaper, Shurn & Karanja 2020, https://www.scribd.com/document/483596804/The-Whive- Protocol-Greenpaper-Version-2-17  Mastering Bitcoin by Andreas M. Antonopoulos (O'Reilly)  Programming Bitcoin: Learn How to Program Bitcoin from Scratch [Song, Jimmy]  Nakamoto, Satoshi 2008, Bitcoin: A peer-to-peer electronic cash system”, Citeseer, http://bitcoin.org/bitcoin.pdf  Yespower, 2014, What is Yespower? https://cvsweb.openwall.com/cgi/cvsweb.cgi/projects/yespowe r/README?rev=1.3