Code Monkey home page Code Monkey logo

soliditysha3miner's Introduction

SoliditySHA3Miner

All-in-one mixed multi-GPU (nVidia, AMD, Intel) & CPU miner solves proof of work to mine supported EIP918 tokens in a single instance (with API).

Current latest public release version: 2.2.2

Runs on Windows x64, HiveOS, EthOS, and Ubuntu.

Built with .NET Core 2.2 SDK, VC++ 2017, gcc 4.8.5, nVidia CUDA SDK 10.0 64-bit, and AMD APP SDK v3.0.130.135 (OpenCL)

If you are looking for a GUI version, refer to this link [https://github.com/lwYeo/SoliditySHA3MinerUI/releases]

Releases can be found here.

LICENSE

SoliditySHA3Miner is licensed under the Apache License, Version 2.0 (the "License");

Libraries are included in the Software under the following license terms:

libkeccak-tiny [https://github.com/coruus/keccak-tiny/]

Nethereum [https://github.com/Nethereum/Nethereum/blob/master/LICENSE.md]

Json.NET [https://github.com/JamesNK/Newtonsoft.Json/blob/master/LICENSE.md]

Common Infrastructure Libraries for .NET [http://netcommon.sourceforge.net/license.html]

Bouncy Castle [https://www.bouncycastle.org/licence.html]

Donation addresses

ETH (or any ERC 20/918 tokens)  : 0x9172ff7884CEFED19327aDaCe9C470eF1796105c

BTC                             : 3GS5J5hcG6Qcu9xHWGmJaV5ftWLmZuR255

LTC                             : LbFkAto1qYt8RdTFHL871H4djendcHyCyB

Usage: SoliditySHA3Miner [OPTIONS]

Options:

help                    Display this help text and exit

allowCPU                Allow to use CPU, may slow down system (default: false)

cpuAffinity             Comma separated list of CPU affinity ID to use (default: all odd number logical processors)

allowIntel              Allow to use Intel GPU (OpenCL) (default: true)

allowAMD                Allow to use AMD GPU (OpenCL) (default: true)

allowCUDA               Allow to use Nvidia GPU (CUDA) (default: true)

intelIntensity          GPU (Intel OpenCL) intensity (default: 17, decimals allowed)

listAmdDevices          List of all AMD (OpenCL) devices in this system and exit (device ID: GPU name)

amdDevice               Comma separated list of AMD (OpenCL) devices to use (default: all devices)

amdIntensity            GPU (AMD OpenCL) intensity (default: 24.056, decimals allowed)

listCudaDevices         List of all CUDA devices in this system (device ID: GPU name)

cudaDevice              Comma separated list of CUDA devices to use (default: all devices)

cudaIntensity           GPU (CUDA) intensity (default: auto, decimals allowed)

minerJsonAPI            'http://IP:port/' for the miner JSON-API (default: http://127.0.0.1:4078 [0 disabled])

minerCcminerAPI         'IP:port' for the ccminer-style API (default: 127.0.0.1:4068 [0 disabled])

overrideMaxTarget       (Pool only) Use maximum target and skips query from web3

customDifficulty        (Pool only) Set custom difficulity (check with your pool operator)

maxScanRetry            Number of retries to scan for new work (default: 3)

pauseOnFailedScans      Pauses mining after number of connection fails, including secondary and retries (default: 3)

submitStale             Submit stale jobs, may create more rejected shares (default: false)

abiFile                 Token abi in a file (default: '0xBTC.abi' in the same folder as this miner)

web3api                 User-defined web3 provider URL (default: Infura mainnet provider [dev account, for TESTING PURPOSE only])

contract                Token contract address (default: 0xbtc contract address)

hashrateUpdateInterval  Interval (miliseconds) for GPU hashrate logs (default: 30000)

networkUpdateInterval   Interval (miliseconds) to scan for new work (default: 15000)

masterMode              Enable Master mode that virtually acts as a \"pool\" for slave miners connecting to it (default: false [requires admin/sudo mode])

masterURL               Master instance IP:port, slave mode if 'masterMode' is false (default: none [if 'masterMode' is true, default: http://{localIP}:4080/])

slaveUpdateInterval     (Slave only)Interval (miliseconds) to scan for new work (default: 5000)

kingAddress             Add MiningKing address to nonce, only CPU mining supported (default: none)

address                 (Pool only) Miner's ethereum address (default: developer's address)

privateKey              (Solo only) Miner's private key

gasToMine               (Solo only) Gas price to mine in GWei (default: 3, decimals allowed; note: will override lower dynamic gas price)

gasLimit                (Solo only) Gas limit to submit proof of work (default: 1704624)

gasApiURL               (Solo only) Get dynamic gas price to mine from this JSON API URL (note: leave empty to disable)

gasApiPath              (Solo only) JSON path expression to retrieve dynamic gas price value from 'gasApiURL'

gasApiMultiplier        (Solo only) Multiplier to dynamic gas price value from 'gasApiURL' => 'gasApiPath' (note: use 0.1 for EthGasStation API)

gasApiOffset            (Solo only) Offset to dynamic gas price value from 'gasApiURL' => 'gasApiPath' (after 'gasApiMultiplier', decimals allowed)

gasApiMax               (Solo only) Maximum gas price to mine in GWei from API (default: 7, decimals allowed)

pool                    (Pool only) URL of pool mining server (default: http://mike.rs:8080)

secondaryPool           (Optional) URL of failover pool mining server

logFile                 Enables logging of console output to '{appPath}\\Log\\{yyyy-MM-dd}.log' (default: false)

devFee                  Set developer fee in percentage (default: 2.0%, minimum: 1.5%)

NOTES

For HiveOS, refer to GuideForHiveOS.txt on how to get started.

For EthOS, refer to GuideForEthOS.txt on how to get started.

Do refer to GuideForPoolMining.txt and GuideForSoloMining.txt on how to get started.

Configuration is based on CLI (similar to ccminer), except ".abi" files are required for new tokens (You can manually create one and copy from etherscan.com -> Contract -> Code -> Contract ABI).

Note that there is a configuration file "SoliditySHA3Miner.conf" that saves previous CLI parameters/settings, delete it prior to changing CLI parameters.

Sample CLI launch parameter can be found in the ".bat" and ".sh" file found together with this miner, please refer to it if you need help.

You will have to supply your own Ethereum address (or Private key if you solo mine). It is your own responsibility to mine to the correct address/account.

It is recommended to use your own web3api (e.g. Infura / Geth / Parity) if you solo mine, default value is for TESTING PURPOSE ONLY.

There is a default of 2.0% dev fee (Once every 50th nonce: starting from 11th if Pool mine, or starting from 50th if Solo mine).

You can set to the lowest 1.5% with "devFee=1.5" (the formula is "(nonce mod (100 / devFee)) = 0").

Dev fee in solo mining is by sending the current reward amount after the successful minted block, using the same gas fee as provided in 'gasToMine'.

In the case if the compute load for your GPU is not >= 99%, you can adjust the intensity via (amdIntensity/cudaIntensity/intelIntensity).

Please feedback your results and suggestions so that I can improve the miner. You can either add an issue in the repository, or find me in discord (Amano7). Thanks for trying out this miner!

CREDITS

Donations are encouraged to help support further development of this miner!

Many thanks to the following developers and testers in the 0xBitcoin discord :

Azlehria

mining-visualizer

LtTofu/Mag517

Infernal Toast

0x1d00ffff

TwenteMining

Mikers

Ghorge

BRob

Sly

soliditysha3miner's People

Contributors

lwyeo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

soliditysha3miner's Issues

error Invalid contract address provided, ensure capitalization is correct.

i tried running this on linux debian buster 11, installed the dotnet things but on starting its always saying
Invalid contract address provided, ensure capitalization is correct.

I tried and set the cmd line to the current 0xBTC contract which should be
0xb6ed7644c69416d67b522e20bc294a9a9b405b31

but the same

cpuID not working?

Hello, when using
cpuID=0
cpuID=1,3,4
or anything, I always get this error:
terminate called after throwing an instance of 'std::invalid_argument'
what(): stoi
./CLM.sh: line 16: 12381 Aborted dotnet SoliditySHA3Miner.dll abiFile=ERC-541.abi contract=xxxx pool=http://xxxxx address=yyyy cpuMode=true cpuID=0

Missing the .exe?

I was pretty sure this included the .exe in the .zip's. it seems to be missing now?

Improve the miner to have a master/slave mode

Master instance will perform IO between Infura/geth/pool etc.
While the rest of the Slave instances will perform IO with Master instance through the master's API IP address.
Hence, the Master miner instance will virtually become the "Pool" itself.
This is, especially to reduce excessive polling from multiple rigs/instances with the network, avoiding "rate-limiting" or temporary-ban issues.

Multiple AMD GPUs detection issue

The miner works with a single AMD RX580 GPU well, but If I add multiple same kinds of GPUs, it does not detect other GPUs correctly and stops working.
miner version: 2.2.0

The exact same system with 6 AMD RX580 gpus works well with MVis-tokenminer.

[ERROR] Object reference not set to an instance of an object.

OS: Ubuntu 17.04 LTS
Setup: 4 x GTX 1060

Command: ./0xbtcPSolo.sh

File Contents:

#!/usr/bin/env bash

command -v dotnet >/dev/null 2>&1 ||
{
 echo >&2 ".NET Core is not found or not installed,"
 echo >&2 "download and install from https://www.microsoft.com/net/download/linux/run";
 read -p "Press any key to continue...";
 exit 1;
}
dotnet SoliditySHA3Miner.dll web3api=http://XXX.XXX.XXX.XXX:8545/ abiFile=0xbtc.abi contract=0xB6eD7644C69416d67B522e20bC294A9a9B405B31 gasToMine=50 privateKey=XXXX

Error: "[ERROR] Object reference not set to an instance of an object."

This error seems to coincide with an info log every time right before it, saying "New difficulty detected (XXXXXXXX)..."

As far as I can tell, it is still mining, however.

build info linux

hi

would you mind to add some info tips or something how to build from source on linux?

thank you^^

How to run one GPU out of all

Tyring to run only one GPU i.e. GPU 0 out ot all I have in the rig on HiveOS. All GPUs are AMD.
Tried different commands:
amdDevice:0, amdDevice:ID=0, amdDevice:[0] etc but everytime miner runs all GPUs.
Please advise the proper argument for HiveOS.

Hiveos

Hi,
Do you know if soliditySha3 miner actually works on Hiveos?
How can we contact you?
Thank you very much

solo mining

Any chance someone can get the solo mint function working properly on the 0xgold contract? I see that you have added the 0xGOLD.abi to the miner, but have not been able to achieve a mint ever since the merge mine function became active.
contract address: 0x291de53a16b76dfe28551fd3335225f506db8b82

Incorrect PCI Bus ID for CUDA devices

It seems that all CUDA devices' PCI bus ID are recorded as the first device PCI bus ID.
Which also caused the API to show the same values across all the CUDA devices.
Issue is seen in version 2.1.0

Use last submitted gas parameter if API fails

As described in the title, below is the related error message.
Currently, it will take the minimum value from gasToMine parameter, which can be undesirable at times.

[2018-11-25T09:23:31] [ERROR] Failed to read gas price from API: https://ethgasstation.info/json/ethgasAPI.json
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at SoliditySHA3Miner.Utils.Json.DeserializeFromURL(String url)
   at SoliditySHA3Miner.NetworkInterface.Web3Interface.SubmitSolution(String address, Byte[] digest, Byte[] challenge, UInt64 difficulty, Byte[] nonce, IMiner sender)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.