Bitcoin Forum
June 27, 2025, 07:25:24 AM *
News: Latest Bitcoin Core release: 29.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 [5]  All
  Print  
Author Topic: SoloMining with CGMiner against Bitcoind / Bitcoin Core v0.18.1  (Read 2919 times)
hilaluya
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
January 13, 2024, 10:56:39 AM
 #81

what patch do you guys recommend for solo mining on bitcoind?
citb0in
Hero Member
*****
Offline Offline

Activity: 1022
Merit: 783


Bitcoin g33k


View Profile
January 13, 2024, 11:11:22 AM
 #82

what patch do you guys recommend for solo mining on bitcoind?

See here:
https://bitcointalk.org/index.php?topic=5373190.msg61461437#msg61461437

So that you don't do anything wrong when enabling the solo mining functionality and risk misconfiguration, I would highly recommend you to use ready-made cgminer versions that already contain this patch. There are several Github repositories. My own favorite is github.com/phaenomenon/cgminer, which is quite up-to-date (version 4.12.1) and includes many other useful things besides the actual Golden Guy patch. For example, it automatically checks the given payout address for correctness, only then the mining process starts at all. If you accidentally entered a Bech32 for solo mining, cgminer warns you at startup and aborts with an error message so you can correct it. Also, you can mine not only in mainnet but also in testnet. In testnet you need to provide a legacy address that starts with "m" or "n" and this is also handled by the input validation. The README contains useful information under "SOLO mining" and there are also very cool start scripts included, so you can get started right away.

I also highly recommend reading those two How-To's from nullama which explains how to mine on testnet using a GekkoScience Compac-F USB miner or even with a GPU/CPU:
[Guide] Solo mine testnet bitcoins with cgminer, Bitcoin Core, and a Compac F
[Guide] Solo mine testnet bitcoins with bfgminer, Bitcoin Core, and a CPU/GPU

Some signs are invisible, some paths are hidden - but those who see, know what to do. Follow the trail - Follow your intuition - [bc1qqnrjshpjpypepxvuagatsqqemnyetsmvzqnafh]
igorokkk
Legendary
*
Offline Offline

Activity: 2940
Merit: 1041



View Profile
January 16, 2024, 04:59:22 PM
 #83

Quote
My own favorite is github.com/phaenomenon/cgminer, which is quite up-to-date (version 4.12.1)...

There is a ready-made assembly for Windows?
citb0in
Hero Member
*****
Offline Offline

Activity: 1022
Merit: 783


Bitcoin g33k


View Profile
January 16, 2024, 06:16:36 PM
 #84

Quote
My own favorite is github.com/phaenomenon/cgminer, which is quite up-to-date (version 4.12.1)...

There is a ready-made assembly for Windows?

I don't think so. As far as I see this is *nix only so Windows won't be an option. However feel free to check out and read the documentation which is quite detailed and will potentially answer all of your questions. Good luck and happy mining!

Some signs are invisible, some paths are hidden - but those who see, know what to do. Follow the trail - Follow your intuition - [bc1qqnrjshpjpypepxvuagatsqqemnyetsmvzqnafh]
igorokkk
Legendary
*
Offline Offline

Activity: 2940
Merit: 1041



View Profile
January 16, 2024, 06:49:32 PM
 #85

Thank you. I'll try to do this in Linux.
MrJaekin
Sr. Member
****
Offline Offline

Activity: 284
Merit: 259


View Profile
January 14, 2025, 10:09:15 PM
 #86

Hello yoshitmitsu,

you can solo mine on your own full node (bitcoind) without hesitation. Don't be put off by Kano's statements. He is constantly bashing other pool operators because he sees everyone as a rival. As you note, he also doesn't even address your questions that you understandably asked, instead he also attacks you for supposedly promoting the patch that unlocks solo functionality. He doesn't like that thousands of solo-mining enthusiasts out there could mine on their own full-node because that would mean even fewer participants on his pool. As you may know cgminer was developed by Con Kolivas (-Ck) and Kano had participated there as a developer. Kano especially developed the driver parts. CK kicked Kano out many years ago and banned him from development because of personal disputes between the two. Since then, Kano has been constantly ranting on CK and everything that has to do with him. However, this bashing does not exist the other way around. CK stopped the development of cgminer a long time ago and made it public. Kano has been managing cgminer on his own since then and has his own fork at github.com/kanoi/cgminer. There he maintains e.g. the latest drivers, especially those from Gekkoscience. He sees himself as a god, everyone else is a loser in his opinion.

About your questions and your intention. You are of course welcome to apply the golden-guy patch. As it was already suggested to you, you could clone the current cgminer version from Kanos' github repository and then apply the golden-guy patch. As mentioned here in the thread, there are also numerous other github repositories that include this patch, which unlocks solo mining functionality. What you should pay attention to when you manually apply the golden-guy patch --> you must NOT specify a bech32 address (begins with bc1q...) as payout address but you should exclusively use a legacy P2PKH address (begins with 1...). If you would use a bech32 as payout address (eg. bc1qxyz123abc...) then cgminer would seem to run without any problems at first sight, but if you should really hit a block, then the coinbase transaction would be erroneous and the reward would not be transferred to your specified bc1q.... (Bech32) address but to a random bitcoin address. Your reward would be lost, that would be fatal and nobody wants that. This is what Kano means with his incomplete statement and although he knows the risk, he resists to post this information here publicly, so that he can claim himself as a prophet afterwards full of glee (by actions like that). Such behavior is anything but exemplary.

Bech32 didn't exist when CK implemented solo mining in cgminer those times and as explained before cgminer was put in archive mode by CK. Kano still deliberately avoids unlocking solo functionality in his current versions, and he tries to justify this in the sense that it would be foolish to mine on a dedicated full-node. Of course, it should be clear to everyone that a full node and mining on such a full node requires certain minimum requirements and how important performance is in the context of the mining process. A possibly found valid block must finally find its way into the blockchain in the shortest and fastest way and reach many nodes at ultra-fast speed, otherwise one runs the risk of stale shares and orphan blocks. Not only a high-performance full node is important, but also the speed to the Internet plays a role, as well as the routers and hops in between. At best, everything runs in a data center with high-quality devices and top performance with an extremely fast Internet connection. Keep in mind the sheer amount of data (some TBs per month) just for the GBT traffic so running this at a data center makes only sense if your miner is located on-site, too. This information could all be mentioned, explained and ultimately left to the user's free decision to solo-mine on a full-node.

So that you don't do anything wrong when enabling the solo mining functionality and risk misconfiguration, I would highly recommend you to use ready-made cgminer versions that already contain this patch. There are several Github repositories. My own favorite is github.com/phaenomenon/cgminer, which is quite up-to-date (version 4.12.1) and includes many other useful things besides the actual Golden Guy patch. For example, it automatically checks the given payout address for correctness, only then the mining process starts at all. If you accidentally entered a Bech32 for solo mining, cgminer warns you at startup and aborts with an error message so you can correct it. Also, you can mine not only in mainnet but also in testnet. In testnet you need to provide a legacy address that starts with "m" or "n" and this is also handled by the input validation. The README contains useful information under "SOLO mining" and there are also very cool start scripts included, so you can get started right away.

I also highly recommend reading those two How-To's from nullama which explains how to mine on testnet using a GekkoScience Compac-F USB miner or even with a GPU/CPU:
[Guide] Solo mine testnet bitcoins with cgminer, Bitcoin Core, and a Compac F
[Guide] Solo mine testnet bitcoins with bfgminer, Bitcoin Core, and a CPU/GPU

In case you use a GekkoScience Compac F, the installation process is as follows.

Code:
# clone the repository
git clone https://github.com/phaenomenon/cgminer

# rename it to a meaningful name so you can distinguish it in case you want to try other cgminer versions, too.
mv cgminer cgminer_phaenomenon

# enter directory
cd cgminer_phaenomenon

# compile it
CFLAGS="-O2 -march=native -fcommon" ./autogen.sh --enable-gekko
make

# look at the provided three start scripts *.sh and *.conf files and adjust to suit your needs, here I choose testnet for the initial test
vi start_solomining_ownFullNode_testnet.sh

# ensure your bitcoind is running testnet and then launch cgminer
./start_solomining_ownFullNode_testnet.sh

Logs are written to the subfolder "logs\" which I find very convenient. After you have successfully mined your first block on testnet and received succesful your block reward, you could switch to mainnet.

Hope this guide is helpful for everyone. Good luck and happy solo-mining

citb0in


Sorry to revive an old thread, but I ran through these steps and the (github.com/phaenomenon/cgminer) cgminer installs correctly and runs fine, but it doesn't see my new Gekkoscience Compac A1s. Does this cgminer build not have support for them?

EDIT: I'm using the latest BTC Core v27.1.0 and I'm solo mining to it.
NotFuzzyWarm
Legendary
*
Offline Offline

Activity: 4046
Merit: 3145


Evil beware: We have waffles!


View Profile
January 14, 2025, 10:16:21 PM
Merited by Sledge0001 (1)
 #87

Quote
but it doesn't see my new Gekkoscience Compac A1s. Does this cgminer build not have support for them?
Correct.
It probably does not support the Compac-F either as the drivers for both were added by Kano just a few years ago for the F and last year for the A1.
Link to Kano's git is in my sig.

btw: that version of cgminer you have is a hacked version and NOT recommended. Amongst other things it adds an extra nonce aka the Golden Nonce. That is a security risk as it allows the miner to switch work to mining other coins without telling you about it...

- 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  Discord support invite at https://kano.is/
-Support Sidehacks miner development. Donations to:   1BURGERAXHH6Yi6LRybRJK7ybEm5m5HwTr
MrJaekin
Sr. Member
****
Offline Offline

Activity: 284
Merit: 259


View Profile
January 14, 2025, 10:27:14 PM
 #88

Quote
but it doesn't see my new Gekkoscience Compac A1s. Does this cgminer build not have support for them?
Correct.
It probably does not support the Compac-F either as the drivers for both were added by Kano just a few years ago for the F and last year for the A1.
Link to Kano's git is in my sig.

btw: that version of cgminer you have is a hacked version and NOT recommended. Amongst other things it adds an extra nonce aka the Golden Nonce. That is a security risk as it allows the miner to switch work to mining other coins without telling you about it...

Great, thanks for the info! I had no idea. I was able to install Kano's version but now I'm getting an error when I run it:

"Pool 0 JSON failed to decode GBT"
NotFuzzyWarm
Legendary
*
Offline Offline

Activity: 4046
Merit: 3145


Evil beware: We have waffles!


View Profile
January 15, 2025, 01:39:25 AM
 #89

That is because GBT was depreciated and possibly removed from cgminer a couple years after the Stratum protocol came into use in late 2013. In short it is looking for a Stratum V1 server as the connection to Core. Not sure if GBT can patched back into cgminer to mine directly to Core. Kano would be the one to ask about that.

Maybe can go through a Stratum V1 proxy as a middle man?

- 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  Discord support invite at https://kano.is/
-Support Sidehacks miner development. Donations to:   1BURGERAXHH6Yi6LRybRJK7ybEm5m5HwTr
Sledge0001 (OP)
Full Member
***
Offline Offline

Activity: 666
Merit: 165



View Profile WWW
January 15, 2025, 01:50:21 AM
Merited by NotFuzzyWarm (1)
 #90

That is because GBT was depreciated and possibly removed from cgminer a couple years after the Stratum protocol came into use in late 2013. In short it is looking for a Stratum V1 server as the connection to Core. Not sure if GBT can patched back into cgminer to mine directly to Core. Kano would be the one to ask about that.

Maybe can go through a Stratum V1 proxy as a middle man?

Kano won't add it back. I had requested this some time back and his comment was he didn't want to help people lose blocks...  Roll Eyes

The best option out there right now is either build your own pool from scratch (still happening on this end) or download and run open source pool code from CK or PublicPool. Those are the two best options if you are truly hell bent on solo mining to your own pool / node.

You're not ready for it....  You better believe we are!
Built to win! https://www.SoloPool.com/
Nexus9090
Full Member
***
Online Online

Activity: 388
Merit: 113

So many numbers and so little time


View Profile
January 15, 2025, 01:00:42 PM
 #91

That is because GBT was depreciated and possibly removed from cgminer a couple years after the Stratum protocol came into use in late 2013. In short it is looking for a Stratum V1 server as the connection to Core. Not sure if GBT can patched back into cgminer to mine directly to Core. Kano would be the one to ask about that.

Maybe can go through a Stratum V1 proxy as a middle man?


Bitcoincore GBT was removed from CGMiner, however it can be patched back in, see this thread.

https://bitcointalk.org/index.php?topic=5415335.0
Pages: « 1 2 3 4 [5]  All
  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!