LOGI - Bitcoin Mining Algorithm - Project
Bitcoin Mining Project Overview
This project allows users to easily experiment with and discover the inner workings of mining on a low cost multi-purpose platform. Note that there are currently much faster and more powerful options available for bitcoin mining including FPGA arrays and ASICS. The purpose of the article and project is simply to introduce to the processes and algorithms used for bitcoin mining, not to make money. The knowlege, algorithms and processes can be taken to larger scale platforms if the user wishes to seriously pursue bitcoin mining
Bitcoin mining is part of the process in a bitcoin transaction. The transaction consists of some very hard number crunching. Bitcoin and Bitcoin mining topics go well beyond the scope of this article. Please have a look at the reference links available in the footer for more information regarding these complex topics. I will briefly explain in a very high level manner the process of bitcoin mining and show how and why it directly applies to FPGA’s, particularly the in conjunction with an embedded platform with web access such as the beaglebone or Raspberry Pi.
See our Blog article for more details about bit coin mining and how it relates to the LOGI Boards.
Update: We have discontinued support for interfacing the mining application with the external mining pools. The mining pools continue to change their API interface, which makes it difficult to maintain with the LOGI Boards. You can still run the bitcoin mining algorithm and watch it solve mining solution using the LOGI-Apps. Note that ASICs have dominated the realm of bitcoin mining and this demo is for educational purposes only.
Figure: Topology of the bitcoin miner for the LOGI-Boards
Functional Overview Bitcoin Mining Algorithm Demo - LOGI App
This is a demo of the FPGA running the bitcoin mining Algorithm. The FPGA iteratively cycles through the algorithm looking for the solution (nonce). Once the solution is found the FPGA will report the solution back to the Pi/Bone and will be displayed on the terminal screen.
Running the Bitcoin Mining Algorithm Demo - Step by Step Guide
getting the logi-apps
The demo resides within the logi-apps. So the easiest way to run the demo is the download and run the demo using the instructions found on the logi-apps wiki page. In short you can download all of the logi-apps by running "git clone -b logipi https://github.com/fpga-logi/logi-apps.git " . You can then navigate to the virtual component demo directory and run "sudo ./make_demo" to load the bit file and display basic instructions for the edu demo.
Step by Step
1) Navigate to the installed logi-apps/bitcoin_app directory and run "sudo ./make_demo.sh". Note the the make_demo script calls the logi_loader which loads the bistream into the FPGA. This initiate a mining sequence of solving a bitcoin solution. The iterative process can be seen as the FPGA feeds data back to the host terminal window. The FPGA will continue to cycle through the algorithm until it finds the correct solution, nonce, which will be output to the terminal window. The FPGA is currently clock to 1.8 Mhash/S. These are the number of hashes the FPGA can process in its search for the solution. It can be clocked faster, but we wanted to keep the FPGA nd power supplies cool. But, if the user wants to crank up the juice they can increase the clock rate to get solve more hashes/s. It is an "Arms" race in bitcoin mining and the newer ASICs on the market have got the corner on the market. But, FPGAs did have their day not too long ago. Cheers to the performance and flexibility of FPGA echnology.
Where to Go From Here
You read a bit more about the bitcoin algorithm mining in general in our blog article.
Have a look under the hood in the mining source code in our repository.
Here's a hackaday writeup of the project. It's always nice be recognized. Great Work LOGi Team!