tom22022 (OP)
Jr. Member
Offline
Activity: 33
Merit: 8
|
|
March 26, 2021, 07:06:57 PM |
|
Trying to be my own bitcoin mining pool for fun and lotto. I realize the odds and the need for asics. I have installed bitcoind to ubuntu linux server and sync'd the block chain current. I then proceeded to create a wallet and an address. Tried to mine with cgminer from another computer on the same lan but received the following error- root@server1:/usr/src/cgminer# ./cgminer -o stratum+tcp://192.168.0.179:8332 -u tom -p secret --btc-address 1E1pz9GoUVEvEEoLHm4VDXEph13yZBbXGX [1970-01-03 18:55:33.904] Started cgminer 4.11.1 [1970-01-03 18:55:33.904] Probing for an alive pool [1970-01-03 18:56:33.914] No servers were found that could be used to get work from. [1970-01-03 18:56:33.914] Please check the details from the list below of the servers you have input [1970-01-03 18:56:33.914] Most likely you have input the wrong URL, forgotten to add a port, or have not set up workers [1970-01-03 18:56:33.914] Pool: 0 URL: stratum+tcp://192.168.0.179:8332 User: tom Password: secret [1970-01-03 18:56:33.914] No servers could be used! Exiting.
192.168.0.179 is the ip of the bitcoind server. I start bitcoind with this ./bin/bitcoind -daemon Here is what my bitcoin.conf looks like, I have verified it is being read with the debug.log file. server=1 rpcuser=tom rpcpassword=secret rpcallowip=192.168.0.0/24 rpcport=8332
I started googling and there was very little information to be found other than the following- 1.) In the recent past, this kind of support was removed from bitcoind 2.) People made it work by installing bfgminer on the same server as bitcoind to act as a proxy. I tried #2. ./bfgminer --stratum-port=3333
Pool setup failed
Added a little more ./bfgminer -o stratum+tcp://127.0.0.1:8332 --stratum-port=3333 -u tom -p secret
[2021-03-26 18:59:07] Most likely you have input the wrong URL, forgotten to ad d a port, or have not set up workers [2021-03-26 18:59:07] Pool: 0 URL: stratum+tcp://127.0.0.1:8332 User: tom Password: secret [2021-03-26 18:59:07] Press any key to exit, or BFGMiner will try again in 15s.
[2021-03-26 18:59:23] No servers were found that could be used to get work from . [2021-03-26 18:59:23] Please check the details from the list below of the serve rs you have input
Can anyone help me out to fix this? Or maybe I am asking the wrong question and the right question is how to setup my own mining pool? Or maybe there is a better blockchain software other than bitcoind? My goal would be to host my own wallet and blockchain without relying on a third party. How do mining pools do it? I know someone here knows how to do this! Thanks
|
|
|
|
|
achow101
Moderator
Legendary
Offline
Activity: 3542
Merit: 6886
Just writing some code
|
|
March 26, 2021, 10:25:34 PM |
|
bitcoind is not a stratum server, so the stratum protocol will not work with it. The only mining protocol that bitcoind supports is getblocktemplate. If you change the url from stratum+tcp to http, your mining software should automatically try getblocktemplate and that should work.
|
|
|
|
tom22022 (OP)
Jr. Member
Offline
Activity: 33
Merit: 8
|
|
March 27, 2021, 12:40:43 AM |
|
bitcoind is not a stratum server, so the stratum protocol will not work with it. The only mining protocol that bitcoind supports is getblocktemplate. If you change the url from stratum+tcp to http, your mining software should automatically try getblocktemplate and that should work.
hmm didn't seem to work. On the bitcoind server I changed ./bfgminer -o stratum+tcp://127.0.0.1:8332 --stratum-port=3333 -u tom -p secret -to- ./bfgminer -o http://127.0.0.1:8332 --stratum-port=3333 -u tom -p secret but received a similar error. For cgminer, similar error as well. ./cgminer -o stratum+tcp://192.168.0.179:3333 -u tom -p secret --btc-address 1E1pz9GoUVEvEEoLHm4VDXEph13yZBbXGX and directly ./cgminer -o http://192.168.0.179:8332 -u tom -p secret --btc-address 1E1pz9GoUVEvEEoLHm4VDXEph13yZBbXGX Maybe its a version of bitcoind that is older than 0.21.0 that this works?
|
|
|
|
achow101
Moderator
Legendary
Offline
Activity: 3542
Merit: 6886
Just writing some code
|
|
March 27, 2021, 12:48:37 AM |
|
Don't specify --stratum-port. Do not specify that the mining software should be using the stratum protocol. If anything, try to see if you can specify that it should use getblocktemplate (frequently shortened as gbt).
The version of bitcoind doesn't really matter. Bitcoind never supported stratum so stop trying to use stratum with it.
|
|
|
|
tom22022 (OP)
Jr. Member
Offline
Activity: 33
Merit: 8
|
|
March 27, 2021, 01:21:45 AM |
|
Don't specify --stratum-port. Do not specify that the mining software should be using the stratum protocol. If anything, try to see if you can specify that it should use getblocktemplate (frequently shortened as gbt).
The version of bitcoind doesn't really matter. Bitcoind never supported stratum so stop trying to use stratum with it.
On the bitcoind server, I ran it again without the --stratum-port slightly different error [2021-03-27 01:17:09] Pool 0 slow/down or URL or credentials invalid [2021-03-27 01:17:09] No servers were found that could be used to get work from . [2021-03-27 01:17:09] Please check the details from the list below of the serve rs you have input [2021-03-27 01:17:09] Most likely you have input the wrong URL, forgotten to ad d a port, or have not set up workers [2021-03-27 01:17:09] Pool: 0 URL: http://127.0.0.1:8332 User: tom Pass word: secret [2021-03-27 01:17:09] Press any key to exit, or BFGMiner will try again in 15s I am not sure how to specify gbt but ran across this on luke-jr github site- SOLO MINING
BFGMiner supports solo mining with any GBT-compatible bitcoin node (such as bitcoind). To use this mode, you need to specify the URL of your bitcoind node using the usual pool options (--url, --userpass, etc), and the --generate-to option to specify the Bitcoin address you wish to receive the block rewards mined. When you run Bitcoin Core on the same computer as your miner, the pool itself will be automatically configured for you (on the default goal). Please be aware that solo mining via GBT is at this time only supported for Bitcoin.
IMPORTANT: If you are solo mining with more than one instance of BFGMiner (or any other software) per payout address, you must also specify data using the --coinbase-sig option to ensure each miner is working on unique work. Note that this data will be publicly seen if your miner finds a block using any GBT-enabled pool, even when not solo mining (such as failover).
If your bitcoin node does not support longpolling (for example, bitcoind 0.8.x), you should consider setting up a failover pool to provide you with block notifications. Note that solo mining does not use shares, so BFGMiner's adjusted hashrate (third column) may suddenly drop to zero if a block you submit is rejected; this does not indicate that it has stopped mining.
Example solo mining usage:
bfgminer -o http://localhost:8332 -u username -p password \ --generate-to 1QATWksNFGeUJCWBrN4g6hGM178Lovm7Wh \ --coinbase-sig "rig1: This is Joe's block!"
If you want to solo mine on multiple GBT-compatible Bitcoin blockchains, you can specify --generate-to multiple times with a goal name prefix followed by a colon. Note that at this time, the coinbase sig is always shared across all goals/pools.
Example multi-blockchain solo mining usage:
bfgminer -o http://localhost:8332 -u username -p password \ --generate-to 1QATWksNFGeUJCWBrN4g6hGM178Lovm7Wh \ -o http://localhost:7221 -u user2 -p password --pool-goal mychain \ --generate-to mychain:1QATWksNFGeUJCWBrN4g6hGM178Lovm7Wh \ --coinbase-sig "rig1: This is Joe's block!"
I tried the --generate-to switch but still get the same errors regarding can't find the pool.
|
|
|
|
achow101
Moderator
Legendary
Offline
Activity: 3542
Merit: 6886
Just writing some code
|
|
March 27, 2021, 01:41:25 AM |
|
Is bitcoind synced?
|
|
|
|
tom22022 (OP)
Jr. Member
Offline
Activity: 33
Merit: 8
|
|
March 27, 2021, 06:47:53 PM |
|
Is bitcoind synced?
I guess it is not fully synced yet. I looked at debug.log at it is only about 3/4 of the way through at block 492500. Do you think it will work when fully synced? I tried this with a fully synced bitcoin-qt last week and it did not work.
|
|
|
|
achow101
Moderator
Legendary
Offline
Activity: 3542
Merit: 6886
Just writing some code
|
|
March 27, 2021, 08:04:34 PM |
|
I guess it is not fully synced yet. I looked at debug.log at it is only about 3/4 of the way through at block 492500. Do you think it will work when fully synced? I tried this with a fully synced bitcoin-qt last week and it did not work.
bitcoind must be synced for getblocktemplate to become available.
|
|
|
|
tom22022 (OP)
Jr. Member
Offline
Activity: 33
Merit: 8
|
|
March 27, 2021, 08:51:14 PM |
|
I guess it is not fully synced yet. I looked at debug.log at it is only about 3/4 of the way through at block 492500. Do you think it will work when fully synced? I tried this with a fully synced bitcoin-qt last week and it did not work.
bitcoind must be synced for getblocktemplate to become available. Is bitcoind the same as bitcoin-qt? And is getblocktemplate accessed through http:// instead of stratum+tcp:// Thank you.
|
|
|
|
achow101
Moderator
Legendary
Offline
Activity: 3542
Merit: 6886
Just writing some code
|
|
March 27, 2021, 10:27:46 PM |
|
Is bitcoind the same as bitcoin-qt?
Yes. They use the same code, just that bitcoin-qt has additional code to show a GUI. And is getblocktemplate accessed through http:// instead of stratum+tcp://
Yes. getblocktemplate uses JSON-RPC over http. Stratum is a custom protocol. bitcoind does not implement stratum.
|
|
|
|
tom22022 (OP)
Jr. Member
Offline
Activity: 33
Merit: 8
|
|
March 27, 2021, 11:16:27 PM |
|
Is bitcoind the same as bitcoin-qt?
Yes. They use the same code, just that bitcoin-qt has additional code to show a GUI. And is getblocktemplate accessed through http:// instead of stratum+tcp://
Yes. getblocktemplate uses JSON-RPC over http. Stratum is a custom protocol. bitcoind does not implement stratum. When I try this against my bitcoin-qt install on windows which is fully sync'd, I get an error message No Stratum, GBT or Solo support in pool 0 http://192.168.0.198:8332 unable to use I'm not sure what's missing.
|
|
|
|
achow101
Moderator
Legendary
Offline
Activity: 3542
Merit: 6886
Just writing some code
|
|
March 28, 2021, 12:58:59 AM |
|
When I try this against my bitcoin-qt install on windows which is fully sync'd, I get an error message No Stratum, GBT or Solo support in pool 0 http://192.168.0.198:8332 unable to use I'm not sure what's missing. bitcoin-qt does not start the rpc server by default. You can enable that by adding server=1 to your bitcoin.conf.
|
|
|
|
tom22022 (OP)
Jr. Member
Offline
Activity: 33
Merit: 8
|
|
March 28, 2021, 01:33:13 PM |
|
When I try this against my bitcoin-qt install on windows which is fully sync'd, I get an error message No Stratum, GBT or Solo support in pool 0 http://192.168.0.198:8332 unable to use I'm not sure what's missing. bitcoin-qt does not start the rpc server by default. You can enable that by adding server=1 to your bitcoin.conf. It's in there, here's my conf on the windows server. server=1 listen=1 daemon=1 rpcuser=tom rpcpassword=secret rpcallowip=192.168.0.0/24 rpcport=8332
|
|
|
|
tom22022 (OP)
Jr. Member
Offline
Activity: 33
Merit: 8
|
|
March 28, 2021, 02:37:57 PM |
|
I think I made some progress here but still error messages. I was looking at the bitcoin-qt windows server debug.log and ran into the following entry- WARNING: option -rpcallowip was specified without -rpcbind; this doesn't usually make sense So I googled and ran across an alternate bitcoin.conf with the addition of rpcbind which I tried. server=1 listen=1 daemon=1 rpcuser=tom11011 rpcpassword=openup11 rpcbind=127.0.0.1 rpcbind=192.168.0.198 rpcallowip=127.0.0.1 rpcallowip=192.168.0.0/24 rpcport=8332
From a remote linux computer I ran the following against my windows bitcoin-qt computer. ./cgminer -o http://192.168.0.198:8332 -u tom -p secret --btc-address XXXXX I am definitely seeing something new now. [1970-01-05 14:36:37.723] Started cgminer 4.11.1 [1970-01-05 14:36:37.723] Probing for an alive pool [1970-01-05 14:36:39.523] Pool 0 JSON failed to decode GBT [1970-01-05 14:36:39.523] Block change for http://192.168.0.198:8332 detection via getblockcount polling [1970-01-05 14:36:39.531] Block height change to 676707 detected on pool 0 [1970-01-05 14:36:40.328] Pool 0 JSON failed to decode GBT [1970-01-05 14:36:40.335] Block height change to 676707 detected on pool 0 [1970-01-05 14:36:41.059] Pool 0 JSON failed to decode GBT [1970-01-05 14:36:41.067] Block height change to 676707 detected on pool 0 [1970-01-05 14:36:42.042] Pool 0 JSON failed to decode GBT [1970-01-05 14:36:42.049] Block height change to 676707 detected on pool 0 [1970-01-05 14:36:42.755] Pool 0 JSON failed to decode GBT [1970-01-05 14:36:42.762] Block height change to 676707 detected on pool 0 [1970-01-05 14:36:43.451] Pool 0 JSON failed to decode GBT [1970-01-05 14:36:43.459] Block height change to 676707 detected on pool 0 [1970-01-05 14:36:44.179] Pool 0 JSON failed to decode GBT [1970-01-05 14:36:44.186] Block height change to 676707 detected on pool 0 [1970-01-05 14:36:45.013] Pool 0 JSON failed to decode GBT [1970-01-05 14:36:45.052] Block height change to 676707 detected on pool 0 [1970-01-05 14:36:45.554] Pool 0 JSON failed to decode GBT [1970-01-05 14:36:45.905] Pool 0 JSON failed to decode GBT [1970-01-05 14:36:45.912] Block height change to 676707 detected on pool 0 [1970-01-05 14:36:46.636] Pool 0 JSON failed to decode GBT [1970-01-05 14:36:46.652] Block height change to 676707 detected on pool 0 [1970-01-05 14:36:47.370] Pool 0 JSON failed to decode GBT [1970-01-05 14:36:47.378] Block height change to 676707 detected on pool 0 ^C [1970-01-05 14:36:47.627] Shutdown signal received.
[1970-01-05 14:35:43.185] Started at [1970-01-05 14:35:43.185] Pool: http://192.168.0.198:8332 [1970-01-05 14:35:43.185] Runtime: 110 hrs : 35 mins : 43 secs [1970-01-05 14:35:43.186] Average hashrate: 0.0 Mhash/s [1970-01-05 14:35:43.186] Solved blocks: 0 [1970-01-05 14:35:43.186] Best share difficulty: 0 [1970-01-05 14:35:43.186] Share submissions: 0 [1970-01-05 14:35:43.186] Accepted shares: 0 [1970-01-05 14:35:43.186] Rejected shares: 0 [1970-01-05 14:35:43.186] Accepted difficulty shares: 0 [1970-01-05 14:35:43.186] Rejected difficulty shares: 0 [1970-01-05 14:35:43.186] Hardware errors: 0 [1970-01-05 14:35:43.186] Utility (accepted shares / min): 0.00/min [1970-01-05 14:35:43.186] Work Utility (diff1 shares solved / min): 0.00/min
[1970-01-05 14:35:43.186] Stale submissions discarded due to new blocks: 0 [1970-01-05 14:35:43.186] Unable to get work from server occasions: 0 [1970-01-05 14:35:43.186] Work items generated locally: 0 [1970-01-05 14:35:43.186] Submitting work remotely delay occasions: 0 [1970-01-05 14:35:43.186] New blocks detected on network: 0
[1970-01-05 14:35:43.186] Summary of per device statistics:
[1970-01-05 14:35:43.186]
not sure why the time date shows weird root@server1:/usr/src/cgminer# date Sun 28 Mar 2021 02:33:32 PM UTC
|
|
|
|
ranochigo
Legendary
Offline
Activity: 3038
Merit: 4420
Crypto Swap Exchange
|
|
March 28, 2021, 02:50:52 PM |
|
Just a little insight: I was interested in using my spare unused 2Pacs for some solomining. It was working with 0.19.1 but it broke after updating to 0.20.0 and I was looking at the code and figured out that this pull request was causing the problem[1]. If you want to mine with 0.21.0/0.20.X instead, then you'll probably have to either modify your mining client somehow to ignore that missing part in the scriptsig and compile it. SoloMining with 0.19.1 is perfectly fine, if you don't want to complicate things. [1] https://github.com/bitcoin/bitcoin/pull/17519
|
|
|
|
tom22022 (OP)
Jr. Member
Offline
Activity: 33
Merit: 8
|
|
March 28, 2021, 03:23:33 PM |
|
Just a little insight: I was interested in using my spare unused 2Pacs for some solomining. It was working with 0.19.1 but it broke after updating to 0.20.0 and I was looking at the code and figured out that this pull request was causing the problem[1]. If you want to mine with 0.21.0/0.20.X instead, then you'll probably have to either modify your mining client somehow to ignore that missing part in the scriptsig and compile it. SoloMining with 0.19.1 is perfectly fine, if you don't want to complicate things. [1] https://github.com/bitcoin/bitcoin/pull/17519Thanks for the information. I read through that link but cannot figure out if this is a bug or intentional? Do you know if 0.19.1 can be successfully dropped into an existing .bitcoin profile as to not have to download the whole blockchain again?
|
|
|
|
ranochigo
Legendary
Offline
Activity: 3038
Merit: 4420
Crypto Swap Exchange
|
|
March 28, 2021, 04:13:06 PM |
|
Thanks for the information. I read through that link but cannot figure out if this is a bug or intentional?
Intentional, the mining client should modify their client to remove the flags as it isn't in use anyways. I think neither BFGminer nor CGminers are in active development anymore? Do you know if 0.19.1 can be successfully dropped into an existing .bitcoin profile as to not have to download the whole blockchain again?
There isn't any (only the peers.dat will be discarded, if I'm not wrong) compatibility issues, if that is what you mean.
|
|
|
|
tom22022 (OP)
Jr. Member
Offline
Activity: 33
Merit: 8
|
|
March 28, 2021, 05:47:48 PM |
|
Thanks for the information. I read through that link but cannot figure out if this is a bug or intentional?
Intentional, the mining client should modify their client to remove the flags as it isn't in use anyways. I think neither BFGminer nor CGminers are in active development anymore? Do you know if 0.19.1 can be successfully dropped into an existing .bitcoin profile as to not have to download the whole blockchain again?
There isn't any (only the peers.dat will be discarded, if I'm not wrong) compatibility issues, if that is what you mean. Thanks. My linux bitcoind server is almost done syncing, will look into 0.19.1 when it finishes. My question though would be how do mining pools do this?
|
|
|
|
ranochigo
Legendary
Offline
Activity: 3038
Merit: 4420
Crypto Swap Exchange
|
|
March 28, 2021, 11:28:23 PM |
|
Thanks. My linux bitcoind server is almost done syncing, will look into 0.19.1 when it finishes. My question though would be how do mining pools do this?
Most of them probably don't rely completely on Bitcoin Core and builds the block using their own implementation. Most mining pool don't use GBT but stratum instead. Unless you're able to see how the pool functions, you probably won't know if the problem exists for them and what their remedy is. Since the error exists due to the fact that they expect the coinbase flags, they can just add it at the end before feeding it to the miners.
|
|
|
|
|