Bitcoin Forum
November 20, 2018, 02:51:32 PM *
News: Latest Bitcoin Core release: 0.17.0 [Torrent].
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 [19] 20 »  All
  Print  
Author Topic: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux  (Read 103522 times)
andyjh12322
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
July 12, 2018, 12:30:28 AM
 #361

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
1542725492
Hero Member
*
Offline Offline

Posts: 1542725492

View Profile Personal Message (Offline)

Ignore
1542725492
Reply with quote  #2

1542725492
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1542725492
Hero Member
*
Offline Offline

Posts: 1542725492

View Profile Personal Message (Offline)

Ignore
1542725492
Reply with quote  #2

1542725492
Report to moderator
-ck
Moderator
Legendary
*
Offline Offline

Activity: 2702
Merit: 1145


Ruu \o/


View Profile WWW
July 12, 2018, 12:46:47 AM
 #362

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.

Developer/maintainer for cgminer and ckpool/ckproxy.
ZERO FEE Pooled mining at ckpool.org, 1% Fee Solo mining at solo.ckpool.org
-ck
huglester
Newbie
*
Offline Offline

Activity: 46
Merit: 0


View Profile
August 11, 2018, 10:40:08 PM
 #363

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
Moderator
Legendary
*
Offline Offline

Activity: 2702
Merit: 1145


Ruu \o/


View Profile WWW
August 11, 2018, 10:43:10 PM
 #364

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

Developer/maintainer for cgminer and ckpool/ckproxy.
ZERO FEE Pooled mining at ckpool.org, 1% Fee Solo mining at solo.ckpool.org
-ck
huglester
Newbie
*
Offline Offline

Activity: 46
Merit: 0


View Profile
August 11, 2018, 11:48:29 PM
 #365

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
Moderator
Legendary
*
Offline Offline

Activity: 2702
Merit: 1145


Ruu \o/


View Profile WWW
August 11, 2018, 11:49:51 PM
 #366

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.

Developer/maintainer for cgminer and ckpool/ckproxy.
ZERO FEE Pooled mining at ckpool.org, 1% Fee Solo mining at solo.ckpool.org
-ck
huglester
Newbie
*
Offline Offline

Activity: 46
Merit: 0


View Profile
August 12, 2018, 12:13:47 AM
 #367

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
Moderator
Legendary
*
Offline Offline

Activity: 2702
Merit: 1145


Ruu \o/


View Profile WWW
August 12, 2018, 12:38:20 AM
 #368

I try to configure some shitcoin algo Smiley
You're on your own now.

Developer/maintainer for cgminer and ckpool/ckproxy.
ZERO FEE Pooled mining at ckpool.org, 1% Fee Solo mining at solo.ckpool.org
-ck
kano
Legendary
*
Offline Offline

Activity: 2632
Merit: 1059


Linux since 1997 RedHat 4


View Profile
August 15, 2018, 02:30:27 AM
 #369

...
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.

Pool: https://kano.is Here on Bitcointalk: Forum BTC: 1KanoPb8cKYqNrswjaA8cRDk4FAS9eDMLU
FreeNode IRC: irc.freenode.net channel #kano.is Majority developer of the ckpool code
Help keep Bitcoin secure by mining on pools with full block verification on all blocks - and NO empty blocks!
chillfactr
Full Member
***
Offline Offline

Activity: 224
Merit: 100


View Profile
September 11, 2018, 02:48:52 AM
 #370

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
-ck
Moderator
Legendary
*
Offline Offline

Activity: 2702
Merit: 1145


Ruu \o/


View Profile WWW
September 11, 2018, 04:07:05 AM
 #371

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?

Developer/maintainer for cgminer and ckpool/ckproxy.
ZERO FEE Pooled mining at ckpool.org, 1% Fee Solo mining at solo.ckpool.org
-ck
taserz
Full Member
***
Offline Offline

Activity: 469
Merit: 111


Mining since 2011


View Profile
September 11, 2018, 04:19:43 AM
 #372

Hey -ck,

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

Much Love Brother <3

Want to throw me a tip: 1E5bZiPAh7Yt1VqNUyk7y9r48zpbGNTEUA
Mining bitcoin since 2011.
Best nerd decision of my life.
chillfactr
Full Member
***
Offline Offline

Activity: 224
Merit: 100


View Profile
September 11, 2018, 04:37:55 AM
 #373

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
-ck
Moderator
Legendary
*
Offline Offline

Activity: 2702
Merit: 1145


Ruu \o/


View Profile WWW
September 11, 2018, 06:05:35 AM
 #374

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

Developer/maintainer for cgminer and ckpool/ckproxy.
ZERO FEE Pooled mining at ckpool.org, 1% Fee Solo mining at solo.ckpool.org
-ck
chillfactr
Full Member
***
Offline Offline

Activity: 224
Merit: 100


View Profile
September 11, 2018, 06:11:43 AM
 #375

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

taserz
Full Member
***
Offline Offline

Activity: 469
Merit: 111


Mining since 2011


View Profile
September 11, 2018, 07:37:37 PM
 #376

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.

Want to throw me a tip: 1E5bZiPAh7Yt1VqNUyk7y9r48zpbGNTEUA
Mining bitcoin since 2011.
Best nerd decision of my life.
dogedood
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
September 14, 2018, 01:41:34 AM
 #377

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.
ProfMac
Legendary
*
Offline Offline

Activity: 1148
Merit: 1000



View Profile
October 30, 2018, 06:57:16 PM
 #378

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.


I try to be respectful and informed.
-ck
Moderator
Legendary
*
Offline Offline

Activity: 2702
Merit: 1145


Ruu \o/


View Profile WWW
October 30, 2018, 08:10:49 PM
 #379

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?

Developer/maintainer for cgminer and ckpool/ckproxy.
ZERO FEE Pooled mining at ckpool.org, 1% Fee Solo mining at solo.ckpool.org
-ck
ProfMac
Legendary
*
Offline Offline

Activity: 1148
Merit: 1000



View Profile
October 30, 2018, 08:30:55 PM
 #380


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 <hexstuff>"); // 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 try to be respectful and informed.
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 [19] 20 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!