Bitcoin Forum
February 18, 2025, 12:41:53 AM *
News: Community Awards voting is open
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / Re: [Guide] Solo mine testnet bitcoins with cgminer, Bitcoin Core, and a Compac F on: October 04, 2024, 06:25:03 PM
Try your local net address instead of what I think you have mistyped.

127.0.0.1 not 172.0.0.1
Thank you sooooooooooo very much for this! I spent days trying and trying and couldn't find what I missed. It works now.
2  Bitcoin / Development & Technical Discussion / Help me start cgminer on compac F on: October 04, 2024, 11:21:46 AM
I bought a second hand red compac F miner, and followed your instructions. I need help to get it working.

Bitcoin Core, cgminer and the compac F are installed on the same system.

Now let's prepare the configuration file. Create a text file named bitcoin_testnet.conf in ~/bitcoin_testnet/ and put these content in it:
I use this:
Code:
testnet=1
txindex=0
server=1
[test]
rpcport=5000
rpcallowip=172.0.0.1
rpcuser=USESR
rpcpassword=PASS
rpcbind=0.0.0.0
prune=550


Now, in theory we should be ready, but we need one extra change. Open the file cgminer.c with your favorite text editor and change this line:

Code:
if (opt_btc_address[0] != '1') {

To this:

Code:
if (opt_btc_address[0] != '1' && opt_btc_address[0] != 'm' && opt_btc_address[0] != 'n'  ) {

I think I can skip this because the code on github is updated already:
Code:
      switch (opt_btc_address[0]) {
            case '1':
            case 'm':
            case 'n':
                  break;
            default:
                  applog(LOG_ERR, "Bitcoin address %s is NOT a P2PKH address, unable to mine solo on %s",
                         opt_btc_address, pool->rpc_url);
                  goto out;
      }
.
Create a text file named ~/bitcoin_testnet/cgminer_testnet.conf with these contents:
I use this (last comma removed, thanks n0nce)
Code:
{
"pools" : [
        {
                "url" : "http://172.0.0.1:5000",
                "user" : "USER",
                "pass" : "PASS"
        }
],

"btc-address": "moZKMsGTNSd3Ngu5i6RN7CC7PHaQ5wd5ms",

"gekko-compacf-freq" : "400",
"gekko-compacf-detect" : true,
"gekko-start-freq" : "300",
"gekko-mine2" : true,
"gekko-tune2" : "60",

"suggest-diff" : "442",
"failover-only" : true
}

And now you can simply run cgminer like this:

Code:
sudo /home/user/bitcoin_testnet/cgminer/cgminer -c /home/user/bitcoin_testnet/mine_testnet.conf
It doesn't work. I get:
Code:
[date] Started cgminer 4..12.1
A minute later:
Code:
Loaded configuration file ../cgminer_testnet.conf
Probing for an alive pool
No servers were found that could be used to get work from.
Please check the details from the list below of the servers you have input
Most likely you have input the wrong URL, forgotten to add a port, or have not set up workers
Pool: 0 URL: http://172.0.0.1:5000 User: USER Password: PASS
Press any key to exit, or cgminer will wait indefinitely for an alive pool.
2 minutes later:
Code:
No Stratum, GBT or Solo support in pool 0 http://172.0.0.1:500 unable to use

Why can't cgminer connect to Bitcoin Core? What do I have to change?

Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!