Mining Hardware: what kind of special hardware do I need?

Mining Hardware

I’m not 100% why this lecture was not touched upon earlier. Since I thought I had this great understanding of SHA-256 back in lecture 1 and now I’m like, I was a fool.

Questions answered in this Post:

  • What else should I know about SHA256?
  • What is this mysterious function miners have to compute?
  • Where can I find a Bitcoin ATM?
  • What simple ways did they classify owners of bitcoin?
  • Using the fiat mediated transaction model, what happens when supply is too low?

SHA256: more words about it

As mentioned earlier, it is a general purpose hash function. General purpose meaning that there is a list of other SHA-2 functions. SHA-2 stands for Secure Hash Algorithm 2 and was designed by the NSA. Yes, there is a SHA-1 if you’re curious and people are working on SHA-3. SHA-2 consists of SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, SHA-512/256. They are considered unbroken cryptographically even if there are known weaknesses. SHA-256 is computed with 32-bit words and SHA-512 is computed with 64-bit words. One takeaway is that SHA-256 has been optimized for 32-bit systems.

He showed a picture which reminded me of a crazy logic puzzle. OK, not really that but here’s a representative picture below. This is not the exact picture but a very similar one taken from Wikipedia.

Yet even in this lecture, he says we don’t really need to know SHA-256. He did give an overview which was more than we got previously. In the pictures you see the letters “A-H”, which are actually 8 32-bit words. As a sanity check, 8 * 32 = 256 so we’re still working with 256 bits. There are four computation rounds that take place. In each computation round, different bits are tweaked and then their bits are added and then everything is mod 32. A complete computation does 80 different iterations.

Honestly whenever I’ve used SHA-256 I just use a library to do it without thinking about the mechanics. However, after learning more about the importance with mining , this reflects what kind of work miners have to do. A basic code as presented from the lectures is listed below and you can observe that they are also calling SHA256 not once but twice.

while (1) {

HDR[kNonePos]++;

if (SHA256(SHA256(HDR)) < (65535 << 208) / DIFFICULTY)

return;

}

A normal machine can compute this calculation 2^24 hashes per second (10 -20 MHz). When bitcoin first started that would have been sufficient. Back in 2013 when this lecture was released, he mentions it would take ~140,000 years.

The next level was to use GPU mining which allows for high-performance graphics allowing high parallelism and high throughput. It was implemented in OpenCL which had people hacking the individual implementation for specific cards used. There were advantage back then. It was easily available and to set up. You get parallel ALUs (arithmetic-logic units), bit-speciic instructions, overclocking, and rig multiple ones from 1 CPU. If people tell you they have their own mining rigs, I picture some crazy space cowboy rig from like Cowboy Bebop. Now even GPUs are not good enough.

People introduced FPGAs which allow for higher performance for GPU and have better cooling implementations. However as of when the lecture was released, it would take 25 years to find a bitcoin block. So yes you get superior performance than before but you’re really not good enough.

Nowadays people use ASICs is they mine. ASICs (Application Specific integrated circuits), are hardware machines that are specialized to mine bitcoin. They have been designed specifically for mining and have adjusted for any changes in the environment but they do require major expertise and long lead-times. Usually you have to pre-order the ASIC miner and the important question to ask is when the hardware will be shipped. It was interesting that the TerraMiner IV ($6000)  would take around 14 months to mine a block. Also, most boards are considered obsolete within 3-6 months and most profits are made in the first 6 weeks. That means time is of the essence to get this machine.

Basically miners have only really made money because the price if bitcoin has exploded. There are now professional mining centers. He mentions one from the Republic of Georgia. To create one, you need cheap power, good network, and cooler climate.

 

Takeaway from this lecture, you’re never going to be good enough to mine bitcoin unless you have special skills, money, and live in an appropriate environment…

Remaining questions:

  1. Can small miners stay in the game?
  2. Do ASICs violate the original Bitcoin vision by going against every individual being part of the netowrk and working together?
  3.  Would we be better off without ASICs?
    Which statement about Bitcoin miners is NOT true?
    Bitcoin miners can recoup a reasonable fraction of their initial expenses by selling their ASICs once they are done with them to other users for less computationall intense purposes.
PHP Code Snippets Powered By : XYZScripts.com