AMD grin-miner error

i’ve put together this quick howto for linux miners with AMD polaris/vega gpus (you need a gpu with 8GB vram)

1.) build grin-miner on linux
curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
git clone https://github.com/mimblewimble/grin-miner.git
cd grin-miner
git submodule update --init
cargo build --release --features opencl

2.) install the miner to a specific location/dir
mkdir -p /opt/grin-miner/plugins
cp grin-miner.toml /opt/grin-miner
cp target/release/grin-miner /opt/grin-miner
cp target/release/plugins/*.cuckooplugin /opt/grin-miner/plugins
cp target/release/deps/libocl_cuckaroo.so /opt/grin-miner/plugins/ocl_cuckaroo.cuckooplugin

3.) configure the miner (edit the /opt/grin-miner/grin-miner.toml file)

  • if you are not running your own node, you have to point the miner to a public pool (for example grinmint.com).
    so, change stratum server related options in grin-miner.toml according to https://grinmint.com/pages/help.html
    stratum_server_addr = “us-east-stratum.grinmint.com:3416
    stratum_server_login = "satoshi+randomvalue@nakamoto.com/rig21"
    stratum_server_password = “myverystrongpassword”
    stratum_server_tls_enabled = false

  • you have to comment out the cpu plugin(s) in grin-miner.toml
    cpu mining does not make sense at all and you will need some cpu power for the amd ocl plugin as well.

    #[[mining.miner_plugin_config]]
    #plugin_name = “cuckaroo_cpu_compat_29”
    #[mining.miner_plugin_config.parameters]
    #nthreads = 1

  • the correct plugin for AMD is ocl_cuckaroo (not ocl_cuckatoo) and you have to specify the plugin for each gpu in grin-miner.toml
    example for 4 gpu (maybe you will need to change the platform value from 0 to 1 or 2):

    [[mining.miner_plugin_config]]
    plugin_name = “ocl_cuckaroo”
    [mining.miner_plugin_config.parameters]
    platform = 0
    device = 0

    [[mining.miner_plugin_config]]
    plugin_name = “ocl_cuckaroo”
    [mining.miner_plugin_config.parameters]
    platform = 0
    device = 1

    [[mining.miner_plugin_config]]
    plugin_name = “ocl_cuckaroo”
    [mining.miner_plugin_config.parameters]
    platform = 0
    device = 2

    [[mining.miner_plugin_config]]
    plugin_name = “ocl_cuckaroo”
    [mining.miner_plugin_config.parameters]
    platform = 0
    device = 3

4.) run the miner from the installation dir
cd /opt/grin-miner ; ./grin-miner