Bitcoin Forum
April 18, 2024, 06:56:01 AM *
News: Latest Bitcoin Core release: 26.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 21 »  All
  Print  
Author Topic: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux  (Read 123929 times)
-ck (OP)
Legendary
*
Offline Offline

Activity: 4074
Merit: 1630


Ruu \o/


View Profile WWW
January 11, 2018, 09:45:44 PM
 #341

@-ck

I get a segfault with ckpool-splns. It is easily reproducible and so is the fix.

When starting with empty/nonexistant log directories and sock directories, ckpool starts but segfaults as soon as it connects to a bitcoind.

Fix I stumbled upon is to run non-splns ckpool for a bit, then close and run ckpool-splns. No segfaults.

Sorry if this is documented somewhere. Bitbucket seems to have been a mess lately.
Ckpool-splns was designed to be used on the ckpool.org pool only so I didn't really add much in the way of documentation for it apart from in code comments, nor tested it in many environments. Thanks for that. Be aware that if you're using the splns fork with hundreds of users, you must leave room in your block size for the generation transaction as well so set block weight in bitcoind to less than the full amount (something like 3.85MB instead of the max 4MB). Bitbucket had a major cloud storage failure of some sort.

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
1713423361
Hero Member
*
Offline Offline

Posts: 1713423361

View Profile Personal Message (Offline)

Ignore
1713423361
Reply with quote  #2

1713423361
Report to moderator
1713423361
Hero Member
*
Offline Offline

Posts: 1713423361

View Profile Personal Message (Offline)

Ignore
1713423361
Reply with quote  #2

1713423361
Report to moderator
"The nature of Bitcoin is such that once version 0.1 was released, the core design was set in stone for the rest of its lifetime." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713423361
Hero Member
*
Offline Offline

Posts: 1713423361

View Profile Personal Message (Offline)

Ignore
1713423361
Reply with quote  #2

1713423361
Report to moderator
WBF1
Sr. Member
****
Offline Offline

Activity: 419
Merit: 250


View Profile
January 11, 2018, 10:56:11 PM
 #342

You mean with blockmaxweight right?
-ck (OP)
Legendary
*
Offline Offline

Activity: 4074
Merit: 1630


Ruu \o/


View Profile WWW
January 12, 2018, 01:08:15 AM
 #343

You mean with blockmaxweight right?
Yes

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
WBF1
Sr. Member
****
Offline Offline

Activity: 419
Merit: 250


View Profile
January 12, 2018, 05:39:26 AM
 #344

So I'm pretty sure I know your stance on the subject, but FYI I (re-)launched luckypool.co running on ckpool-splns. Its a Bitcoin Cash mining pool backed by a Bitcoin Unlimited node. No Segwit, so not sure how that will affect ckpool (if at all). I did test on testnet and it worked as expected. blockmaxweight is something specific to segwit.

Let me know if you'd like a blurb at the bottom of my pool's home page (which is somewhat inspired by ckpool.org, although, when you're going for the simple look, there aren't a ton of options... maybe I'll add a splash of color).
-ck (OP)
Legendary
*
Offline Offline

Activity: 4074
Merit: 1630


Ruu \o/


View Profile WWW
January 12, 2018, 06:31:49 AM
 #345

Let me know if you'd like a blurb at the bottom of my pool's home page (which is somewhat inspired by ckpool.org, although, when you're going for the simple look, there aren't a ton of options... maybe I'll add a splash of color).
So long as you say what code it's based on, I'm happy. You need to set max block size to smaller instead then by say 15kb.... though the chance of having a full sized moronic 8MB block is pretty slim.

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
WBF1
Sr. Member
****
Offline Offline

Activity: 419
Merit: 250


View Profile
January 12, 2018, 03:42:04 PM
 #346

OK will do.

If/when I ever get a donation or find a block I'll send something your way too.
WBF1
Sr. Member
****
Offline Offline

Activity: 419
Merit: 250


View Profile
January 19, 2018, 03:53:17 PM
 #347

disregarding capacity issues, can 2 instances of ckpool (of course, one splns one "solo") run off a single bitcoind?
-ck (OP)
Legendary
*
Offline Offline

Activity: 4074
Merit: 1630


Ruu \o/


View Profile WWW
January 19, 2018, 10:56:05 PM
 #348

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.

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
micax1
Hero Member
*****
Offline Offline

Activity: 708
Merit: 502


View Profile
January 22, 2018, 07:39:32 PM
 #349

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.
1Dev
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
February 02, 2018, 10:56:33 AM
Last edit: February 02, 2018, 11:36:29 AM by 1Dev
 #350

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.



apxu
Member
**
Offline Offline

Activity: 229
Merit: 13


View Profile
February 07, 2018, 06:22:00 PM
 #351

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,
-ck (OP)
Legendary
*
Offline Offline

Activity: 4074
Merit: 1630


Ruu \o/


View Profile WWW
February 07, 2018, 08:02:15 PM
 #352

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.

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
apxu
Member
**
Offline Offline

Activity: 229
Merit: 13


View Profile
February 08, 2018, 11:12:49 AM
 #353

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 (OP)
Legendary
*
Offline Offline

Activity: 4074
Merit: 1630


Ruu \o/


View Profile WWW
February 08, 2018, 11:26:16 AM
 #354

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"?

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
WBF1
Sr. Member
****
Offline Offline

Activity: 419
Merit: 250


View Profile
March 05, 2018, 05:40:04 PM
 #355

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 (OP)
Legendary
*
Offline Offline

Activity: 4074
Merit: 1630


Ruu \o/


View Profile WWW
March 05, 2018, 08:00:20 PM
 #356

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.

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
singleuseacct
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
March 08, 2018, 04:34:02 AM
Last edit: March 08, 2018, 05:03:04 AM by singleuseacct
 #357

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 (OP)
Legendary
*
Offline Offline

Activity: 4074
Merit: 1630


Ruu \o/


View Profile WWW
March 08, 2018, 08:30:12 AM
 #358

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.

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
singleuseacct
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
March 08, 2018, 02:00:46 PM
Last edit: March 08, 2018, 02:13:23 PM by singleuseacct
 #359

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.
ThatRandomDude
Copper Member
Member
**
Offline Offline

Activity: 149
Merit: 15

Thales knew


View Profile
June 11, 2018, 03:29:47 PM
 #360

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

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 [18] 19 20 21 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!