Bitcoin Mining

Bitcoin mining is the proof-of-work loop that secures Bitcoin. Miners race to find a nonce such that SHA-256(SHA-256(block_header)) has a leading-zero prefix below a target.

Why is this interesting for ECE459?

It’s a pure brute force, the only way forward is to try nonces until one hashes low enough. A perfect embarrassingly parallel workload, and the canonical example of past the GPU: specialized silicon wins once the kernel is fixed.

Hardware evolution as network difficulty rose:

  1. CPU (2009), fine when nobody else was mining
  2. GPU (2010), ~100Ă— throughput per dollar
  3. FPGA (2011), efficiency win, short-lived
  4. ASIC (2013-), silicon that does only double-SHA-256. Modern machines (Antminer S21) do ~200 TH/s at ~17 J/TH. A consumer GPU is effectively useless, roughly 20 orders of magnitude less throughput per dollar

P4P takeaway

If your workload is a fixed, simple kernel with enormous economic payoff, the market eventually builds an ASIC for it. GPUs are the stepping stone, not the endpoint.

Other PoW coins use ASIC-resistant hashes (memory-hard like RandomX in Monero, or specialized like Ethash pre-merge) to keep hardware commoditized. Same idea as memory-hard password hashes.

From ECE459 L23 [Tay17]

When a workload is only hashing (and, xor, rotate, add-mod, or, right shift, in fixed order), a general-purpose CPU or GPU wastes silicon on functionality you don’t need. Hardware specialization wins.

Jeff’s note, paraphrased: don’t mine Bitcoin. It’s uneconomic on general hardware (ASICs dominate) and environmentally awful, Bitcoin’s energy use being comparable to Poland’s and carbon footprint to Uzbekistan’s.

Beyond the GPU is custom hardware: first FPGA miners, quickly displaced by ASICs that are orders of magnitude more efficient in both hashes/sec and J/hash. Each advance raises network difficulty, yesterday’s rigs become unprofitable, and you’re locked into an endless upgrade treadmill.