Pages:
Author

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

member
Activity: 82
Merit: 11
Hey -ck

thanks for your work and sharing of this great piece of pool software.

I played around with your ckpool to learn and better understand mining process.

Now one question (so far) comes up, why does the pool re-adjust the vardiff from scratch for every known client after reconnects / instance takeover (with your -H option) / ...
Doesn't it put alot of stress on a pool server with thousands of clients connected if , for example , you make a instance takeover and all thousand clients start to re-djust vardiff with x shares per second ?
Since you already have per worker information stored, isn't it better to store also last vardiff information and start from there on the next connection of the same worker ?

Thanks

full member
Activity: 637
Merit: 131
I was testing the latest code in proxy mode which starts up fine and works with my antminers no problem.

[root@localhost ck]# bin/ckpool -Ap -c etc/ckproxy.conf
[2018-09-13 21:37:44.404] ckproxy generator starting
[2018-09-13 21:37:44.404] ckproxy stratifier starting
[2018-09-13 21:37:44.404] ckproxy connector starting
[2018-09-13 21:37:44.407] ckproxy connector ready
[2018-09-13 21:37:44.408] Loaded 2 users and 0 workers
[2018-09-13 21:37:44.408] ckproxy stratifier ready
[2018-09-13 21:37:50.800] Proxy 0:stratum+tcp://us-east.stratum.slushpool.com:3333 connection established
[2018-09-13 21:37:51.415] Successfully connected to pool 0 stratum+tcp://us-east.stratum.slushpool.com:3333 as proxy
[2018-09-13 21:37:51.415] ckproxy generator ready


However, I get the following when a Halong T1 tries to connect to the proxy:

[2018-09-13 21:38:06.435] Temporarily insufficient proxies to accept more clients
[2018-09-13 21:38:06.435] Failed to provide subscription due to no sdata

The T1 will connect directly to slush pool without a problem.

Did you figure it out?
to get connected?
full member
Activity: 637
Merit: 131
legendary
Activity: 1246
Merit: 1002

Old versions of the bitcoin daemon do not have the features required for ckpool to work completely, though I don't know how old you're talking about.

There's nothing in line 6225 that has anything to do with submitting a block? test_blocksolve goes to line 5949 which sends it to local_block_submit and in there line 2061 submits it to generator_submitblock and so on.

Bitbucket is the only authentic git repository for my source, so not sure why you need to look elsewhere?

Thanks for your reply.  My current approach with bitcoin is to try to understand virtually every line of code on the version I started with,
then move to the future.  At the moment, I'm marooned pretty far in the past at 0.8.1.  Real Soon Now I will leapfrog forward.

Offhand, do you know the oldest bitcoin version that is supported?

I am looking at the code below, with a small modification that I made.

Code:
if (sdiff >= diff) {
if (new_share(sdata, hash, id)) {
LOGINFO("Accepted client %s share diff %.1f/%.0f/%s: %s",
client->identity, sdiff, diff, wdiffsuffix, hexhash);
result = true; LOGDEBUG("stratifier.c Ln 6223 submitblock "); // parse_upstream_block(ckp, val);
} else {

Oh, and as for Bitbucket, it's just yet another login / password / interface to deal with.  I'll deal with it.



Procedure diff_from_nbits in file libckpool.c clamps the minimum difficulty to approximately 256.  I removed that code and it works correctly with a difficulty 1 network.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Offhand, do you know the oldest bitcoin version that is supported?

I am looking at the code below, with a small modification that I made.

Code:
if (sdiff >= diff) {
if (new_share(sdata, hash, id)) {
LOGINFO("Accepted client %s share diff %.1f/%.0f/%s: %s",
client->identity, sdiff, diff, wdiffsuffix, hexhash);
result = true; LOGDEBUG("stratifier.c Ln 6223 submitblock "); // parse_upstream_block(ckp, val);
} else {

Oh, and as for Bitbucket, it's just yet another login / password / interface to deal with.  I'll deal with it.

I don't know what bitcoin version, sorry.

That is for a successful plain share, not a block solve!

You don't need a login/pass etc. just to clone a repo, but whatever. github didn't offer what I wanted around the time I started working on ckpool.
legendary
Activity: 1246
Merit: 1002

Old versions of the bitcoin daemon do not have the features required for ckpool to work completely, though I don't know how old you're talking about.

There's nothing in line 6225 that has anything to do with submitting a block? test_blocksolve goes to line 5949 which sends it to local_block_submit and in there line 2061 submits it to generator_submitblock and so on.

Bitbucket is the only authentic git repository for my source, so not sure why you need to look elsewhere?

Thanks for your reply.  My current approach with bitcoin is to try to understand virtually every line of code on the version I started with,
then move to the future.  At the moment, I'm marooned pretty far in the past at 0.8.1.  Real Soon Now I will leapfrog forward.

Offhand, do you know the oldest bitcoin version that is supported?

I am looking at the code below, with a small modification that I made.

Code:
if (sdiff >= diff) {
if (new_share(sdata, hash, id)) {
LOGINFO("Accepted client %s share diff %.1f/%.0f/%s: %s",
client->identity, sdiff, diff, wdiffsuffix, hexhash);
result = true; LOGDEBUG("stratifier.c Ln 6223 submitblock "); // parse_upstream_block(ckp, val);
} else {

Oh, and as for Bitbucket, it's just yet another login / password / interface to deal with.  I'll deal with it.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
I want to set up an isolated lab where I read the software sources, execute for a bit, and see what happens.

In my particular scenario I will use an earlier version of the reference bitcoin client and download about 10,000 blocks.  The difficulty will be 1 at this point.

I will use cgminer and ckpool as well, to develop what skill I can at understanding stratum and how to configure the servers and what they do.

Toward that end I have made the most recent version of ckpool, and started it with
  ckpool -l 7 -A -H

and ckpool.conf points only to my local setup.

I appear to retreive getblocktemplates, pass info up to cpuminer/minerd, do the magic and send results back to ckpool.  ckpool.log and the consoles for cpuminer and ckpool make sense to me.

I don't grok how to get the new block submitted to my local bitcoind.

For what it's worth, I am looking at line 6225 of stratum.c.  That seems to be one place where I might expect a submitblock to happen, but it does not.

My understanding of "upstream" and whether it is necessary / possible to set up a proxy to make this happen is a bit wobbly.

Oh, and while I am posting, I thought I would mention that I am pretty familiar with GitHub, but not so much with the repository where ck has his source located.  Is there a GitHub bridge (fork) to his efforts, or do I need to figure out the new repository as part of all this effort.


Old versions of the bitcoin daemon do not have the features required for ckpool to work completely, though I don't know how old you're talking about.

There's nothing in line 6225 that has anything to do with submitting a block? test_blocksolve goes to line 5949 which sends it to local_block_submit and in there line 2061 submits it to generator_submitblock and so on.

Bitbucket is the only authentic git repository for my source, so not sure why you need to look elsewhere?
legendary
Activity: 1246
Merit: 1002
I want to set up an isolated lab where I read the software sources, execute for a bit, and see what happens.

In my particular scenario I will use an earlier version of the reference bitcoin client and download about 10,000 blocks.  The difficulty will be 1 at this point.

I will use cgminer and ckpool as well, to develop what skill I can at understanding stratum and how to configure the servers and what they do.

Toward that end I have made the most recent version of ckpool, and started it with
  ckpool -l 7 -A -H

and ckpool.conf points only to my local setup.

I appear to retreive getblocktemplates, pass info up to cpuminer/minerd, do the magic and send results back to ckpool.  ckpool.log and the consoles for cpuminer and ckpool make sense to me.

I don't grok how to get the new block submitted to my local bitcoind.

For what it's worth, I am looking at line 6225 of stratum.c.  That seems to be one place where I might expect a submitblock to happen, but it does not.

My understanding of "upstream" and whether it is necessary / possible to set up a proxy to make this happen is a bit wobbly.

Oh, and while I am posting, I thought I would mention that I am pretty familiar with GitHub, but not so much with the repository where ck has his source located.  Is there a GitHub bridge (fork) to his efforts, or do I need to figure out the new repository as part of all this effort.

newbie
Activity: 7
Merit: 0
I was testing the latest code in proxy mode which starts up fine and works with my antminers no problem.

[root@localhost ck]# bin/ckpool -Ap -c etc/ckproxy.conf
[2018-09-13 21:37:44.404] ckproxy generator starting
[2018-09-13 21:37:44.404] ckproxy stratifier starting
[2018-09-13 21:37:44.404] ckproxy connector starting
[2018-09-13 21:37:44.407] ckproxy connector ready
[2018-09-13 21:37:44.408] Loaded 2 users and 0 workers
[2018-09-13 21:37:44.408] ckproxy stratifier ready
[2018-09-13 21:37:50.800] Proxy 0:stratum+tcp://us-east.stratum.slushpool.com:3333 connection established
[2018-09-13 21:37:51.415] Successfully connected to pool 0 stratum+tcp://us-east.stratum.slushpool.com:3333 as proxy
[2018-09-13 21:37:51.415] ckproxy generator ready


However, I get the following when a Halong T1 tries to connect to the proxy:

[2018-09-13 21:38:06.435] Temporarily insufficient proxies to accept more clients
[2018-09-13 21:38:06.435] Failed to provide subscription due to no sdata

The T1 will connect directly to slush pool without a problem.
sr. member
Activity: 800
Merit: 294
Created AutoTune to saved the planet! ~USA
AH HAH!

Does cksolo have asicboost upstream?
i donot have latest version dammit
thank you for quick reply
Yes it does.

Hey -ck,

I just wanted to tell you... You're awesome.

Much Love Brother <3
Thanks man, but I'm not into guys.

Cheers

Hey it's 2018 you can't just go around assuming genders  Tongue haha

LMAO!!

Not into guys  Shocked Shocked

i think he means bromance type of love

Someone is looking out for me I see haha.
full member
Activity: 637
Merit: 131
AH HAH!

Does cksolo have asicboost upstream?
i donot have latest version dammit
thank you for quick reply
Yes it does.

Hey -ck,

I just wanted to tell you... You're awesome.

Much Love Brother <3
Thanks man, but I'm not into guys.

Cheers

LMAO!!

Not into guys  Shocked Shocked

i think he means bromance type of love

-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
AH HAH!

Does cksolo have asicboost upstream?
i donot have latest version dammit
thank you for quick reply
Yes it does.

Hey -ck,

I just wanted to tell you... You're awesome.

Much Love Brother <3
Thanks man, but I'm not into guys.

Cheers
full member
Activity: 637
Merit: 131
Hey -ck

im trying to add a dragon t1 to my ckproxy

what do i need to put on the url line for it to connect?
i put
stratum+tcp://192.168.0.12:3334
didnt like it
i put
192.168.0.12:3334
didnt like it

im using this (192.168.0.12:3334) on my s9's
and they connect fine
 Huh Huh Huh
Do you have the latest ckproxy from git to ensure you have working support for asicboost and are connecting to a pool upstream that has asicboost?


AH HAH!

Does cksolo have asicboost upstream?
i donot have latest version dammit
thank you for quick reply
sr. member
Activity: 800
Merit: 294
Created AutoTune to saved the planet! ~USA
Hey -ck,

I just wanted to tell you... You're awesome.

Much Love Brother <3
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Hey -ck

im trying to add a dragon t1 to my ckproxy

what do i need to put on the url line for it to connect?
i put
stratum+tcp://192.168.0.12:3334
didnt like it
i put
192.168.0.12:3334
didnt like it

im using this (192.168.0.12:3334) on my s9's
and they connect fine
 Huh Huh Huh
Do you have the latest ckproxy from git to ensure you have working support for asicboost and are connecting to a pool upstream that has asicboost?
full member
Activity: 637
Merit: 131
Hey -ck

im trying to add a dragon t1 to my ckproxy

what do i need to put on the url line for it to connect?
i put
stratum+tcp://192.168.0.12:3334
didnt like it
i put
192.168.0.12:3334
didnt like it

im using this (192.168.0.12:3334) on my s9's
and they connect fine
 Huh Huh Huh
legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
...
Probably. The passthrough has received virtually no attention since I abandoned helping Kano's pool so it's in a sorry state I'm afraid to say since I've had no use or need for it, and no one has funded work on it.
Well you have succeeded in breaking it with 100% guaranteed failures ... and your competition was affected in each case.

3 times I can remember I've had to fix:
1) there's a deadlock that occurs 100% of the time for a 'real' pool, in the stratifier that I reported to Lightsword
2) the passthrough crashes 100% of the time on startup
3) the passthrough fails to submit ALL blocks that have an asicboost version mask

Though I'm not sure why you think that someone will pay you to fix the breakages you added ...

Please remove it - since you make claims about how good it is in all material describing your minor subset of the ckpool code ... yet never bothered to point out how dangerous it is for anyone to use due to your regular breakage of it.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
I try to configure some shitcoin algo Smiley
You're on your own now.
jr. member
Activity: 49
Merit: 1
Probably. The passthrough has received virtually no attention since I abandoned helping Kano's pool so it's in a sorry state I'm afraid to say since I've had no use or need for it, and no one has funded work on it.

I see. I manged to compile your commit, seems problem was with missing user, pass in proxy config.
but now different error:
[2018-08-12 03:09:51.633] ckpassthrough generator starting
[2018-08-12 03:09:51.633] ckpassthrough stratifier starting
[2018-08-12 03:09:51.633] ckpassthrough connector starting
[2018-08-12 03:09:51.634] ckpassthrough connector ready
[2018-08-12 03:09:51.634] ckpassthrough stratifier ready
[2018-08-12 03:09:51.647] Failed to increase rcvbufsiz to 1048576, increase rmem_max or start ckpassthrough privileged
[2018-08-12 03:09:51.647] Failed to increase sendbufsize to 1048576, increase wmem_max or start ckpassthrough privileged
[2018-08-12 03:09:51.649] Denied passthrough for stratum
[2018-08-12 03:09:51.649] Failed initial passthrough to localhost:3737 !
[2018-08-12 03:09:51.654] Denied passthrough for stratum
[2018-08-12 03:09:51.654] Failed initial passthrough to localhost:3737 !

---
with ./ckpool -u  - similar error with auth
[2018-08-12 03:09:19.705] Proxy 0:0 localhost:3737 failed to authorise in auth_stratum, got: {"id":42,"result":false,"error":null}
[2018-08-12 03:09:19.705] Failed initial authorise to localhost:3737 with user:pass !

--
seems that ckpool binary tries to athorize rigth away, but it should probably do it on first user connect?
I try to configure some shitcoin algo Smiley maybe it's not suitable for this?

btw, can't simple proxy written it work? I mean if I only need to 'bridge' traffic?
-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

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

Probably. The passthrough has received virtually no attention since I abandoned helping Kano's pool so it's in a sorry state I'm afraid to say since I've had no use or need for it, and no one has funded work on it.
Pages:
Jump to: