Pages:
Author

Topic: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux - page 17. (Read 124144 times)

member
Activity: 96
Merit: 10
Hello everyone.  I have read through this forum, and only have one question that I cannot seem to find the answer.  Does the ckpool code auto-pay the block finder from the address in the ckpool.conf, or is it a manual pay until "I" modify code to auto pay from that hard-coded address to the block finders address ?
There is no payout management at all in the code. ckdb includes calculations for PPLNS payouts but does not perform the payouts or manage the wallet itself.

Ok, thanks!

I have access to the wallet, so I will just manual pay, until I create a script to handle it.

Also, I do have one other issue that I do not see everone else having.  When I built CKPool with the CKDB flag, I got an error from postgrql saying Incorrect version, and the database was not created, therefore, I have no database!  Any ideas ?

Thanks!

member
Activity: 96
Merit: 10
Hello everyone.  I have read through this forum, and only have one question that I cannot seem to find the answer.  Does the ckpool code auto-pay the block finder from the address in the ckpool.conf, or is it a manual pay until "I" modify code to auto pay from that hard-coded address to the block finders address ?
There is no payout management at all in the code. ckdb includes calculations for PPLNS payouts but does not perform the payouts or manage the wallet itself.

Ok, thanks!

I have access to the wallet, so I will just manual pay, until I create a script to handle it.

-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Hello everyone.  I have read through this forum, and only have one question that I cannot seem to find the answer.  Does the ckpool code auto-pay the block finder from the address in the ckpool.conf, or is it a manual pay until "I" modify code to auto pay from that hard-coded address to the block finders address ?
There is no payout management at all in the code. ckdb includes calculations for PPLNS payouts but does not perform the payouts or manage the wallet itself.
member
Activity: 96
Merit: 10
Hello everyone.  I have read through this forum, and only have one question that I cannot seem to find the answer.  Does the ckpool code auto-pay the block finder from the address in the ckpool.conf, or is it a manual pay until "I" modify code to auto pay from that hard-coded address to the block finders address ?

Thank you!
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Tagged milestone M15. Numerous bugfixes and performance improvements to ckpool and significant feature upgrades to ckdb, too many to describe in detail.
legendary
Activity: 1218
Merit: 1001
CK/Kano,

Obviously I love the software! I mine on Ck and solo as a backup.  I am going to finally have some time to try and set this up here at the house and wondered if the pool server has a front end or is that something that will need to be created?  It's just a tinkering thing on my part.  Last year I setup an Eliopool and MPOS but have since wiped them.

Nevermind, read through the thread again.  Definitely like  the concept of two parts.  I understand keeping the CK solo pool handling of payouts not part of this code, but it sure would be handy for those that have different miners using different wallet addresses.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
I observe that in function read_socket_line() in line ckpool.c:455 the recv() function returns 0 when 'validateaddress' is called after 'getblocktemplate' returned a very large response over the socket.

Following manpage, a return value of 0 for recv() has to be interpreted as 'peer has performed an orderly shutdown' which is not handled in read_socket_line(). Question remains why bitcoind is closing the socket, but at least this has to be handled accordingly by ckpool.

This was changed post M13. Grab the latest milestone.
donator
Activity: 919
Merit: 1000
With the latest builds of bitcoind

Anything obviously wrong? I'll debug and report back if not, just to be sure it is not some silly mistake at my side.
bitcoind rpc allow command changed

Ok, did some tracing to narrow down the issue. First off, it is not a bitcoind misconfiguration problem, since localhost always works (double checked using RPC interface over curl).

I observe that in function read_socket_line() in line ckpool.c:455 the recv() function returns 0 when 'validateaddress' is called after 'getblocktemplate' returned a very large response over the socket.

Following manpage, a return value of 0 for recv() has to be interpreted as 'peer has performed an orderly shutdown' which is not handled in read_socket_line(). Question remains why bitcoind is closing the socket, but at least this has to be handled accordingly by ckpool.

This is my debug log:
Code:
[2015-03-24 23:40:56] Opening /tmp/ckpool/generator
[2015-03-24 23:40:56] Unlinked /tmp/ckpool/generator to recreate socket
[2015-03-24 23:40:56] Opened server path /tmp/ckpool/generator successfully on socket 5
[2015-03-24 23:40:56] File /tmp/ckpool/generator.pid exists
[2015-03-24 23:40:56] Opening /tmp/ckpool/stratifier
[2015-03-24 23:40:56] Unlinked /tmp/ckpool/stratifier to recreate socket
[2015-03-24 23:40:56] Opened server path /tmp/ckpool/stratifier successfully on socket 7
[2015-03-24 23:40:56] File /tmp/ckpool/stratifier.pid exists
[2015-03-24 23:40:56] Opening /tmp/ckpool/connector
[2015-03-24 23:40:56] Unlinked /tmp/ckpool/connector to recreate socket
[2015-03-24 23:40:56] Opened server path /tmp/ckpool/connector successfully on socket 8
[2015-03-24 23:40:56] File /tmp/ckpool/connector.pid exists
[2015-03-24 23:40:56] ckpool stratifier starting
[2015-03-24 23:40:56] Opened client path /tmp/ckpool/listener successfully on socket 6
[2015-03-24 23:40:56] Listener received ping request
[2015-03-24 23:40:56] ckpool generator starting
[2015-03-24 23:40:56] Closing file handle 6
[2015-03-24 23:40:56] Attempting to connect to bitcoind
[2015-03-24 23:40:56] Listener received ping request
[2015-03-24 23:40:56] Opened client path /tmp/ckpool/listener successfully on socket 6
[2015-03-24 23:40:56] Closing file handle 6
[2015-03-24 23:40:56] Closing file handle 6
[2015-03-24 23:40:56] Opened client path /tmp/ckpool/generator successfully on socket 6
[2015-03-24 23:40:56] Closing file handle 6
[2015-03-24 23:40:56] ckpool connector starting
[2015-03-24 23:40:56] Succeeded delayed connect
[2015-03-24 23:40:56] json_rpc_call: REQ: {"method": "getblocktemplate", "params": [{"capabilities": ["coinbasetxn", "workid", "coinbase/append"]}]}

[2015-03-24 23:40:57] json_rpc_call: RESP: OK
[2015-03-24 23:40:57] Discarding:
[2015-03-24 23:40:57] MH0 dba90ae1e4c98ae65e07baa18c5735015a3850ea2db3771a71f193647966e278
[2015-03-24 23:40:57] MH1 928e668d417d547bbfc3237e727abdb5f81ff5a1d9a587afa7500697720f5917
[2015-03-24 23:40:57] MH2 23f8815bcb4b8275b0242b6cca6d844daa2e2398cbfb8c2fa721ac23197846ec
[2015-03-24 23:40:57] MH3 357c2632b29c0a71845aa3aed3c74f907a797095b1229957dbce378753c8db5c
[2015-03-24 23:40:57] MH4 d962fe3ba85ef5b919c90ceb9c5fb898e78f1f5df025ed280666dedd6c03f94f
[2015-03-24 23:40:57] MH5 0f3b07341144ef4290d0bbe8170fa45cc975a091a2816fa9fdb30367dd25634f
[2015-03-24 23:40:57] MH6 116582e86cae9fbf0df80bf929bce816743f05a9984389d8908eb2ca71e6f7f5
[2015-03-24 23:40:57] MH7 1a25a3929cdab41e9be026884027dec5835bbe4780f61810073d7fdacf8a9cf2
[2015-03-24 23:40:57] MH8 3175f8961f699a1f160497568cb86960d6d3ea30c346b777da9506b48cbdc0d9
[2015-03-24 23:40:57] MH9 5ea864a0f2a6752e545e05388ebd63664a592a770455340b0264905dd35635c2
[2015-03-24 23:40:57] Stored 540 transactions
[2015-03-24 23:40:57] json_rpc_call: REQ: {"method": "validateaddress", "params": ["14BMjogz69qe8hk9thyzbmR5pg34mVKB1e"]}

[2015-03-24 23:40:57] Failed to recv in read_socket_line: 0/0/Success
[2015-03-24 23:40:57] Closing file handle 6
[2015-03-24 23:40:57] Failed to read socket line in json_rpc_call
[2015-03-24 23:40:57] Reopening socket to 192.168.0.14:8332
[2015-03-24 23:40:57] Succeeded delayed connect
[2015-03-24 23:40:57] Failed to get valid json response to validate_address with errno 115: Operation now in progress
[2015-03-24 23:40:57] Invalid btcaddress: 14BMjogz69qe8hk9thyzbmR5pg34mVKB1e !
[2015-03-24 23:40:57] Closing file handle 6
[2015-03-24 23:40:57] CRITICAL: No bitcoinds active!

The modified error message gives ret/errno/strerror(errno), added with
Code:
diff --git a/src/ckpool.c b/src/ckpool.c
index 1ffe45f..4df333a 100644
--- a/src/ckpool.c
+++ b/src/ckpool.c
@@ -457,7 +457,7 @@ int read_socket_line(connsock_t *cs, const int timeout)
                        /* Closed socket after valid message */
                        if (eom)
                                break;
-                       LOGERR("Failed to recv in read_socket_line");
+                       LOGERR("Failed to recv in read_socket_line: %d/%d/%s", ret, errno, strerror(errno));
                        ret = -1;
                        goto out;
                }
@@ -678,6 +678,7 @@ json_t *json_rpc_call(connsock_t *cs, const char *rpc_req)
        json_t *val = NULL;
        int len, ret;
 
+       LOGDEBUG("json_rpc_call: REQ: %s", rpc_req);
        if (unlikely(cs->fd < 0)) {
                LOGWARNING("FD %d invalid in json_rpc_call", cs->fd);
                goto out;
@@ -738,6 +739,9 @@ json_t *json_rpc_call(connsock_t *cs, const char *rpc_req)
        val = json_loads(cs->buf, 0, &err_val);
        if (!val)
                LOGWARNING("JSON decode failed(%d): %s", err_val.line, err_val.text);
+       else
+               LOGDEBUG("json_rpc_call: RESP: OK");
+
 out_empty:
        empty_socket(cs->fd);
        empty_buffer(cs);

Will dig deeper tomorrow, just to leave here as probable bug report.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
I updated the version number to 0.8.7 and tagged M14 after a number of substantial updates and fixing a long standing crash bug that has been eluding me till now.
donator
Activity: 919
Merit: 1000
With the latest builds of bitcoind

Anything obviously wrong? I'll debug and report back if not, just to be sure it is not some silly mistake at my side.
bitcoind rpc allow command changed

Ouch, so a running bitcoin-cli on localhost does not necessarily mean bitcoind is configured properly for every client on localhost?

Thanks for the hint, will check later today.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
With the latest builds of bitcoind

Anything obviously wrong? I'll debug and report back if not, just to be sure it is not some silly mistake at my side.
bitcoind rpc allow command changed
donator
Activity: 919
Merit: 1000
With the latest builds of bitcoind and ckpool, I am stuck with the following problem:
Code:
[2015-03-23 09:34:58] ckpool generator starting
[2015-03-23 09:34:58] ckpool stratifier starting
[2015-03-23 09:34:58] ckpool connector starting
[2015-03-23 09:34:58] Failed to recv in read_socket_line
[2015-03-23 09:34:58] Failed to read socket line in json_rpc_call
[2015-03-23 09:34:58] Reopening socket to localhost:8332
[2015-03-23 09:34:58] Failed to get valid json response to validate_address with errno 115: Operation now in progress
[2015-03-23 09:34:58] Invalid btcaddress: 14BMjogz69qe8hk9thyzbmR5pg34mVKB1e !
[2015-03-23 09:34:58] CRITICAL: No bitcoinds active!

What puzzles me is that I had ckpool running some time ago, i.e. the configuration files used should be correct. Still, it seems it is not a common problem.

I double checked that configurations should match by doing the rpc commands manually:
Code:
zefir@PC:~/work/bitcoin/src$ ./bitcoin-cli -rpcconnect=localhost -rpcport=8332 -rpcuser=rpc -rpcpassword=pass validateaddress 14BMjogz69qe8hk9thyzbmR5pg34mVKB1e
{
    "isvalid" : true,
    "address" : "14BMjogz69qe8hk9thyzbmR5pg34mVKB1e",
    "scriptPubKey" : "76a91422ddd9233f44ac2e9f183ec755adf134c12cdbf188ac"
}

which should mimic what ckpool should be doing with the configuration of
Code:
{
"btcd" :  [
{
"url" : "localhost:8332",
"auth" : "rpc",
"pass" : "pass",
"notify" : false
}
],
"logdir" : "/home/zefir/tmp/ckpool-log"
}

Anything obviously wrong? I'll debug and report back if not, just to be sure it is not some silly mistake at my side.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
full member
Activity: 222
Merit: 103
In my opinion, the main issue is that people who want to run pools should have software development experience and be able to modify the pool code.
Not be some point and click ipad user who has to call apple if Candy Crush stops working Tongue

Otherwise if something goes wrong, everyone on the pool is stuck until ... "Hey can someone fix my pool" gets solved by who-knows-who Tongue

It looks like the task to modify the code is not very difficult for a programmer/developer, but I am not a programmer myself Smiley Rig and farm building, server and router setup from scratch, vmware virtualization and web mastering - but not a tr00 c0der, impossible to do everything. Community is for that - one can setup and configure a server, another - write some code, the third - adopt software.

Quote
With CKDB I am of course open to answer questions about anyone who's brave enough to use it, but I'm not a developer training school for noobs, there's plenty of places you can go to learn about computers ...
You need to know what you are doing and then I'll help with questions that show you do know what you are doing.

As you can see, there were NO questions about "give me the working solo.ckpool alternative", just the info about the "public solo pool functionality" is not implemented (or was removed Smiley ) from github version. Why was such a question - just because there IS solo.ckpool alternatives on the net and they are too based on ckpool code.

Quote
Of course if you aren't trying to run a pool, or are just solo mining, from a standard user point of view, the proxy/pool code is well documented and well usable.

For single-user purposes everything is better, then OK Smiley
legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
Custom code which is not part of the ckpool code. Like I said solo.ckpool.org is special and I'm not really interested in helping others set up a competing pool with the same unique feature.

OK, I understand your reasons Smiley - will try "dreadful Russian hackers" our community help. Thanks again for your work!
In my opinion, the main issue is that people who want to run pools should have software development experience and be able to modify the pool code.
Not be some point and click ipad user who has to call apple if Candy Crush stops working Tongue

Otherwise if something goes wrong, everyone on the pool is stuck until ... "Hey can someone fix my pool" gets solved by who-knows-who Tongue

With CKDB I am of course open to answer questions about anyone who's brave enough to use it, but I'm not a developer training school for noobs, there's plenty of places you can go to learn about computers ...
You need to know what you are doing and then I'll help with questions that show you do know what you are doing.

Of course if you aren't trying to run a pool, or are just solo mining, from a standard user point of view, the proxy/pool code is well documented and well usable.
full member
Activity: 222
Merit: 103
Custom code which is not part of the ckpool code. Like I said solo.ckpool.org is special and I'm not really interested in helping others set up a competing pool with the same unique feature.

OK, I understand your reasons Smiley - will try "dreadful Russian hackers" our community help. Thanks again for your work!
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
And what kind of modification or add-on must be done to achieve the solo.ckpool functionality? We want to setup one here in Russia to get better pings.
Custom code which is not part of the ckpool code. Like I said solo.ckpool.org is special and I'm not really interested in helping others set up a competing pool with the same unique feature.
full member
Activity: 222
Merit: 103
And what kind of modification or add-on must be done to achieve the solo.ckpool functionality? We want to setup one here in Russia to get better pings.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Everything is UP and working on testnet - thanks once again for great software.

But when the block was found - all the reward (except the 0.5% fee) was sent to btcaddress of the ckpool.conf, not the worker/miner address. Even there is no data in logs about what worker found a block. What should I do (config or some extra software) to make it send the reward to miner address as solo.ckpool.org does?
You can only mine to the ckpool.conf address. Solo.ckpool.org is special.
full member
Activity: 222
Merit: 103
Everything is UP and working on testnet - thanks once again for great software.

But when the block was found - all the reward (except the 0.5% fee) was sent to btcaddress of the ckpool.conf, not the worker/miner address. Even there is no data in logs about what worker found a block. What should I do (config or some extra software) to make it send the reward to miner address as solo.ckpool.org does?
Pages:
Jump to: