Ether Mining

        Amit Kumar Jaiswal                        Vipin Rathi              

Google Summer of Code Intern@CNCF        Google Summer of Code Intern@CERN

                  Twitter : @AMIT_GKP                                               Twitter : @vipin_scs

 

 

What

  • Ether is the fuel of the Ethereum Blockchain
  • Pays for smart contract execution in the Ethereum Virtual Machine (EVM)
  • Also a standalone cryptocurrency (Gemini recently licensed for trading it by NY regulators)

 

 

Why?

  • Speculation
    • Where will Ether be in a year?
  • Fun
    • Combines DIY, computer hardware assembly, operating system installation/management, scripting + Ethereum

 

 

Price Performance

  • High Volatile (68-95-99.7 rule)
  • Annualised standard deviation (volatility) 119.63%
  • ASX volatility during this period 21.95%

 

 

USD/ETH Price History

How does it work?

  • Miners continually trying to verify blocks for the blockchain
    • 5 ether reward for each solution
  • Based on Cryptographic hash function
    hash(<block>) => a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82 d80a4b80f8434a
  • Miners applying hash function millions (mega) of times/sec = MH/s
  • Single GPU generates 5-30 MH/s
  • CPU ~ 0.25 MH/s

Ethash Algorithm

  • Ethash Proof of Work algorithm (formerly Dagger Hashimoto)
    • SHA3-256 variant hashing function
    • Memory-hard computation
    • Memory-easy validation
    • Can't use ASIC (Application Specific Integrated Circuits)
    • Uses 4GB directed acyclic graph file (DAG) regenerated every 30000 blocks by miner

Proof of Work Difficulty

  • Hashing Blocks
    • Difficulty - dynamically adjusts parameter defined originally in genesis block (one block produced every 12s)
      • Started at 0x400000000 (0.017 TH) 
      • Now at 0x3205AF767000 (55 TH)
  • Simplifies example:
    nonce = random int
    while hashimoto(block, nonce) * difficulty > threshold
         increment nonce
    return nonce

     

Genesis Block

{

      "nonce": "0x0000000000000042",
      "timestamp": "0x0",
      "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "extraData": "0x0",
      "gasLimit": "0x8000000",
      "difficulty": "0x400000000",
      "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x3333333333333333333333333333333333333333", "alloc": { } }

 

Ohh...It's too much Technical

Let's take me to Mining!!!!!!!

Subtitle

Profitability

 

Ether mined * ETH Price

-

(Hardware + Software + Power + hosting + your time)

= Profit

Hardware

Parts:

  • 4-6 x GPUs - NVIDIA Zotac GTX 1060 6GB
  • Motherboard - lots of PCIe slots
  • PCI Risers (try fitting > 2GPUs on a single board)
  • Decent power supply ~ 1000W for 3 GPUs
  • Cheap CPU
  • 4-8 GB RAM
  • Power switch

Motherboard

ASRock H81 Pro

Motherboard quirks

Some boards require jumper cables in their PCIe slots

Risers

Motherboard can only hold 1-2 GPU cards

Case

  • Build or buy?
  • Considerations
    • Budget
    • How comfortable are you with DIY?

Case - Wood*

Cost ~ $25 AUD

* Combusts at ~300 degree celsius

Mining Rig

Case - Wood & Metal

Cost ~ $50 AUD

Or even milk crates...

Case - Buy

$200 USD from GPU Shack

Software Installation

OS

  • Linux
    • Ubuntu 14.0x/15.0x with AMD/NVIDIA GPU driver
  • Windows 8/8.1/10
  • EthOS (Paid ~ $40 USD)
    • Ether mining Linux OS from GPU Shack

 

Software - Ethereum

  • Geth/Eth
    • Run full ethereum node
  • Or
    • Connect to a mining pool (see next slide)
  • ethminer
    • C++ mining client
    • Connects to Geth/eth

Mining Pools

  • Block reward is 5 ether
    • For small rigs => long wait (weeks)
    • Steady stream of income (pool splits block reward between contributing members)
  • ~ 1% fee of all ether mined
  • Minimum payout ~ 1.01 Eth
  • Provide UI for monitoring workers
  • Usually go via a proxy (eth-proxy/qtMIner)
    • Provides automatic failover in event of pool failure

Begin Mining w/Pools

  • Claymore mining through Dwarfpool

    • For Windows : https://drive.google.com/open?id=0B2Q0hpvh6Wm4ZzlnbmUyWVFNYVk

    • For Linux : https://drive.google.com/open?id=0B2Q0hpvh6Wm4amM0c2psOTV4b1 

    • Edit "start.bat" file and replace it with "ethminer -G -F http://eth-eu.dwarfpool.com:80/{YOUR_WALLET_ADDRESS}/MINER_NAME

Begin Mining w/Pools

  • Start proxy:

    • $ python eth-proxy.py

    • Start the miner

      • ethminer --farm-recheck 200 -G -F http:// 127.0.0.1:8080/<node-name> 

Mining

Other considerations

Title Text

Power

How much are you paying per kWh?

  • Indian plans often have an advertised rate cap - e.g., quaterly cap of 4000 kWh
  • 1 x 1000 PSU (3-4 GPU rig) running24/7:
    • 1 * 24 * 30 = 720 kWh/month

Power Meters

Measures:

  • Current Consumption (W)
  • Consumption used (kWh)

 

Cost ~ 1800 INR

Managing Failure

Multiple points of rig failure

  • Hardware - GPU X 4-6, risers x 2-5, motherboard PCIe slots => lots of variables
  • Software - problematic device drivers
  • Time consuming trial and error to isolate issues - e.g. jumper cables required on some model PCIe slots

Monitoring

Various components:

  • Node or pool connectivity
  • ethminer
    • it occasionally falls over
  • GPU temperature
    • On linux requires X server to be running
  • CPU temperature
  • OS Crash

Monitoring

  • You will need to write various scripts (or use EthOS)
  • Take action
    • Send alearts - SMS/Email
    • Restart component
    • Power off rig

What about the Cloud Mining?

You'll need lots of AWS Credit....

AWS Spot instances

  • g2.8xlarge instance contains 4 x NVIDIA GPUs
  • Hashrate of 24 MH/s
  • 0.0077 Eth/hr ~ $0.10 USD/hr
  • Low spot instance price $2.66 USD/hr

Proof of Stake

  • Nodes with greater stake (e.g. total # of ether, duration of holdings) more likely to generate valid block
  • No longer possible to profitably mine ether (if it ever was…)
  • Expected in 2017

Thanks

Resources

  • Mining algorithm • https://github.com/ethereum/wiki/blob/master/Dagger-Hashimoto.md
  • https://github.com/ethereum/wiki/wiki/Ethash
  • Costs - http://etherchain.org/api/statistics/price - Ether price history
  • Mining calculator-  https://etherscan.io/ether-mining-calculator
  • http://gpushack.com/collections/gpushack - ready made rigs (US based)
  • https://github.com/Atrides/eth-proxy
  • Rig Building: https://www.youtube.com/watch?v=Jnp9Ka8WVpA

Ether Mining

By AMIT KUMAR JAISWAL

Ether Mining

  • 598
Loading comments...

More from AMIT KUMAR JAISWAL