Skip to content
FPGA miner for OdoCrypt, can be tested at https://odo.dgb256.online/ or https://dgb.solomining.io/odo or any other pool which has implemented a correct stratum. DOCKER version is available under the 'docker' branch.
Branch: master
Clone or download
Pull request Compare This branch is 14 commits ahead of MentalCollatz:master.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Better reconnect handling Jul 11, 2019
.gitignore Add solo pool Apr 3, 2019
99-altera.rules Basic compilation for cyclone kit. Mar 1, 2019
LICENSE Switch to GPLv3 for a majority of code Mar 4, 2019
README.md Fallback odokey calc for non-supported stratums, testnet mode added Jun 6, 2019

README.md

OdoCrypt FPGA Miner

Requirements

Currently only supports Intel (Altera) FPGAs on Linux hosts.

Installing Quartus Prime

Quartus Prime is required to both compile and run this miner. It is currently available at https://fpgasoftware.intel.com/ . To figure out what edition you need, check the device support list. To minimize your download, choose the Individual Files tab, then download only Quartus Prime, and the device support files for the devices you're using. Install according to the instructions on their website.

After installing, set the variable QUARTUSPATH to point to the quartus/bin directory of your installation. For example export QUARTUSPATH="/home/miner/altera/18.1/quartus/bin" . This line should be added to your ~/.profile file or another file that is sourced whenever a shell is launched. Don't forget to source the file after editing it.

Local Solo Mining

Local Digibyte node is required.

Install and start a full node via https://github.com/digibyte/digibyte.

  • A python interpreter is required and pip is recommended - apt install python python-pip (Python 3 should also work, but most testing has been done in Python 2).
  • Python modules base58 and requests - pip install base58 requests

Stratum Pool Mining

Local Digibyte node is not required.

Twisted python module is required, to install use apt-get install python-twisted or pip install twisted in case of pip already installed

Additional Files

You need to install a custom udev rule in order to allow a non-root user access to FPGA hardware.

  • Open 99-altera.rules, and change the 1000 on the last line to your user id. Alternatively, run sed -i s/1000/$(whoami)/ 99-altera.rules (don't run this command as root).
  • Run sudo cp 99-altera.rules /etc/udev/rules.d/
  • Run sudo udevadm control --reload

Connecting Your Hardware

Notice: It is highly recommended that you remove the acrylic cover on your development kit (if it comes with one) to prevent it from overheating.

  • Connect one end of your development kit's USB cable to your computer, and the other end to the development kit. If your development kit has multiple USB ports, be sure to connect to the one labelled "USB Blaster".
  • Connect your development kit's power cable, and turn on the device.
  • Verify the presence of your device by running lsusb | grep Altera (this should output one line per development kit).
  • Further verify your setup by running $QUARTUSPATH/jtagconfig (this will list all of your recognised development kits).

Starting to Mine

This will require multiple terminal windows. A screen multiplexer such as tmux or screen may make things easier for you.

  • Set mining mode solo or stratum in config_mode variable at src/miner/config.tcl
  • Command line argument --testnet should be used until block 9,100,000 for testnet4 mining
  • If solo mining with local node - ensure your DigiByte node is running. It is recommended that you do not specify an rpcpassword in digibyte.conf. The rpcuser and rpcpassword options will soon be deprecated.
  • In one terminal, go to the src directory and run ./autocompile.sh --testnet cyclone_v_gx_starter_kit de10_nano
  • For Solo mining: in another terminal, go to the src/pool/solo directory and run python pool.py --testnet <dgb_address>
  • For Pool mining: in another terminal, go to the src/pool/stratum directory and run python stratum.py --testnet stratum_host stratum_port username password. Additional argument --workers can be used to set worker with _ delimiter. Worker name will be automatically taken from a miner hardware device id.
  • Finally, for each mining fpga open a terminal in the src/miner directory and run $QUARTUSPATH/quartus_stp -t mine.tcl [hardware_name]. The hardware_name argument is optional, and if not specified the script will prompt you to select one of the detected mining devices. If you're comfortable using screen, you can run src/miner/mine_in_screen.sh instead to start a screen session with one window per mining device.
You can’t perform that action at this time.