BFGMiner

BFGMiner

BFGMiner is a modular cryptocurrency miner developed in the C programming language. It features dynamic clocking, monitoring, and a remote interface.

Advantages include a powerful miner with diverse capabilities, support for various platforms, including Raspberry Pi. However, it’s important to note that graphic processors are not supported, and the program is geared towards more experienced users.

Supported platforms include Windows, Mac, and Linux. In contrast to CGminer, BFGminer is specifically designed for FPGA and ASIC and is oriented towards a narrower audience. The program has dynamic synchronization, monitoring, and a remote interface.

In addition to its universal nature, BFGminer supports installation on Raspberry Pi, making it convenient to use. The program’s interface is user-friendly, allowing navigation through various options using hotkeys. Finally, BFGminer includes a watchdog thread to detect idle threads and automatically restart or stop unsuccessful reconnections, optimizing resource usage. Supported ASIC devices include Antminer U1/U2, Block Erupter USB, Red/Blue Fury, among others.

BFGMiner features:

  • A large variety of device drivers for Bitcoin (SHA256d)
  • CPU and OpenCL/GPU mining for Keccak (SHA-3)
  • Automatically can configure itself to failover to solo mining and local block submission when Bitcoin Core is running
  • Support for getblocktemplate decentralized mining protocol (no proxy needed!)
  • Built-in stratum and getwork proxy server
  • Very low overhead free C code for Linux and Windows with very low CPU usage
  • Integrated overclocking and fan control (including automatic adjustment, if configured)
  • Heavily threaded code hands out work retrieval and work submission to separate threads to not hinder devices working
  • Caching of submissions during transient network outages
  • Preemptive generation of work prior to completion of current work
  • Automatically detects failing pools and disables them
  • Multi-device support (all or discrete selection)
  • Much more.

How to set up BFGMiner

  • Download BFGMiner:
  • Install Drivers for Your Hardware: Ensure that you have up-to-date drivers installed for your graphics card or other hardware you plan to use for mining.
  • Create a Configuration File: In the BFGMiner folder, create a text file with the extension .bat or .sh. This file will contain the commands to launch the miner.
  • Define Command Line Parameters: Open the created file and add the commands to launch the miner. An example command for GPU mining looks something like this:
bfgminer.exe -o stratum+tcp://pool_address:port -u your_username -p your_password --gpu-platform 0 --gpu-threads 1 --gpu-engine 1000 --gpu-memclock 1500

Replace pool_address, port, your_username, and your_password with the corresponding details of your mining pool.

  • Run BFGMiner: Save the file and run it. This will start BFGMiner with your specified parameters.
  • Monitoring and Configuration: BFGMiner provides a web interface for monitoring mining activities. You can open it in a web browser by entering http://127.0.0.1:4028 in the address bar.
  • Configure Mining Parameters: Depending on your hardware and mining pool requirements, you may need to configure additional command line parameters.
  • Optimize Performance: Conduct testing and optimization of mining parameters (core frequency, voltage, temperature, etc.) to achieve optimal performance and efficiency.
  • Save and Monitor Results: Save your settings and monitor mining results. Check the statistics on the mining pool to ensure that your miner is correctly connected and operational.

Available cryptocurrency for mining

  • Bitcoin (BTC)
  • Litecoin (LTC)
  • Namecoin (NMC)
  • Devcoin (DVC)
  • Ixcoin (IXC)
  • Dodgecoin (DOGE)

Updates and versions

5.0.0 Versions

  • Support for multiple blockchains: BFGMiner can now recognize pools that use the same “mining targets,” independently tracking the blockchain for those that do not. This allows you to mine multiple cryptocurrencies simultaneously using any pool strategy, including balance and load balancing.
  • Support for multiple algorithms: BFGMiner can now concurrently hash both scrypt and SHA256d algorithms, allowing you to assign a mining algorithm for each target. Similar to the support for multiple blockchains, this functionality works even in balancing strategies. Note that currently only CPU, OpenCL, and Proxy drivers actually support multiple algorithms simultaneously (DualMiner must be pre-configured for only one, and GridSeed remains exclusive to encryption).
  • Stratum extensions for mining targets: New experimental Mining.capabilities and Mining.set_goal methods for Stratum enable you to grant the pool control over the mining algorithm. These extensions are considered draft and may be modified based on the needs of multi-blockchain pool operators.
  • RPC (Remote Procedure Call): Expanded for multiple mining targets/algorithms. The interface may be subject to change.
  • kncasic: A new driver for KnCMiner Neptune (and second-generation Jupiter modules).
  • minion: A new driver for BlackArrow Prospero X1.5.
  • Titan: Optimize cleanup from KnCMiner and reduce processor overhead from each core to each crystal.
  • Keccak: Support for SHA-3 winner’s hash as a proof-of-work algorithm.
  • opencl: Workaround: Global work offset support is broken in drivers with errors.
  • opencl: GPU mining is now disabled by default for scrypt. Use -S opencl:auto to enable it.

4.10.1 Versions

  • Updated Windows libcurl library from version 7.38.0 to 7.39.0.
  • Fix: bytes_free – set buf to NULL to reuse bytes_t.
  • Fix: minergate – avoid malloc(0) if the statistics file has too few values.
  • Fix: modminer – prevent developer name leakage when detecting claimed devices.
  • Fixed: free memory allocated for loading/writing the configuration file.
  • Fix: nanofury – avoid dereferencing a null pointer on initialization error.
  • Fix: varint_decode – correctly decode multi-byte numbers.
  • CPU: fixed detection of the number of processors using HW_NCPU.
  • Processor: SCHED_IDLE and SCHED_BATCH can only be used with sched_priority 0.
  • Processor: fixed sched_setaffinity parameter – sizeof(cpu_set_t).
  • Fix: opencl – correctly handle negative intensity values and set dynamic intensity without changing the current value.
  • Since longpoll connections are never reused, explicitly disable reuse for libcurl to immediately clean them up.
  • Fix: corrected already-used message getcbaddr.
  • Lower the level of some debug log messages from Bitfury only with device protocol dump.
  • Update libbase58 package to version 0.1.3.
  • README.ASIC: Minor fixes in the Zeusminer section.
  • README.ASIC: Explanation of Zeusminer capabilities.
  • Makefile: explicitly specify .cl files and include only scrypt files if configured with scrypt support.
  • Fix: DevAPI – hashes_done: explicit casting to uint64_t for large calculations (LLVM allowed overflow).
  • Fix: Titan – the first core on each chip had too large a nonce range to work.
  • Travis: Create MinGW64 using ncurses.
  • Fix: declare manual_enable_pool in miner.h for use in api.c.
  • Fix: bitfury – use long long and llabs to avoid incorrect behavior of insufficient/excessive threads.
  • Fix: allocate all active pools in the pool list.
  • Set the quota to 1 when enabling the pool only for failover and disable only for failover when setting the quota.
  • Fix: Pool_actively_desired – detect failover conditions only for load balancing and balancing strategies.

3.5.0 Versions

  • hashbuster: New driver for HashBuster nano ASIC miners.
  • littlefury: Updated driver to use latest bitfury code.
  • Autodetection support for Windows extended to all VCOM-based devices (instead of just FTDI, libusb, and hidapi); this includes at least ModMiner, Big Picture Mining (BF1, RedFury, BlueFury), and USB Block Erupters.
  • Reworked autodetection to scan system devices once and share results with all drivers.

3.0.0 Versions

  • New device driver for ASIC devices, including both Butterfly Labs’ BitForce SC and Avalon.
  • Enhanced device driver API, enabling devices to asynchronously handle multiple slave processors. Use –show-processors to view each individually (not yet supported for Avalon).
  • You can now use --request-diff <difficulty> to ask for a specific share target from pools that support BIP 23 GBT Basic Pool Extensions.
  • Support for submitting found blocks to a local Bitcoin GBT server (bitcoind or Bitcoin-Qt with -server flag): just append #allblocks to the end of your bitcoind’s URI.
  • Stratum connection resuming support – if you lose an active stratum connection, BFGMiner will attempt to resubmit any lost shares when it reconnects.
  • Android target support. You will have to compile it yourself, but it should just work – no patching needed.
  • New Python RPC client example from Christian Berendt.
Ranking
( No ratings yet )
miningbro.com/ author of the article
Did you like the article? Share with friends:
Mining BRO