mining-visualizer / MVis-tokenminer

Token miner for 0xBitcoin
MIT License
20 stars 24 forks source link
0xbitcoin ethereum mining mining-visualizer

MVis-tokenminer

This is a fork of my MVis-ethminer program, which was a fork of Genoil's ethminer. CPU & AMD GPU mining are supported. Pool mining and solo mining are both supported.

Installation

YouTube Tutorial : https://www.youtube.com/watch?v=W-gLERwzKno

Pool Mining
[Node]
Host=http://your_mining_pool.com:8080
Stratum=false

[0xBitcoin]
MinerAcct=0x1234512345123451234512345123451234512345
Solo Mining
General

Configuration Details

MVis-tokenminer is partially configured via command line parameters, and partially by settings in tokenminer.ini. Run tokenminer --help to see which settings are available on the command line. Have a look inside the .ini file to see what settings can be configured there. (It is fairly well commented). Some settings can only be set on the command line (legacy ones mostly), some settings can only be set in the .ini file (newer ones mostly), and some can be set in both. For the last group, command line settings take precedence over the .ini file settings.

Command Line Options

Node configuration:
    -N, --node <host:rpc_port>  Host address and RPC port of your node/mining pool. (default: 127.0.0.1:8545)
    -N2, --node2 <host:rpc_port>  Failover node/mining pool (default: disabled)
    -I, --polling-interval <n>  Check for new work every <n> milliseconds (default: 2000). 
    -R, --farm-retries <n> Number of retries until switch to failover (default: 4)

 Benchmarking mode:
    -M,--benchmark  Benchmark for mining and exit
    --benchmark-warmup <seconds>  Set the duration of warmup for the benchmark tests (default: 8).
    --benchmark-trial <seconds>  Set the duration for each trial for the benchmark tests (default: 3).
    --benchmark-trials <n>  Set the number of benchmark tests (default: 5).

 Mining configuration:
    -P  Pool mining
    -S  Solo mining
    -C,--cpu  CPU mining
    -G,--opencl  When mining use the GPU via OpenCL.
    --cl-local-work <n> Set the OpenCL local work size. Default is 128
    --cl-work-multiplier <n> This value multiplied by the cl-local-work value equals the number of hashes computed per kernel 
       run (ie. global work size). (Default: 8192)
    --opencl-platform <n>  When mining using -G/--opencl use OpenCL platform n (default: 0).
    --opencl-device <n>  When mining using -G/--opencl use OpenCL device n (default: 0).
    --opencl-devices <0 1 ..n> Select which OpenCL devices to mine on. Default is to use all
    -t, --mining-threads <n> Limit number of CPU miners to n (default: use everything available on selected platform)
    --allow-opencl-cpu  Allows CPU to be considered as an OpenCL device if the OpenCL platform supports it.
    --list-devices List the detected OpenCL/CUDA devices and exit. Should be combined with -G or -U flag
    --cl-extragpu-mem <n> Set the memory (in MB) you believe your GPU requires for stuff other than mining. default: 0

 Miscellaneous Options:
    --config <FileSpec>  - Full path to an INI file containing program options. Default location is 1) the executable folder, or 
                           if not there, then in 2) %LocalAppData%/tokenminer/tokenminer.ini (Windows) or 
                           $HOME/.config/tokenminer/tokenminer.ini (Linux).  If this option is specified,  it must appear 
                           before all others.

 General Options:
    -V,--version  Show the version and exit.
    -h,--help  Show this help message and exit.

INI File Settings


############################################################################

[General]

; Optional. Pool Mining only. uncomment this to specify your own web3 endpoint. you
; don't need this to mine successfully.  it is only used to display your token
; balance on screen. there are a variety of publicly available web3 services. 
; see https://ethereumnodes.com/

; Web3Url=https://mainnet.infura.io/v3/_your_infura_id_

############################################################################

[Node]

; If you are pool mining, set Host to the URL of your mining pool.
; If you are solo mining, set the Host to point to your node. Public nodes 
; can also be used (ie. Infura). You can also set these with the -N 
; command line paramater.  The command line overrides settings specified here
;
; Examples, POOL MINING:
;    Host=http://mvis.ca:8080
;
; Examples, SOLO MINING:
;    Host=127.0.0.1:8545
;    Host=https://mainnet.infura.io/your_api_key

Host=

; Pool Mining: Set this to true if the mining pool supports stratum protocol.
; Currently only https://mvis.ca does, on port 8090.
Stratum=false

############################################################################

[Node2]

; Secondary (failover) node/mining pool, if you have one. Default is disabled.

; Host=http://your_failover_mining_pool.com

Stratum=false

############################################################################

[0xBitcoin]

; POOL MINING: Your ETH account, to which payouts will be made. THE PRIVATE
;   KEY IS NOT REQUIRED.  Note the acct should start with 0x.
;
; SOLO MINING: Your ETH account and private key.  Note the PK does NOT start
;   with 0x.  Mining rewards will be deposited to this account.  Transaction
;   fees will be DRAWN from this account.  Make sure you have enough funds!!

MinerAcct=0x........................................
AcctPK=................................................................

; 0xBitcoin contract address. normally you will not change this.
TokenContract=0xb6ed7644c69416d67b522e20bc294a9a9b405b31

; The remaining settings in this section apply only to SOLO MINING:

; gas limit used when submitting solution
GasLimit=200000

; if you have multiple mining rigs, specify a shared folder to make sure
; multiple miners don't try to submit a solution for the same challenge.
; eg. ChallengeFolder=\\DESKTOP\folder_name
ChallengeFolder=

############################################################################

; this section only applies to SOLO MINING

[Gas]

; All settings in this section can be changed 'on the fly' (without having
; to restart the miner).

; set to true to send EIP-1559 style transactions when minting. set to false to 
; use old-style legacy transactions.
EIP1559=true

; priority fee (miner tip) to use for mint transactions, in gwei. Only used for EIP-1559 transactions.
MaxPriorityFee=1.5

; max gas price in gwei.  for EIP-1559 transactions this is the MaxFeePerGas setting. for 
; legacy transactions this can be used to put an upper limit on gas oracle recommendations.
MaxFee=

; LEGACY transactions only: gas price to use for mint transactions, in gwei. 
; You can also specify "oracle" to use recommended gas price from web3.eth.getGasPrice
GasPrice=oracle

############################################################################

[ThermalProtection]

; Temperature provider ('amd_adl' or 'speedfan')
TempProvider=amd_adl

; Default temperature at which GPU throttling is activated. This applies to all GPUs on this mining rig.
; Note: throttling is at the hashing level, not the driver level.
ThrottleTemp=80

; Number of seconds after which the entire mining rig will shutdown if one or more GPUs
; remain at or above ThrottleTemp.
ShutDown=20

Building on Windows

mkdir build 
cd build
cmake -G "Visual Studio 12 2013 Win64" ..
Visual Studio

Building on Ubuntu

Ubuntu 16.04

This has only been verified to work with Ubuntu 16.04. OpenCL only (for AMD cards)

sudo apt-get update
sudo apt-get -y install software-properties-common
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install git cmake libcryptopp-dev libleveldb-dev libjsoncpp-dev libjsonrpccpp-dev libboost-all-dev libgmp-dev libreadline-dev libcurl4-gnutls-dev ocl-icd-libopencl1 opencl-headers mesa-common-dev libmicrohttpd-dev build-essential -y
git clone https://github.com/mining-visualizer/MVis-tokenminer.git <mvis_folder>
cd <mvis_folder>
mkdir build
cd build
cmake -DBUNDLE=miner ..
make

You can then find the executable in the build/ethminer subfolder

Ubuntu 18.04

Unverified: A user has reported that you can build this under Ubuntu 18.04 by simply changing libcryptopp-dev to libcrypto++-dev in the apt-get install command above.

Credits

Donations

Donations can be made to to mining-visualizer.eth (0xA804e933301AA2C919D3a9834082Cddda877C205)