Mining a block is difficult. The SHA-256 hash of the block header must be less than/equal to the target for the block to be accepted. The inherent probability of performing the tasks that yield the correct hash is very low. Research led by Dr. Rakesh Kumar at the University of Illinois at Urbana-Champaign addresses how approximate hardware might be used to reduce the difficulty and improve results of bitcoin mining. CCN spoke to Dr. Kumar to learn more about this ground-breaking research.
In mathematics and the sciences, approximation means that something is similar but not precisely equal or identical to something else. The concept of approximation is frequently used to simplify process when a fault-free model is challenging to use. Although approximate hardware design isn’t a new concept, its application to bitcoin mining could have real possibilities.
Dr. Rakesh Kumar and his students, Matthew Vilim and Henry Duwe, are presenting a peer-reviewed study, “Approximate Bitcoin Mining,” at the Design and Automation Conference (electronic design) in June 2016. According to the study’s conclusions, bitcoin miners could improve their returns by 30 percent with approximate hardware.
Exploiting the Bitcoin Mining Protocol with Approximate Hardware
Bitcoin mining hardware is used to generate proof-of-work from nonce to hash. In recent years, bitcoin miners moved from CPUs and GPUs to FPGA or ASIC mining. Bitcoin mining consumes lots of power.
Dr. Kumar told CCN, “We began with the questions, ‘Are there ways we can use a deep understanding of bitcoin mining protocol to significantly increase profits?’ and ‘How do we build mining hardware that runs fast, reduces power and increases profits? What non off-the-shelf tricks can we use?’”
We wanted to identify exploitable characteristics of bitcoin mining protocol to make more money.
Approximate Computing, Error-Tolerance and Approximate Hardware Design
Reducing the difficulty of bitcoin mining is obviously important to miners. Dr. Kumar observes, “A lot of applications in the world don’t have to run absolutely correctly on your hardware. In many predictive environments, at the end of the day you’re making a guess…What if your guess is incorrect?”
Many computer applications, such as visual computing applications, are robust to imperfections. They run on hardware with errors, it doesn’t affect user experience. The team learned that bitcoin mining is inherently error-tolerant and that the process is forgiving of errors:
What we’ve found is that a processor that needs to guarantee correct operation 100 percent of the time sometimes consumes almost two times more power than a processor you’re asking to be correct only 99 percent of the time…There is this nonlinear behavior. It’s like the last bite problem or the last mile of a marathon…
Approximate Hardware Design: Bitcoin Mining is an Embarrassingly Parallel Application
According to Dr. Kumar, bitcoin mining involves the following key steps:
- The bitcoin miner tries to generate a hash that’s less than a certain value. You start at the nonce and look for a value lower than the target. If so, it’s a success.
- If the hash is higher than the target value, you increase the hash by one and generate a new hash.
The bitcoin miner wants to generate hashes that correspond to a large number of nonces. That’s why bitcoin mining can be considered “an embarrassingly parallel application” in which you generate hashes corresponding to nonces in completely parallel fashion.
Mining hardware consists of a set of mining units. Each unit generates a hash corresponding to a nonce and the mining units process different nonces in parallel.
In bitcoin mining, if one of the mining units has an error for whatever reason, the error affects only the individual mining unit. Bitcoin’s parallelism avoids the propagation of errors. If a single mining unit has errors, it won’t affect others.
False Positives and False Negatives in Approximate Hardware
There are two primary kinds of bitcoin mining faults within a bitcoin mining unit: false positive (mining hardware says that the nonce was a valid nonce even though it was not) and false negative (hardware says the nonce is invalid even though it is valid). Dr. Kumar says:
- “The probability of any hardware generating a valid solution is really, really miniscule,” so the probability of a false positive is similarly small. Only one block is generated every 10 minutes. Since the probability is tiny, false positives in approximate hardware just don’t matter. “This will happen really, really, really infrequently.”
- If the hardware misidentifies a solution as valid, the network will quickly identify that the solution is invalid when the miner broadcasts it. “These are essentially immediately rejected.”
- In false negative cases, the nonce corresponded to a valid solution but, because of the fault in the mining hardware, it was recognized as invalid. “The goal of the hardware is to generate a valid proof of work…any reduced hash rate leads to a lower hash rate. This translates to missed opportunity.”
Approximate Hardware Insight
Creating approximate hardware for bitcoin mining isn’t about achieving a perfect mining system. If you make approximate hardware and the speed and size of the system is the same as your system today, then using approximate mining hardware will lead to reduced profits due to faults.
Dr. Kumar says that faster, smaller approximate hardware compensates for faults. “When compared to original non-approximate hardware, a smaller and faster approximate system allows the miner to pack more mining units into the same or smaller chip area. Increased speed, and more hashes per second, increases how many bitcoins can be mined per unit-time:”
- Approximate hardware accepts false positives and negatives and must be outweighed by the advantages of speed, size, and costs to operate.
- Smaller, faster approximate systems can reduce hash computation time by half. The bitcoin miner can generate twice as many hashes per second.
Functional and Operational Approximation
Dr. Kumar and his team believe that approximate hardware design will help bitcoin miners achieve better performance. “Functional approximation allows us to build bitcoin mining hardware differently so that you can do vastly more hashes per second and pack more mining units in the chip area. Operational approximation is all about reducing operating costs and energy efficiency through frequency or voltage overscaling,” he said.
Bitcoin mining is an inherently error-tolerant process because of embarrassing parallelism and transactions that are verified in the network.
“Approximate Bitcoin Mining” proposes mining hardware that’s a lot faster, smaller, cost-effective and efficient. Dr. Kumar say his team’s goal isn’t building bitcoin mining hardware. They hope forward-thinking bitcoin mining hardware companies adopt and benefit from the research.
A draft of the peer-reviewed paper can be downloaded here [PDF].
The article has been edited for clarity, corrective changes and the addition of images.
Featured image from Shutterstock. Images courtesy of Dr. Rakesh Kumar.Follow us on Telegram or subscribe to our newsletter here.
• Join CCN's crypto community for $9.99 per month, click here.
• Want exclusive analysis and crypto insights from Hacked.com? Click here.
• Open Positions at CCN: Full Time and Part Time Journalists Wanted.