Bitcoin Forum
June 27, 2024, 12:39:20 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Solo mining with Bitcoin Core 0.21.0 (latest) + cgminer 4.9.2 (latest)  (Read 647 times)
MagicInternetPizza (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
April 12, 2021, 11:03:14 PM
Last edit: April 13, 2021, 11:06:32 AM by MagicInternetPizza
 #1

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).
kano
Legendary
*
Offline Offline

Activity: 4536
Merit: 1847


Linux since 1997 RedHat 4


View Profile
April 17, 2021, 01:21:16 AM
 #2

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 ...

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
MagicInternetPizza (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
April 19, 2021, 12:30:38 PM
 #3

ok thanks.

but what about solo mining with bitcoin core 0.21.0? does it work again?? Smiley
MagicInternetPizza (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
April 24, 2021, 08:09:40 PM
Last edit: April 24, 2021, 10:50:16 PM by MagicInternetPizza
 #4

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?
NotFuzzyWarm
Legendary
*
Online Online

Activity: 3682
Merit: 2604


Evil beware: We have waffles!


View Profile
April 24, 2021, 11:32:17 PM
 #5

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

- For bitcoin to succeed the community must police itself -    My info useful? Donations welcome!  3NtFuzyWREGoDHWeMczeJzxFZpiLAFJXYr
 -Sole remaining active Primary developer of cgminer, Kano's repo is here
-Support Sidehacks miner development. Donations to:   1BURGERAXHH6Yi6LRybRJK7ybEm5m5HwTr
MagicInternetPizza (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
April 25, 2021, 12:09:49 PM
 #6

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.
ranochigo
Legendary
*
Offline Offline

Activity: 2982
Merit: 4193



View Profile
April 25, 2021, 03:37:28 PM
 #7

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.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
tom22022
Jr. Member
*
Offline Offline

Activity: 33
Merit: 8


View Profile
May 04, 2021, 02:48:03 PM
 #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.
jack1cryptotalk007
Member
**
Offline Offline

Activity: 60
Merit: 20


View Profile
January 09, 2022, 02:54:58 AM
Last edit: January 09, 2022, 02:58:47 PM by jack1cryptotalk007
 #9

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.

Warlord711
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
January 30, 2022, 10:21:50 PM
 #10

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.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!