Pages:
Author

Topic: SoloMining with CGMiner against Bitcoind / Bitcoin Core v0.18.1 - page 3. (Read 2720 times)

newbie
Activity: 72
Merit: 0
I am currently solo mining but through my own pool at the moment.
i like to try that too
do you use cgminer and could you please give me instruction how to mine on own fullnode?

which version do you use and which patch or patches do you have in use,how to install them?
full member
Activity: 633
Merit: 159
sledge which pool did you use when you hit the block? do you solo mine against bitcoind at all?

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

When I hit I was mining on CK's Pool.

I am currently solo mining but through my own pool at the moment.
newbie
Activity: 72
Merit: 0
sledge which pool did you use when you hit the block? do you solo mine against bitcoind at all?

what patch do you guys recommend for solo mining on bitcoind?
full member
Activity: 633
Merit: 159
who do you mean?i did not advertise code for free.i had quoted the patch to ask if you had referred to it in your previous reply because it was not clear.

still unanswered is your statement that this patch sends coins to a foreign address. I'd love to understand, but you don't seem to want to answer.

does anyone else know what kano means and what it has to do with this patch?

Just ignore it. Up to now he has never come up with his own approach - and he probably never will - but rather spends his time on telling other people's work off. That's the real tragedy here.

All I can say is that FOR ME, this golden-guy patch has proven to find blocks countless times on BTC testnet and other forks when solo mining on an own node. And I have tested this with lots of different addresses by now.

But this is no promo, no recommendation and you always do things at your own risk.

I would prefer that this not be the thread that anyone start throwing shade at any user or contributor on this forum regardless of your personal opinions.

The testnet and mainnet are two different beasts. Difficulty of 1 vs. 34T at the moment being one "big" difference Smiley

I will never forget that I would have never hit a block if it hadn't been for Kano's cgminer code, Ck's solo pool and Sidehacks hardware....

Each person should embrace and take their own BTC journey but let's not discount the experience, efforts and contributions made over several years of the people listed above.
legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
who do you mean?i did not advertise code for free.i had quoted the patch to ask if you had referred to it in your previous reply because it was not clear.

still unanswered is your statement that this patch sends coins to a foreign address. I'd love to understand, but you don't seem to want to answer.

does anyone else know what kano means and what it has to do with this patch?

Just ignore it. Up to now he has never come up with his own approach - and he probably never will - but rather spends his time on telling other people's work off. That's the real tragedy here.

All I can say is that FOR ME, this golden-guy patch has proven to find blocks countless times on BTC testnet and other forks when solo mining on an own node. And I have tested this with lots of different addresses by now.

But this is no promo, no recommendation and you always do things at your own risk.
Quoted for posterity, coz that's a pretty specific statement you make there.
member
Activity: 100
Merit: 29
who do you mean?i did not advertise code for free.i had quoted the patch to ask if you had referred to it in your previous reply because it was not clear.

still unanswered is your statement that this patch sends coins to a foreign address. I'd love to understand, but you don't seem to want to answer.

does anyone else know what kano means and what it has to do with this patch?

Just ignore it. Up to now he has never come up with his own approach - and he probably never will - but rather spends his time on telling other people's work off. That's the real tragedy here.

All I can say is that FOR ME, this golden-guy patch has proven to find blocks countless times on BTC testnet and other forks when solo mining on an own node. And I have tested this with lots of different addresses by now.

But this is no promo, no recommendation and you always do things at your own risk.
newbie
Activity: 72
Merit: 0
No, coz in your case you are advertising code for free to people claiming it will work, without testing it properly,
with clearly no understanding of what you are doing, and people are silly enough to listen to you and some of them, if they find  a block, will not get the reward.

Yeah this place is full of hackers that think they know what they are doing but wont be found when the shit hits the fan.

If you were to actually test it properly you would 'likely' spot the obvious issue.

who do you mean?i did not advertise code for free.i had quoted the patch to ask if you had referred to it in your previous reply because it was not clear.

still unanswered is your statement that this patch sends coins to a foreign address. I'd love to understand, but you don't seem to want to answer.

does anyone else know what kano means and what it has to do with this patch?
legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
No, coz in your case you are advertising code for free to people claiming it will work, without testing it properly,
with clearly no understanding of what you are doing, and people are silly enough to listen to you and some of them, if they find  a block, will not get the reward.

Yeah this place is full of hackers that think they know what they are doing but wont be found when the shit hits the fan.

If you were to actually test it properly you would 'likely' spot the obvious issue.
newbie
Activity: 72
Merit: 0
You have enabled other code that wont always work.

Rather simple and obvious actually for a programmer.

you said that after applying this patch cgminer will not send the coins to your address but a
random address under certain circumstances.What code does the patch enable?
can you please be more specific with your reply?
legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
You have enabled other code that wont always work.

Rather simple and obvious actually for a programmer.
newbie
Activity: 72
Merit: 0
Be aware that the patch mentioned above will not send the coins to your address but a random address under certain circumstances.
Most people don't like thoroughly testing patches, so yeah too bad about that hey.

do you mean this patch?

Code:
From 168a1bdfedb1408a690f5387e04e3c9af7842c5e Mon Sep 17 00:00:00 2001
From: Stefan Berger
Date: Sun, 28 Feb 2021 10:51:53 +0000
Subject: [PATCH] Make coinbaseaux flags optional

Needed for solo mining on bitcoind, starting with v0.20.0
It's probably safe to delete the coinbase flags, but leave them in as optional for now.

See also: https://github.com/bitcoin/bitcoin/commit/9aedabe67eedfee9c94c6a50962f11348eb99bca
---
 cgminer.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/cgminer.c b/cgminer.c
index ece7ce100f..ab52e30a61 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -2960,7 +2960,7 @@ static bool gbt_solo_decode(struct pool *pool, json_t *res_val)
  flags = json_string_value(json_object_get(coinbase_aux, "flags"));
  default_witness_commitment = json_string_value(json_object_get(res_val, "default_witness_commitment"));
 
- if (!previousblockhash || !target || !version || !curtime || !bits || !coinbase_aux || !flags) {
+ if (!previousblockhash || !target || !version || !curtime || !bits) {
  applog(LOG_ERR, "Pool %d JSON failed to decode GBT", pool->pool_no);
  return false;
  }
@@ -3039,10 +3039,12 @@ static bool gbt_solo_decode(struct pool *pool, json_t *res_val)
  ofs += ser_number(pool->scriptsig_base + ofs, height); // max 5
 
  /* Followed by flags */
- len = strlen(flags) / 2;
- pool->scriptsig_base[ofs++] = len;
- hex2bin(pool->scriptsig_base + ofs, flags, len);
- ofs += len;
+ if (flags) {
+ len = strlen(flags) / 2;
+ pool->scriptsig_base[ofs++] = len;
+ hex2bin(pool->scriptsig_base + ofs, flags, len);
+ ofs += len;
+ }
 
  /* Followed by timestamp */
  cgtime(&now);

I cannot find a random number generator in that code or any references to bitcoin addresses so what exactly do you mean?
legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
Be aware that the patch mentioned above will not send the coins to your address but a random address under certain circumstances.
Most people don't like thoroughly testing patches, so yeah too bad about that hey.
newbie
Activity: 72
Merit: 0
which cgminer version is required to mine on a full node?could someone give me a download link please
hero member
Activity: 630
Merit: 731
Bitcoin g33k
good idea, but I would advise against solo mining on a hosted node due to the sheer amount of data (some TBs per month) just for the GBT traffic.
could you please explain this a little more, please? I understand that due to GBT a bunch of data is transferred between fullnode and miner every second. As far as miner+fullnode work on one and the same host, which is very powerful and therefore performant, does direct mining on bitcoin core really have a disadvantage compared to mining by intermediary pool ? Or maybe there are even advantages? I tried this setup on testnet and it works fine so far.

I started to play around with mining on a hosted node last week, somewhat inspired by all these solo pools that have popped up recently. A far better option is to install a ckpool instance on the same machine and connect there via stratum. I did such a setup and it works fine. And that way, you don't even need to patch cgminer and it works for stratum-only devices like the Futurebit Apollo as well. If there is interest, I could post a setup guide too.
Would be awesome to see a setup and operation guide, I guess it would be interesting for the whole community. Thank you in advance.

See the steps for patching cgminer below:


EDIT: You could also use this modded cgminer: https://github.com/cmmodtools/cgminer There are a few patched versions around that should work equally well.

many thanks for the instructions. I tried patching Kano's latest cgminer version with the goldenguy patch and it worked fine, I was able to successful mine on bitcoin core with GBT using. Can you explain please what kind of additional mods the mentioned cmmodtools/cgminer has in comparison to Kano latest cgminer version? And which other patched or modded versions of cgminer are available out there that you can suggest and for what reason? What kind of mods/patches have they included and what are they good for (some examples) ? Thanks for your very helpful and kind reply.
member
Activity: 100
Merit: 29

ok, thanks for the info.

Did you modify cgminer any further then adding golden-guys comit?
I now sync the testnet and try it, just to confirm it.

I was thinking that taproot has to be implemented as segwit was.
My concern was, that the version bits have to be valid for taproot.


I just updated cgminer 4.11.1 with the golden-guy patches, fired up bitcoind 22 and synced testnet3. So even without any change on the version bit (in regards to signalling taproot support) the solo-mined blocks are accepted and confirmed on the blockchain just fine. I have yet to find any implication on the mining software that might have been introduced by the taproot changes.

EDIT: According to the getblocktemplate response as returned by bitcoind 22, the client (i.e. cgminer) may just disregard the "taproot" rule and can continue using the existing blocktemplate as-is. Which basically means as long as there are non-taproot transactions added to the mempool, it will just continue to create valid blocks. As can be seen and verified on testnet.

Hi 100knot2dae and rest,

would you mind sharing a brief step-by-step how-to for getting the patched cgminer version to run on with an own full-node which is running bitcoin core v23.0.0. I have a full-node running in a data center with superior superfast internet connection and would like to use it for solo-mining with a GekkoScience Compac F. Unfortunately Kanos' latest version 4.12 does prohibit the use for mining on an own full node running latest bitcoin core 23.0.0 version. How to mitigate this? Thanks to all

Hello,
good idea, but I would advise against solo mining on a hosted node due to the sheer amount of data (some TBs per month) just for the GBT traffic. I started to play around with mining on a hosted node last week, somewhat inspired by all these solo pools that have popped up recently. A far better option is to install a ckpool instance on the same machine and connect there via stratum. I did such a setup and it works fine. And that way, you don't even need to patch cgminer and it works for stratum-only devices like the Futurebit Apollo as well. If there is interest, I could post a setup guide too.

See the steps for patching cgminer below:


EDIT: You could also use this modded cgminer: https://github.com/cmmodtools/cgminer There are a few patched versions around that should work equally well.
hero member
Activity: 630
Merit: 731
Bitcoin g33k

ok, thanks for the info.

Did you modify cgminer any further then adding golden-guys comit?
I now sync the testnet and try it, just to confirm it.

I was thinking that taproot has to be implemented as segwit was.
My concern was, that the version bits have to be valid for taproot.


I just updated cgminer 4.11.1 with the golden-guy patches, fired up bitcoind 22 and synced testnet3. So even without any change on the version bit (in regards to signalling taproot support) the solo-mined blocks are accepted and confirmed on the blockchain just fine. I have yet to find any implication on the mining software that might have been introduced by the taproot changes.

EDIT: According to the getblocktemplate response as returned by bitcoind 22, the client (i.e. cgminer) may just disregard the "taproot" rule and can continue using the existing blocktemplate as-is. Which basically means as long as there are non-taproot transactions added to the mempool, it will just continue to create valid blocks. As can be seen and verified on testnet.

Hi 100knot2dae and rest,

would you mind sharing a brief step-by-step how-to for getting the patched cgminer version to run on with an own full-node which is running bitcoin core v23.0.0. I have a full-node running in a data center with superior superfast internet connection and would like to use it for solo-mining with a GekkoScience Compac F. Unfortunately Kanos' latest version 4.12 does prohibit the use for mining on an own full node running latest bitcoin core 23.0.0 version. How to mitigate this? Thanks to all
member
Activity: 152
Merit: 25
Solo mining FTW  Cool

Let's band together and make an effort to code something that could work

This is what bitcoin is all about. This is how it started!
legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
There's a chance if you use slow internet, run it through tor, add a vpn on top of that, run your bitcoin through tor and a vpn, then connect to a pool node on the other side of the planet, and restrict your node to hope someone else will send you blocks and get your block you find out to the rest of the world.

The point is you want to make sure you don't make your chances WAY worse by doing such things.

The chance of a miner finding a block is a simple to calculate fixed number - that changes every ~2 weeks - and that chance of course is just a statistic, even a small miner can find a block ... as you know well.

However, reducing the chances of winning that block dramatically by doing such things as I mentioned above is just silly.

If you are lucky enough to have your miner find a block, but then throw it away coz your network setup is no where near as good as the major pools, that would be a really bad thing to do.

If your miner is spending a % of it's time working on stale blocks and also taking a long time to send that one share you might find that is a block to bitcoin, then bitcoin spends a long time processing that block and a long time getting that block out to the network, then you are just possibly throwing away hundreds of thousands of dollars. Yeah a certain other solo pool owner may be able to afford to do that, but do you want to?

The point is that is all unnecessary, you don't need to take those risks and damage your chances of winning a block.
full member
Activity: 633
Merit: 159
But there's a chance!!  Wink

legendary
Activity: 3822
Merit: 2703
Evil beware: We have waffles!
As Kano said, even the big pools lose orphan races. If your connection to the network is even just 2x slower than theirs one has just increased the odds against getting a block before someone else does.

Yes there is a *chance* that if against already incredible odds one *does* find a block when solo mining to their own node, personally I'd be heartbroken to soon after see that another miner with better connections to the BTC network beat me in the race for my block to be the one that is 1st to be confirmed & built upon...
Pages:
Jump to: