Author

Topic: Solo mining with Bitcoin Core 0.21.0 (latest) + cgminer 4.9.2 (latest) (Read 638 times)

newbie
Activity: 1
Merit: 0
Where do you get cgminer 4.9.2. windows binary ?

I tried to cross compile via MSYS2, vial Ubuntu and Debian using MXE but can't build due to errors in cgminer code.
member
Activity: 60
Merit: 20
Bitcoin Core v0.21.1  has no problem for solo miner. mining cmd: getblocktemplate and submitblock got no changed and work well.

cgminer 4.11.1 need to fix it to work on gbt_solo mode. The cgminer got three work modes: has_stratum, has_gbt and gbt_solo.
I found it is very hard to run c code when segment faults often pump out. You have to work out yourself as solo users.

jr. member
Activity: 33
Merit: 8
Here's how I am doing it. 

BFGMiner is able to mine against 0.21.0 but CGMiner is not.  However, BFGMiner is not compatible with Newpac sticks (not 2pac or compac those work).

So I run bfgminer as a proxy only, then connect my cgminer to bfgminer.
legendary
Activity: 2954
Merit: 4158
Might be a redundant question but is your Bitcoin Core synchronized? My current solomining setup still functions fine and there doesn't seem to be anything wrong with your config.
newbie
Activity: 13
Merit: 0
Quote
There must be something wrong here with cgminer, right?
Umm, or could be you found the reason that "Many older threads told me to only use Bitcoin Core 0.19.1"...
Since -ck no longer updates cgminer and closed support for it, guess what?  Wink

Hm. But it should work with Bitcoin core version 0.19.1, right? I am still getting the same error.  
  
With bfgminer (latest) it says "No servers could be used! Exiting."
 
and with cgminer: "No Stratum, GBT or Solo support in Pool 0 (IP:Port) unable to use"
 
Many users report that some bitcoin.conf changes fixed their issue and they were able to mine to bitcoin core 0.19.1. But I tried out all the fixes, none helped.
legendary
Activity: 3612
Merit: 2506
Evil beware: We have waffles!
Quote
There must be something wrong here with cgminer, right?
Umm, or could be you found the reason that "Many older threads told me to only use Bitcoin Core 0.19.1"...
Since -ck no longer updates cgminer and closed support for it, guess what?  Wink
newbie
Activity: 13
Merit: 0
Many older threads told me to only use Bitcoin Core 0.19.1
I am starting it with

./bitcoin-qt --server

my bitcoin.conf looks like this:

daemon=1
server=1
rpcuser=(username)
rpcpassword=(password)
rpcallowip=127.0.0.1
prcport=(port)

I tried many different ports and many different username/password variations in the .conf and cgminer.
I once tried running bitcoind it via

sudo ./bitcoind --server

which starts just fine and then prints "wrong password attempt" or something like that in the log terminal window when I start cgminer with the correct rpc user/pass. Wrong password - but it's the correct one. Weird.

 
I start cgminer like this:
sudo ./cgminer -o http://127.0.0.1:(port) -u (username) -p (password) --btc-address (address)
Starting it wouthout sudo gives me a permission error on my mining devices.


What am I doing wrong? The username and password I use for cgminer are 100% the same as in the bitcoin.conf.
Thanks in advance for every kind help I can get! Smiley  
Edit:
When starting bitcoin core via

sudo ./bitcoind -server -rpcuser=(user) -rpcpassword=(password)

(Starting it via sudo is the only way for me to see the live log in terminal.)

Then quitting it again via
  
sudo ./bitcoin-cli -rpcuser=(user) -rpcpassword=(password) -stop

it accepts the user/pass combination just fine, prints "Shutdown: In progress..." in the terminal window and quits after a few seconds.  
There must be something wrong here with cgminer, right?
newbie
Activity: 13
Merit: 0
ok thanks.

but what about solo mining with bitcoin core 0.21.0? does it work again?? Smiley
legendary
Activity: 4466
Merit: 1798
Linux since 1997 RedHat 4
Just remember, if your 'mining node' (bitcoin) is not as well connected, to the world wide bitcoin network, as all the major pools, you have a much higher chance of getting an orphan block - i.e. no reward when you find a block.

Random people make random comments about various relays, but alas there are none as good as Matt's Fibre relay that he used to run, but alas that option is no longer available.
The various others make claims on having fast internet connections, but the way Matt's works is easily twice as good as any of them, let alone more than twice as good.
Sending a block around the world is not fast ... and if you are averaging worse than 100ms delays processing blocks and sending them out to the rest of the world, you're not doing it very well ...
newbie
Activity: 13
Merit: 0
Good day everyone!
  
I have researched a lot about solo mining with cgminer and Bitcoin Core and have found people saying that only Bitcoin Core 0.19 supports solo mining with cgminer because of some technical details. Can't find the thread anymore where I have read this. But I think it could have been an outdated thread and the latest cgminer and Bitcoin Core versions may have already fixed that issue so that one can solo mine again?
  
I also found out that I need to use the startup command --btc-address (address) in order to actually receive mined Bitcoin to my wallet. Is that correct?
  
Am wondering if the current cgminer 4.9.2 version and Bitcoin Core 0.21.0 version work well together with solo mining Bitcoin? I am using a Raspberry Pi 4 with the latest Raspbian OS version and have the miners plugged into the USB ports. The miners itself work just fine, I have tested them with a Bitcoin mining pool and they are hashing away nicely.  
  
I know, I know. Solo mining is selfish and the probability of finding a block with outdated mining hardware is low. I plan on testing everything out with the solo setup first before I buy any larger amounts of miners to get into it more seriously. Don't want to find out that Bitcoin Core does not support solo mining anymore with cgminer and end up with useless brand new mining hardware. So I try it out first with low end miners.
  
1: Are there any other commands I should add besides -o http://localhost:8332 -u username -p passsword --btc-address address?
Are there any specific entries I should make for the bitcoin.conf file besides setting up a username and password and setting up the port with an entry in said file?
 
2: I have also read that a successfully setup cgminer with Bitcoin Core will display the textline "mining to (address)" in the cgminer window every few seconds, is that correct? What am I doing wrong if I do not see this message?

3: What startup commands do I need for Bitcoin Core for this solo setup besides -server (or is it --server with 2x "-"?)


 
Thanks so much for your help guys!
I hope other people google'ing the current versions of cgminer 4.9.2 and Bitcoin Core 0.21.0 + Bitcoin solo mining will find this thread with some helpful answers/a good tutorial made by someone nice in this thread.  Smiley Because I did find various different startup commands via Google for cgminer and am completely puzzled which of them I should use and which I should not use. (besides the -o, -u and -p).
Jump to: