Re-purposing Cryptocoin ASICs for Scientific Computing

Contents

(Research funded in part by the Iowa Space Grant Consortium. 2016-2017)

Overview of Research

This project is a continuation of the previously-mentioned research involving migrating CPU-bound Material Point Method (MPM) to OpenCL- and CUDA-based GPU calculations. Migration from the CPU architecture to GPU-based architectures gave an order in magnitude increase in our ability to scale up simulations and provided simulation times at a fraction of the original algorithm.

The goal for this project is to examine specially-manufactured ASIC (Application-specific integrated circuit) boards traditionally used for Cryptocoin mining (such as Bitcoin) which are no longer viable for their original task, and re-purpose them for specialized computational science modeling. The specific algorithm used for proof-of-concept here is the Material Point Method. The specific ASIC boards being explored are primarily SHA256-based units traditionally used for Bitcoin mining.

Background

The current state of crypto-currency mining, specifically as it pertains to Bitcoin mining, is the reality that mining rates in the realm of Petahashes per second PHs is required in order to reasonably be competitive for acquiring a block. Mining pools are showing Exebyte-level hashing (EHs) in the aggregate. Competitive mining as network difficulties continue to rise, and mining farms continue to expand, relegate the casual miner completely ineffective.

About every two weeks the computational difficulty increases so as to keep new block discovery at a fixed rate. With specialized mining hardware, mining pools, and increasing block difficulty thresholds, legacy hardware once used for mining becomes cost ineffective and abandoned.

Legacy mining hardware, such as the early Bitmain "S" units, once leading mining efforts with hashrates on the order of Terahashes per second (THs) are no longer viable (meaning "profitable") for their original purpose.

The Opportunity

The opportunity brought about by this growth in the specialized hardware market at the high end of ASIC-based mining comes in the flood of these "degenerate" THs units on the secondary market - producing exceptional ASIC hardware at a cost of pennies on the dollar.

Just as GPU-based architectures have been shown to be extremely well-suited for computational science explorations, ASIC-based hardware offers a similar potential for next-order computational simulations.

The goal of this project is to reprovision ASIC-based miners for scientific computation.

The Framework

The architectures used for the latest ASIC miners takes on many forms. These self-contained units range from Open Source operating systems with publicly-accessible github mining repositories to closed-source operating systems with closed-source mining software. As such, some of these are more amenable to reprovisioning than others.

The Architecture

This section describes the current work-in-progress. At the time of this writing, the architectures being focused on include the Bitmain S2 unit and the Bitmain S4 unit.

These units have been chosen because of their ability to be "reflashed" with alternate operating systems, and their equally-important ability to be factory reset when possibly bricked from a bad flash attempt.

Note that units with "bad" ASICs are acceptable for our proof of concept as "partially-working" ASIC units provide ample opportunity for exploration. These ASIC units typically possess multiple ASIC boards. Thus "broken" miners with only partially-working ASIC boards can often be acquired for marginally more than the cost of shipping.

The architecture used by these units includes a reprogrammable "BeagleBoard" linux-on-chip device which is amenable to software re-engineering for the computational task of this project.

Software Framework

In addition to the fundamental BeagleBoard Linux infrastructure, these legacy ASICs leverage open source repositories for the maintenance and distribution of the specialized software that marshals data to and from the ASICs. For the Bitmain S4 unit framework, the official codebase of the ASIC software is found at Bitmaintech's Github repository.