Pages:
Author

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

jr. member
Activity: 49
Merit: 1
Hello,

on some VPSes I cna't change this value. is there way so that the passthrough would be working?
so it show only notice, that those values needs to changed (or recommended) ?
Code:
[2018-08-12 01:23:25.541] ckpassthrough generator starting
[2018-08-12 01:23:25.541] ckpassthrough stratifier starting
[2018-08-12 01:23:25.541] ckpassthrough connector starting
[2018-08-12 01:23:25.541] ckpassthrough connector ready
[2018-08-12 01:23:25.542] ckpassthrough stratifier ready
[2018-08-12 01:23:25.554] Failed to increase rcvbufsiz to 1048576, increase rmem_max or start ckpassthrough privileged
[2018-08-12 01:23:25.554] Failed to increase sendbufsize to 1048576, increase wmem_max or start ckpassthrough privileged
Segmentation fault

I also don't quite understand, user and password. can we skip it in the passthough mode?
Since I want my rigs to set the username/password themseved?

thank you
Username and password is ignored in passthrough mode. The segfault is actually a recent bug and nothing to do with those privileges. I haven't had time to go and fix it so you could check out an earlier commit and use that for passthrough instead. A known good commit was 64961e4091b053935e57eabe346f59964c1bbb70

just recompiled at commit you specified
Code:
    commit 64961e4091b053935e57eabe346f59964c1bbb70
    Propagate transactions that have reappeared after having been missing for a while to minimise risk of lost transctions in remote work.

not getting error about sysctl value, but still segfault. should I go with even earlier commit?

[2018-08-12 02:45:57.565] ckpassthrough generator starting
[2018-08-12 02:45:57.565] ckpassthrough stratifier starting
[2018-08-12 02:45:57.565] ckpassthrough connector starting
[2018-08-12 02:45:57.566] ckpassthrough connector ready
[2018-08-12 02:45:57.566] ckpassthrough stratifier ready
Segmentation fault
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Hello,

on some VPSes I cna't change this value. is there way so that the passthrough would be working?
so it show only notice, that those values needs to changed (or recommended) ?
Code:
[2018-08-12 01:23:25.541] ckpassthrough generator starting
[2018-08-12 01:23:25.541] ckpassthrough stratifier starting
[2018-08-12 01:23:25.541] ckpassthrough connector starting
[2018-08-12 01:23:25.541] ckpassthrough connector ready
[2018-08-12 01:23:25.542] ckpassthrough stratifier ready
[2018-08-12 01:23:25.554] Failed to increase rcvbufsiz to 1048576, increase rmem_max or start ckpassthrough privileged
[2018-08-12 01:23:25.554] Failed to increase sendbufsize to 1048576, increase wmem_max or start ckpassthrough privileged
Segmentation fault

I also don't quite understand, user and password. can we skip it in the passthough mode?
Since I want my rigs to set the username/password themseved?

thank you
Username and password is ignored in passthrough mode. The segfault is actually a recent bug and nothing to do with those privileges. I haven't had time to go and fix it so you could check out an earlier commit and use that for passthrough instead. A known good commit was 64961e4091b053935e57eabe346f59964c1bbb70
jr. member
Activity: 49
Merit: 1
Hello,

on some VPSes I cna't change this value. is there way so that the passthrough would be working?
so it show only notice, that those values needs to changed (or recommended) ?
Code:
[2018-08-12 01:23:25.541] ckpassthrough generator starting
[2018-08-12 01:23:25.541] ckpassthrough stratifier starting
[2018-08-12 01:23:25.541] ckpassthrough connector starting
[2018-08-12 01:23:25.541] ckpassthrough connector ready
[2018-08-12 01:23:25.542] ckpassthrough stratifier ready
[2018-08-12 01:23:25.554] Failed to increase rcvbufsiz to 1048576, increase rmem_max or start ckpassthrough privileged
[2018-08-12 01:23:25.554] Failed to increase sendbufsize to 1048576, increase wmem_max or start ckpassthrough privileged
Segmentation fault

I also don't quite understand, user and password. can we skip it in the passthough mode?
Since I want my rigs to set the username/password themseved?

(btw it should work on algos, for example x17, lyra2z etc?)
thank you
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Hi ck,

I'm getting a strange json error in my logs.

Looks like connector.c is not stripping HTTP from the json before it submits to json_load

Code:
Connector created new client instance
[2018-07-11 14:59:53.478] Connected new client 0 on socket 12 to 0 active clients from 192.168.x.x:59482
[2018-07-11 14:59:53.478] Client sendbufsize detected as 374400
[2018-07-11 14:59:53.478] Client id 2 sent invalid json message POST / HTTP/1.1
Host: 192.168.xx.xx:3333
Authorization: Basic xxxxxxxxxob2FoMTxxxxxIzNDU
Accept: */*
Accept-Encoding: deflate, gzip
Content-type: application/json
X-Mining-Extensions: longpoll midstate rollntime submitold
Content-Length: 116
User-Agent: sgminer 5.1.1

{"id": 0, "method": "getblocktemplate", "params": [{"capabilities": ["coinbasetxn", "workid", "coinbase/append"]}]}

this is on latest bitbucket update from 2018-6-14.

thanks!
 Andrew

Hmm, nope, it looks like your client is sending a http encapsulated request for getblocktemplate instead of a json message and ckpool is simply dumping the entire message as is, rightly saying it's not valid json. Looks like the client is trying to mine with the defunct getblocktemplate mining protocol instead of stratum. It's also a shitcoin miner based on the mining software id it's giving you.
newbie
Activity: 1
Merit: 0
Hi ck,

I'm getting a strange json error in my logs.

Looks like connector.c is not stripping HTTP from the json before it submits to json_load

Code:
Connector created new client instance
[2018-07-11 14:59:53.478] Connected new client 0 on socket 12 to 0 active clients from 192.168.x.x:59482
[2018-07-11 14:59:53.478] Client sendbufsize detected as 374400
[2018-07-11 14:59:53.478] Client id 2 sent invalid json message POST / HTTP/1.1
Host: 192.168.xx.xx:3333
Authorization: Basic xxxxxxxxxob2FoMTxxxxxIzNDU
Accept: */*
Accept-Encoding: deflate, gzip
Content-type: application/json
X-Mining-Extensions: longpoll midstate rollntime submitold
Content-Length: 116
User-Agent: sgminer 5.1.1

{"id": 0, "method": "getblocktemplate", "params": [{"capabilities": ["coinbasetxn", "workid", "coinbase/append"]}]}

this is on latest bitbucket update from 2018-6-14.

thanks!
 Andrew
copper member
Activity: 149
Merit: 15
Thales knew
I tried setting up ckpool+ckdb, but I'm having some issues with the payouts.
On ckdb's logs I noticed:
Quote
[2018-06-11 15:39:09.437+02] process_pplns(): missing optioncontrol pplns_diff_times (2018-06-11 13:28:54.846804+00/579327)
[2018-06-11 15:39:38.455+02] summarise_blocks() block 579328, stats confirmed 892000000/5000000/892/5/80
I checked the db table and it's empty, but I've ran the initdb.sh already although judging from the code, it doesn't seem to have to do something with optioncontrol.

Any ideas?


Sidenote:
Another thing I get that could be related but seems harmless is:
Quote
[2018-06-11 15:34:55.101+02] JSON 'merklehash' zero length array was:[],"createdate":"1528724095,1013... buf=workinfo.14086.json={"workinfoid...
I guess this could cause wrong payouts, but not sure if related to the top issue.

Thanks
newbie
Activity: 2
Merit: 0
Passthroughs can only talk to full ckpools, not proxies.

Darn, I could imagine that sort of chaining ability would add great utility to ckpool for use in distributed/clustered deployments. Thanks for confirming though!

Is there some other way one could achieve something like a "[user]proxy node mode"?

Edit: on the millionth read, I think the true implications of the "passthrough node" operation just finally clicked.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
I have been playing around with ckpool a bit in its proxy modes, and I'm a little stumped about the node passthrough feature. I have tried a countless number of configurations, but I can't manage to connect one ckpool instance in node passthrough mode to another in passthrough proxy or user proxy mode for the life of me.

With the understanding that certain modes only work when talking to another ckpool instance, I've tried to build off up something like the below, but to no avail:
Passthroughs can only talk to full ckpools, not proxies.
newbie
Activity: 2
Merit: 0
I have been playing around with ckpool a bit in its proxy modes, and I'm a little stumped about the node passthrough feature. I have tried a countless number of configurations, but I can't manage to connect one ckpool instance in node passthrough mode to another in passthrough proxy or user proxy mode for the life of me.

With the understanding that certain modes only work when talking to another ckpool instance, I've tried to build off up something like the below, but to no avail:

Code: (userproxy)
{
    "proxy": [{
        "url": "127.0.0.1:POOL",
        ...
    }],
    "serverurl": "127.0.0.1:1234",
    - AND/OR -
    "nodeserver": "127.0.0.1:1234",
    ...
}

Code: (node)
{
    "btcd": [{
        "url": "127.0.0.1:RPC",
        ...
    }],
    "serverurl": "0.0.0.0:END",
    "proxy": [{
        "url": "127.0.0.1:1234",
        ...
    }],
    - AND/OR -
    "upstream": "127.0.0.1:1234",
    ...
}

All my best efforts - of which there have been too many to enumerate here - typically result in an error on the passthrough node stating "Failed to receive line in node_stratum" or similar, with an accompanying "Failed initial node setup".

The desired outcome of my experimentation is to have one instance running as a stratum endpoint with relay, connected to another that proxies to something like NOMP. I figure as useful as such a setup could be, I must just be missing something.

Any pointers?

--

Edit to add: I am somewhere around 12 commits behind master/HEAD, having been chased back a ways by a segfault at generator.c:2133 in newer versions.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Have you given any thought to stratum with SSL to prevent MitM attacks? I noticed some altcoin pools enabling it... I guess this question would also apply to cgminer.
It's an unrealistic attack for the sake of a few mining packets of data.
sr. member
Activity: 419
Merit: 250
Have you given any thought to stratum with SSL to prevent MitM attacks? I noticed some altcoin pools enabling it... I guess this question would also apply to cgminer.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Doesn't matter. Tweaking these has zero effect on mining itself (except for maxdiff which you should never set), only when miners first connect for a few seconds which should only happen once with your own miners.

Should I increase startdiff in config?
I think it must correlate to network difficulty somehow.   Huh
What don't you understand about "doesn't matter"?
member
Activity: 229
Merit: 13
Doesn't matter. Tweaking these has zero effect on mining itself (except for maxdiff which you should never set), only when miners first connect for a few seconds which should only happen once with your own miners.

Should I increase startdiff in config?
I think it must correlate to network difficulty somehow.   Huh
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
What diff should I set for solo mining on my own node/pool?What digits should I set in ckpool.conf file for better pool performance?
My current digits do not look optimal:
Code:
"mindiff" : 1,
"startdiff" : 2500000,
"maxdiff" : 0,

Doesn't matter. Tweaking these has zero effect on mining itself (except for maxdiff which you should never set), only when miners first connect for a few seconds which should only happen once with your own miners.
member
Activity: 229
Merit: 13
What diff should I set for solo mining on my own node/pool?

For example, this is current BitcoinCash stats:

Code:
[root@localhost ~]# bitcoin-cli getmininginfo
{
  "blocks": 516373,
  "currentblocksize": 2312,
  "currentblocktx": 18,
  "difficulty": 340523591249.2623,
  "blockprioritypercentage": 5,
  "errors": "",
  "networkhashps": 2.369436883479111e+18,
  "pooledtx": 18,
  "chain": "main"
}

Assume, I am solo miner and all shares come from my workers. I do not need to count
statistics of empty shares, I am paid only if the block is found.

What digits should I set in ckpool.conf file for better pool performance?
My current digits do not look optimal:
Code:
"mindiff" : 1,
"startdiff" : 2500000,
"maxdiff" : 0,
newbie
Activity: 14
Merit: 0
Hi CK

I have question about proxy in log I see this lines

Code:
[2018-02-02 10:49:30.248] Select timed out in read_socket_line
[2018-02-02 10:49:30.249] Got updated notify for proxy 1:0
[2018-02-02 10:49:30.249] Proxy 1:0 broadcast updated stratum notify without clean
[2018-02-02 10:49:30.249] Got updated diff for proxy 1:0
[2018-02-02 10:49:30.281] Select timed out in read_socket_line
[2018-02-02 10:49:30.281] Got updated notify for proxy 0:0
[2018-02-02 10:49:30.281] Aged 65 shares from share hashtable
[2018-02-02 10:49:30.281] Proxy 0:0 broadcast updated stratum notify without clean
[2018-02-02 10:49:30.281] Got updated diff for proxy 0:0

Is this issue read_socket_line timed out?

& what is meaning of stratum notify without clean?

Everything seems to be running fine just wanted to check.



hero member
Activity: 708
Merit: 502
Is it possible to use this as a proxy medium for upstream job consolidation to a higher difficulty job? (for ex. getting 2 500000 difficulty jobs from pool, and return a 1000000 difficulty job for worker)
Nicehash recently increased lowest difficulty for sha256 pools to 1000000, and as majority of pools I use do not support such difficulty at all, I am seeking for a solution to continue to mine.

Thank you.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
disregarding capacity issues, can 2 instances of ckpool (of course, one splns one "solo") run off a single bitcoind?
Sure, provided you name them differently so there's no conflict over sockets.
sr. member
Activity: 419
Merit: 250
disregarding capacity issues, can 2 instances of ckpool (of course, one splns one "solo") run off a single bitcoind?
sr. member
Activity: 419
Merit: 250
OK will do.

If/when I ever get a donation or find a block I'll send something your way too.
Pages:
Jump to: