Pool 0 JSON failed to decode GBT
I’m assuming there are some additional rpc settings for the .conf file which I need to specify as of 0.20.0, but I don’t know which. I downgraded to 0.19.1 and it’s working fine. Any help would be appreciated.
`
-
Relaxo143 commented at 9:26 pm on June 5, 2020: noneAfter upgrading to 0.20.0 cgminer throws the following error:
-
maflcko commented at 0:05 am on June 6, 2020: memberCould be related to e42c959c1dccf91d1e4bb20a502a3e4590ad279b
-
jnewbery commented at 2:39 pm on July 27, 2020: contributorThere’s a message in bitcoin talk that this is due to the coinbaseaux flags field being removed: https://bitcointalk.org/index.php?topic=5253096.msg54839526#msg54839526
-
jnewbery commented at 2:49 pm on July 27, 2020: contributor
I’m not very familiar with ckpool but it looks like that’s the problem: https://bitbucket.org/ckolivas/ckpool/src/b8f66852483542326de8c5705a3e36242347ad12/src/bitcoin.c#lines-147
If I’m right, that’s a bug in ckpool. It shouldn’t be failing on absence of the coinbaseaux flag, since that’s not a required field in the gbt response: https://github.com/bitcoin/bips/blob/master/bip-0022.mediawiki#block-template-request. @jameshilliard does that look right to you?
-
Beeskee commented at 7:57 am on October 30, 2020: noneThis happens with solo mining too. Also happens on 20.1
-
asbourlotos commented at 10:35 pm on December 29, 2020: noneI’m new to solo mining but I’m noticing the same after full node sync and cgminer config. Anyone find a workaround to the GBT decode issue?
-
luke-jr commented at 10:38 pm on December 29, 2020: memberIf you need a workaround, you should be able to use BFGMiner as a stratum proxy for cgminer.
-
Relaxo143 commented at 0:14 am on December 30, 2020: none
If you need a workaround, you should be able to use BFGMiner as a stratum proxy for cgminer.
Could you provide more detailed instructions?
-
luke-jr commented at 0:35 am on December 30, 2020: member
bfgminer --stratum-port 3334
To validate your setup on testnet, also pass
-o 'localhost:18332/#getcbaddr' -O rpcuser:rpcpass
-
sipa commented at 0:37 am on December 30, 2020: memberAny reason we can’t just include
"coinbaseaux" : {"flags" : ""}
in our GBT response? -
sipa commented at 0:53 am on December 30, 2020: memberIf it’s unmaintained then I withdraw my suggestion.
-
Relaxo143 commented at 1:37 am on December 30, 2020: noneWe definitely need a maintained alternative for desktop miners. Even if usb asics do not make any profit, it’s still a good learning experience and people use them.
-
Relaxo143 commented at 1:39 am on December 30, 2020: none
bfgminer --stratum-port 3334
To validate your setup on testnet, also pass
-o 'localhost:18332/#getcbaddr' -O rpcuser:rpcpass
Ok that’s for bfg. What do I do with cgminer after that?
-
luke-jr commented at 1:47 am on December 30, 2020: member
Point it at localhost:3334
(But if it’s a USB stick miner, you can probably just use BFGMiner by itself…)
-
jameshilliard commented at 2:59 am on December 30, 2020: contributor
@jameshilliard does that look right to you?
Yeah, looks right.
We definitely need a maintained alternative for desktop miners.
Last I checked Con Kolivas seemed open to transferring the cgminer project if a suitable organization was interested in maintaining cgminer.
-
asbourlotos commented at 9:48 pm on December 30, 2020: noneI just dropped BTC core 0.19 (latest before 0.20) on top of the new files to revert installation and keep block info and now it’s working. Solo mining on valid address :) with cgminer and no stratum port. Not that I’ll ever solve a block but maybe I’ll start learning the space and make/update a miner?
-
Beeskee commented at 7:04 am on January 18, 2021: noneI’ve tried using bfgminer but it reports the pool is down or invalid, using the same server settings that I use for cgminer. I’ll keep checking into this, I was using cgminer since it was updated for my device. If anyone has any suggestions, I’d appreciate them.
-
luke-jr commented at 3:10 pm on January 18, 2021: memberDid you include
#getcbaddr
in the URI? -
Beeskee commented at 3:17 pm on January 18, 2021: none
Yes, I tried it both with and without.
bfgminer -o ‘http://127.0.0.1:8332/#getcbaddr’ -u User -p Password –generate-to 394zcJWJfDwQPYxJ18u5fWaJkVwx76D8KP –stratum-port 3334
-
luke-jr commented at 3:23 pm on January 18, 2021: member
Add
-T -D -P
to see protocol dumps, might give a clue as to what’s going onIs the node synced?
-
Beeskee commented at 3:33 pm on January 18, 2021: none
Yes the node is synced.
I see multiple errors in that log:
[2021-01-18 08:30:22] Stratum connect failed with TLS to pool 0: gnutls_handshake() failed: An unexpected TLS packet was received.
[2021-01-18 08:30:22] JSON decode failed(1): ‘[’ or ‘{’ expected near ‘HTTP’
[2021-01-18 08:30:22] Pool 0: gnutls_handshake() failed: An unexpected TLS packet was received.
[2021-01-18 08:30:22] Pool 0: RECV: HTTP/1.1 400 Bad Request [2021-01-18 08:30:22] JSON decode failed(1): ‘[’ or ‘{’ expected near ‘HTTP’
[2021-01-18 08:30:22] FAILED to retrieve work from pool 0 http://127.0.0.1:8332/#getcbaddr [2021-01-18 08:30:22] Pool 0 slow/down or URL or credentials invalid [2021-01-18 08:30:22] No servers were found that could be used to get work from.
-
asbourlotos commented at 4:11 pm on January 18, 2021: none@Beeskee Im not sure if this would have helped bfgminer but try downgrading your Bitcoin core to v0.19.1 and configuring cgminer again. I’ve been solo mining on 8 newpac miners @500MHz (907.5GH/s avg) for a couple weeks now with only one reboot for core disconnect. Two more incoming :) I know odds are crap but I told myself to build a 1TH unit and leave it for the lotto! Good luck!
-
Beeskee commented at 4:13 pm on January 18, 2021: noneYes, I downgraded Bitcoin in the meantime to continue using cgminer directly, but I don’t like the idea of being stuck on a prior version with no way to upgrade.
-
asbourlotos commented at 4:15 pm on January 18, 2021: noneGotcha. I thought about this as well. If you do get bfgminer working on newest core ver. Reach out to me. I might want to follow along.
-
luke-jr commented at 4:18 pm on January 18, 2021: member
bitcoin-cli getblocktemplate '{"rules":["segwit"]}'
-
Zwilla commented at 7:50 am on January 19, 2021: none
after starting ckpool, on fresh install of bitcoind and ready synced with txindex=1 I got this lines on bitcoind, and ckpool tries and tries this :
[2021-01-19 08:47:53.442] CRITICAL: No bitcoinds active! [2021-01-19 08:47:55.446] JSON failed to decode GBT 0000000000000000000048840346957d513da4037b325689baa97f5acecabd90 0000000000000000000da8a10000000000000000000000000000000000000000 536870912 1611042475 170da8a1 (null) with errno 11: Resource temporarily unavailable [2021-01-19 08:47:58.711] JSON failed to decode GBT 0000000000000000000048840346957d513da4037b325689baa97f5acecabd90 0000000000000000000da8a10000000000000000000000000000000000000000 536870912 1611042478 170da8a1 (null) with errno 11: Resource temporarily unavailable [2021-01-19 08:47:58.716] CRITICAL: No bitcoinds active! [2021-01-19 08:48:00.523] JSON failed to decode GBT 0000000000000000000048840346957d513da4037b325689baa97f5acecabd90 0000000000000000000da8a10000000000000000000000000000000000000000 536870912 1611042480 170da8a1 (null) with errno 11: Resource temporarily unavailable [2021-01-19 08:48:04.022] JSON failed to decode GBT 0000000000000000000048840346957d513da4037b325689baa97f5acecabd90 0000000000000000000da8a10000000000000000000000000000000000000000 536870912 1611042483 170da8a1 (null) with errno 11: Resource temporarily unavailable [2021-01-19 08:48:04.026] CRITICAL: No bitcoinds active!
BITCOIND
2021-01-19T07:43:40Z CreateNewBlock(): block weight: 3992781 txs: 3647 fees: 107078831 sigops 21180 2021-01-19T07:43:46Z CreateNewBlock(): block weight: 3992635 txs: 3647 fees: 107107389 sigops 21165 2021-01-19T07:43:52Z CreateNewBlock(): block weight: 3992582 txs: 3634 fees: 107157062 sigops 21149 2021-01-19T07:43:58Z CreateNewBlock(): block weight: 3992810 txs: 3635 fees: 107215306 sigops 21139 2021-01-19T07:44:05Z CreateNewBlock(): block weight: 3992685 txs: 3641 fees: 107256027 sigops 21091 2021-01-19T07:44:14Z CreateNewBlock(): block weight: 3992486 txs: 3650 fees: 107379829 sigops 20965 2021-01-19T07:44:19Z CreateNewBlock(): block weight: 3992559 txs: 3651 fees: 107393032 sigops 20973 2021-01-19T07:44:25Z CreateNewBlock(): block weight: 3992485 txs: 3648 fees: 107537358 sigops 20948 2021-01-19T07:44:35Z CreateNewBlock(): block weight: 3992815 txs: 3646 fees: 107587114 sigops 20957 2021-01-19T07:44:45Z CreateNewBlock(): block weight: 3992548 txs: 3634 fees: 107653973 sigops 20996 2021-01-19T07:44:51Z CreateNewBlock(): block weight: 3992658 txs: 3631 fees: 107734503 sigops 21002 2021-01-19T07:45:00Z CreateNewBlock(): block weight: 3992667 txs: 3633 fees: 107768766 sigops 20999 2021-01-19T07:45:07Z CreateNewBlock(): block weight: 3992750 txs: 3636 fees: 107792206 sigops 20988
-
mshalabi1990 commented at 8:09 am on January 19, 2021: noneDid your lotto work
-
asbourlotos commented at 3:17 pm on January 19, 2021: none@mshalabi1990 I haven’t found a block yet (though I wouldn’t tell anyone if I did ;) ) but my highest share has been 537m. That’s a long way from 20.6t.
-
Joz3d commented at 8:28 am on February 27, 2021: noneSucks. I also solo mine with newpacs and cg. Finally was upgrading node from 19.1 to 21.0 tonight and wasted last 2h troubleshooting this. Downgrading…
-
Joz3d commented at 5:56 am on February 28, 2021: none@luke-jr Downgraded to previous version bitcoind as the quickest solution to get up and running again. You’re right, the miner needs to be upgraded but getting author to update that/forking if need-be is an unexpected effort. Oh well, will work on it.
-
shinjukumiku commented at 0:22 am on January 17, 2022: none
@Zwilla Check attached patch.
0From 915d0c399a450a1af024acfc9e8e4f86e20eaa94 Mon Sep 17 00:00:00 2001 1From: Miku <miku@example.com> 2Date: Sun, 16 Jan 2022 08:14:10 +0000 3Subject: [PATCH] Fix handling GBT with no flags in coinbaseaux 4 5bitcoind >=0.20.0's GBT reply no longer includes a flags string 6in the coinbaseaux object. It was an empty string in 0.19.1. 7 80.19.1: "coinbaseaux":{"flags":""} 922.0 : "coinbaseaux":{} 10 11If flags is not in coinbaseaux of the GBT response, we 12allocate an empty string for flags to prevent segfault. 13flags needs to be dynamically allocated because it will be freed. 14 15A more robust future fix is to remove dependence on the coinbaseaux 16object in the GBT response as it isn't required per BIP 0022. 17 18Fix has been verified to find several testnet blocks with bitcoind 22.0, 19the latest version as of writing. 20--- 21 src/bitcoin.c | 9 ++++++++- 22 1 file changed, 8 insertions(+), 1 deletion(-) 23 24diff --git a/src/bitcoin.c b/src/bitcoin.c 25index b114fd06..88ed1bb1 100644 26--- a/src/bitcoin.c 27+++ b/src/bitcoin.c 28@@ -147,7 +147,14 @@ bool gen_gbtbase(connsock_t *cs, gbtbase_t *gbt) 29 coinbase_aux = json_object_get(res_val, "coinbaseaux"); 30 flags = json_string_value(json_object_get(coinbase_aux, "flags")); 31 32- if (unlikely(!previousblockhash || !target || !version || !curtime || !bits || !coinbase_aux || !flags)) { 33+ /* bitcoind >= 0.20.0 GBT respose coinbaseaux has no flags */ 34+ /* 2022-01-16 [#19182](/bitcoin-bitcoin/19182/) */ 35+ if(!flags) { 36+ /* LOGDEBUG("No flags in coinbaseaux of GBT JSON"); */ 37+ flags = calloc(1, 1); 38+ } 39+ 40+ if (unlikely(!previousblockhash || !target || !version || !curtime || !bits || !coinbase_aux)) { 41 LOGERR("JSON failed to decode GBT %s %s %d %d %s %s", previousblockhash, target, version, curtime, bits, flags); 42 goto out; 43 } 44-- 452.20.1
-
cmmodtools commented at 11:49 am on June 16, 2022: none
This issue is resolved in https://github.com/cmmodtools/cgminer
Specifically in commit https://github.com/cmmodtools/cgminer/commit/b9e0f8621f535f7d4d53f109b4a8a3ce7890e5a8
-
maflcko added the label Upstream on Jun 16, 2022
-
maflcko added the label Mining on Jun 16, 2022
-
maflcko commented at 12:14 pm on June 16, 2022: member
Can this be closed, given that this is an upstream issue?
Let me know if it should be reopened.
-
maflcko closed this on Jun 16, 2022
-
bitcoin locked this on Feb 28, 2024
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-21 15:12 UTC
More mirrored repositories can be found on mirror.b10c.me