Bitcoin Forum

Bitcoin => Mining software (miners) => Topic started by: -ck on September 21, 2014, 12:02:38 AM



Title: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on September 21, 2014, 12:02:38 AM
CKPOOL + libckpool by the cgminer development team.

Ultra low overhead massively scalable multi-process, multi-threaded modular
bitcoin mining pool, proxy, passthrough, library and database interface in c
for Linux.

ckpool code by ckolivas / -ck
ckdb code by kano

Note that as maintainer of ckpool am FOR segwit and AGAINST Emergent Consensus.

Source code downloads:

https://bitbucket.org/ckolivas/ckpool

Current release status: Beta v0.94, from git source only.

IRC channel: irc://irc.freenode.net/ckpool

LICENSE: GNU Public license V3. See included COPYING for details.

About ckpool: https://bitcointalk.org/index.php?topic=790323.msg8907250#msg8907250

About ckdb: https://bitcointalk.org/index.php?topic=790323.msg8907583#msg8907583

About ckproxy: https://bitcointalk.org/index.php?topic=790323.msg8907589#msg8907589

About libckpool: https://bitcointalk.org/index.php?topic=790323.msg8907597#msg8907597

About ckpmsg: https://bitcointalk.org/index.php?topic=790323.msg8907597#msg8907597

About notifier: https://bitcointalk.org/index.php?topic=790323.msg8907597#msg8907597

Building: https://bitcointalk.org/index.php?topic=790323.msg8907600#msg8907600

Configuration: https://bitcointalk.org/index.php?topic=790323.msg8907601#msg8907601

Stratum extensions: https://bitcointalk.org/index.php?topic=790323.msg8907604#msg8907604

FAQs: https://bitcointalk.org/index.php?topic=790323.msg8908863#msg8908863

Discussion/Future directions: https://bitcointalk.org/index.php?topic=790323.msg8908866#msg8908866



List of current ckpools:

http://www.kano.is
http://hashmine.io (private for now)
http://solo.ckpool.org (anonymous solo mining)
http://testnet.ckpool.org (testnet only)


Title: Re: CKPOOL software - Free pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on September 21, 2014, 12:20:20 AM
About ckpool

Ckpool is a project by the cgminer development team designed to complete the circle between miners and pools from cgminer to ckpool. The bulk of the code work for this was commissioned and paid for, however I provided an incentive to the group commissioning the code to open the software up to all by charging less for free software than for closed code. Ultimately this should benefit bitcoin far more than me simply working on code for another pool. I intentionally chose to write most of the code from the ground up and not use external libraries to have complete control over all the code given past experiences of difficulty to debug failures in library code that was outside our domain with cgminer. The separation of the pool code from the database code allows the pool code to be ultra-scalable and extremely low overhead by dissociating any concept of share counts, user accounts, authentication, front ends, payschemes etc. etc. These can be as vastly different from the envisioned ckdb+postgresql+php interface as the administrator desires without any change to the core pool functionality.


Rationale:

The aim of this project is to provide the most low overhead, massively scalable pool software available by creating the code from the ground up using the same programming techniques and tools as those used when the author codes for the linux kernel. It was decided early on that to speed development and maintain consistent behaviour that only Linux would be supported. Even with massive numbers of miners, the core ckpool code uses very little CPU and only 100s of megabytes of ram.

We aim to remove the dependency of pool owners on custom software and the requirement for massive hardware infrastructure to run a stable and performant mining pool, thus dramatically lowering the barrier for entry for more pools to be created. In the process, we also aim to be providing tools to allow large mining farms to mine for themselves instead of directing their power to a large pool which would otherwise make them even larger and risking the security of the bitcoin network. While it may seem counter to the small miner's benefit to make large miners capable of running their own pool, it is an acceptance of where the bulk of the mining power is coming from and not make that mining power a risk to bitcoin. By providing them with software to mine in a manner that isn't designed to just mine blocks quickly but does so in a way that can lay down all transactions currently in flight without detriment to their block generating capacity, this will benefit the bitcoin network far more than them adding their hashes to a large pool.

Despite the pool software being provided to large miners to run standalone, the bulk of the development effort was actually directed to providing a reliable consistent and performing pooled mining solution (in the traditional pooled mining sense) with a stratum mining module at the core of the miner's experience that is not hindered in its ability to serve any sized miners with expedience and to create a platform for expanding on the existing stratum design as the need arises. As the core is modular in design, there is scope for plugging in extra components in the future as desired. Also as the same code is used by the pool software, the optional proxy included, the associated library, and the developers maintain the code at both ends, there is assurance the two ends will talk optimally.


DESIGN:

Architecture:

- Low level hand coded architecture relying on minimal outside libraries beyond
basic glibc functions for maximum flexibility and minimal overhead that can be
built and deployed on any Linux installation.
- Multiprocess+multithreaded design to scale to massive deployments and
capitalise on modern multicore/multithread CPU designs.
- Minimal memory overhead.
- Utilises ultra reliable unix sockets for communication with dependent
processes.
- Modular code design to streamline further development.
- Standalone library code that can be utilised independently of ckpool.
- Same code can be deployed in many different modes designed to talk to each
other on the same machine, local lan or remote internet locations.


Modes of deployment:
- Comprehensive pooled mining solution with a postgresql database interface.
- Passthrough node(s) that combine connections to a single socket which can
be used to scale to millions of clients and allow the main pool to be isolated
from direct communication with clients.
- Proxy nodes with a database that act as a single client to the upstream pool
while storing full client data of their own.
- Simple proxy without the limitations of hashrate inherent in other proxy
solutions when talking to ckpool.
- Simple pool without a database.
- Library for use by other software.


Features:
- Bitcoind communication to unmodified bitcoind with multiple failover to local
or remote locations.
- Local pool instance worker limited only by operating system resources and
can be made virtually limitless through use of multiple downstream passthrough
nodes.
- Proxy and passthrough modes can set up multiple failover upstream pools.
- Optional share logging.
- Virtually seamless restarts for upgrades through socket handover from exiting
instances to new starting instance.
- Configurable custom coinbase signature.
- Configurable instant starting and minimum difficulty.
- Rapid vardiff adjustment with stable unlimited maximum difficulty handling.
- New work generation on block changes incorporate full bitcoind transaction
set without delay or requiring to send transactionless work to miners thereby
providing the best bitcoin network support and rewarding miners with the most
transaction fees.
- Event driven communication based on communication readiness preventing
slow communicating clients from delaying low latency ones.
- Stratum messaging system to running clients.
- Accurate pool and per client statistics.
- Multiple named instances can be run concurrently on the same machine.


Processes:
When ckpool is run, a number of separate processes are spawned in order to capitalise on multi-core CPUs by offloading dedicated tasks to one process at a time in order to not allow any one process to slow any other. They talk to each other using unix sockets which by only talking on the local system cannot be influenced by the outside world.

The processes generated are:

The main process, AKA listener - this is the core process that listens for incoming requests from an admin socket and watches the running of the child processes.

The generator - this process is designed to only talk to bitcoind to generate work templates, check the current block hashes, check bitcoin addresses, submit block solves, or in proxy mode talks to an upstream stratum server to emulate generation of work. This also runs a watchdog thread to check the running of the upstream bitcoind/or upstream stratum pool and can perform failover should the bitcoind fail for whatever reason.

The connector - this process accepts incoming connections from miners, handling requests for new worker connections, receiving and sending data to the miners. It does this in an event driven manner with multiple send/receive/listen threads, automatically prioritising sends to downstream miners according to their readiness to receive data, thus preventing any one worker affecting any others.

The stratifier - this is the core stratum code implementation that receives data from the connector and runs multiple threads to create work templates, process incoming data, check for valid work, queue outgoing data, authenticate new users, and optionally talks to the ckdb process to store all manner of data for running a full database based pool.

Each process runs additional threads to perform logging in a queued manner that does not hinder the underlying running code.


Advantages to miners:

A stratum implementation with extremely rapid and accurate adjustment of diff to an optimal value both up and down in diff per worker.
Once diff has stabilised, it is extremely rare for diff to be adjusted again unless you add or remove hashes.
Diff is actually properly associated with work templates which means you don't "leak" rejected low diff shares when the diff changes.
Stable diff levels and proper work association with diff leads to lower rates of rejects.
Very rapid block propagation support to all miners means all miners get notification of, and work on, the latest block work as quickly as possible to not waste work.
No extra work restart messages for the inefficient zero-transaction work that other pool software means much less lost work.
Hashrates should hold much more stable at higher levels as a result of all these benefits.
Reconnect support: If you have temporary glitches in your networking, ckpool supports resuming and accepting of valid cached shares.
Messaging: Miners watching their console will see stratum messages as sent to them by the pool (such as block solves).
Virtually no downtime for pool restart: Pool restarts only register as an interruption and then reconnect instead of failing over to backup pools due to the unique socket handover mechanism in use.
Rewards: Maximum rewards are guaranteed by incorporating transactions into every work template instead of mining transaction-less blocks.
Confidence: Improving the bitcoin network through seamless transaction processing increases the confidence in bitcoin in general allowing expansion of the bitcoin network in terms of numbers of transactions and block sizes.
Code auditing: With the ckpool code all freely available, miners are able to audit the code for themselves.
Transaction auditing: Ckpool automatically includes transaction hash reporting to enable auditing of mining work for miners/auditors that request it.


Title: Re: CKPOOL software - Free pool/database/proxy/passthrough/library in c for Linux
Post by: kano on September 21, 2014, 01:20:52 AM
About ckdb

Backend database for full user management of ckpool.

Basic concept is a memory resident database with PostgreSQL as the backend DB for permanent storage.
Performance is the priority of ckdb.

Running live and stable on my pool and the hashmine pool.

Still in development ... see the git source code :)


Title: Re: CKPOOL software - Free pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on September 21, 2014, 01:21:26 AM
About ckproxy

Ckproxy uses the same core code as ckpool and acts as a proxy with a simple switch (-p). It acts as a stratum-to-stratum proxy, or stratum-through-stratum proxy in passthrough mode (see below).

It is most useful to regular miners who wish to consolidate their mining hardware into one connection for minimal upstream/downstream bandwidth in standalone mode (with the additional -A switch). Ckproxy uses multiple modes to maintain as many miners as possible communicating with the upstream pool. It works by splitting up nonce2 sizes if the upstream pool's nonce2 is large enough and then it recruits extra upstream connections as needed to allow the number of downstream miners to scale indefinitely.

Ckproxy can be started in "userproxy" mode which monitors login names of miners attaching that don't match the master proxy username and recruits new upstream connections with each unique username, proxying all workers of the same username to the unique upstream proxy connections.

It can be configured to run with a database as per an actual pool entirely, thus acting like a child pool for a parent pool elsewhere, or simply for miners who wish full logging of every detail of their mining operation.

It can also act as a unique stratum-through-stratum passthrough mode which absolutely requires a ckpool as the parent pool with the -P switch. In this mode it does not decrease the bandwidth talking to the upstream pool but minimises the number of open connections instead, but requires extremely low resources to run. This mode is most useful for pools wishing to isolate their main pool instance from the outside world and set up multiple VPSs as a kind of front end proxy/firewall to the outside world. This also removes any realistic limit on the number of open connections since each passthrough instance could easily handle 10k connections, consolidating each into just 1 connection to the upstream pool.

In addition to the passthrough mode, there is a more advanced "node" mode which connects as a passthrough, but needs a local bitcoind connection of its own. It monitors all traffic and shares between the pool and miners, being able to display local hashrates and will submit any blocks found to the local bitcoind in addition to sending the shares to the upstream pool, circumventing the delay of block submission that would otherwise happen with remote nodes.

Finally ckproxy can be started in "redirector" mode which acts as a regular passthrough, but monitors share responses from the upstream pool, and once a valid share is recognised from the upstream pool it will redirect miners that support redirection (all cgminer based clients do) to the URL of your choice. Should the miners not support redirection, such as rental services, ckredirector will continue to act as an ordinary passthrough.


Title: Re: CKPOOL software - Free pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on September 21, 2014, 01:23:29 AM
About libckpool

While not strictly feature complete as a library that can be installed, dynamically linked etc. as per other Linux libraries (yet), libckpool is part of the ckpool suite that is designed to be easily included into other projects without requiring any of the other ckpool code. Any and all functions that can be put into the libckpool.c/h files without being dependent on ckpool are placed there for convenience for others to use in their project, thus benefiting from the many common functions a c/c++ application might need, along with many of the unique ck* functions created for the cgminer and ckpool projects that others might find useful.


About ckpmsg:

When ckpool is run, a series of unix sockets are created: listener, generator, stratifier, connector usually in /tmp/ckpool (though configurable) and ckdb creates its own listener socket in a ckdb directory.

Ckpmsg is a simple application designed to talk locally to the various ckpool/ckdb proceses using the message structure that ckpool expects, usually to the listener socket by default if called with no arguments, looking for ckpool by default but can be aimed at ckproxy (with -p), a named ckpool (with -n) or a user chosen socket directory (with -s). Currently ckpool only accepts a limited number of commands on its listener:

shutdown
restart
loglevel=$val (from 0-7)
ping

It looks for a response to any command sent, and it currently can't distinguish those that will and those that won't return a response so it will complain if none is returned.

Although the same ckpmsg can be used for any of the low level functions within any of the processes, it is expected that admins will mostly be using the simple functions. It can also be used for any number of ckdb queries.


About notifier:

This is an extremely simple binary that is designed to be run with the blocknotify feature of bitcoind. It simply tells ckpool to look for new block information and can be run with the -s option to tell it which socket directory to use to tell ckpool about block updates. Standard usage would be something like:

Create a notify script such as notify.sh:
Code:
#!/bin/bash
/usr/bin/notifier -s /opt

Start bitcoind with blocknotify telling it to call that script:
Code:
bitcoind -daemon -blocknotify=/usr/bin/notify.sh

Using a script as blocknotify allows you to change the script without having to restart bitcoind.


Title: Re: CKPOOL software - Free pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on September 21, 2014, 01:23:41 AM
Building ckpool

Apart from a basic development package installation, as ckpool is mostly hand written without using libraries, it has zero external dependencies. If ckpool is built with ckdb support, only the postgres development library needs to be installed to build it. Most proxy users and simple solo ckpool setups will not require ckdb.


(Note that this is only for a tarball release which does not yet exist):
sudo apt-get install build-essential
./configure --without-ckdb
make


Building with ckdb requires installation of the postgresql development library.

sudo apt-get install build-essential libpq-dev
./configure
make


Building from git also requires autoconf and automake

sudo apt-get install build-essential libpq-dev autoconf automake libtool
./autogen.sh
./configure
make


Binaries will be built in the src/ subdirectory.

Installation is NOT required and ckpool can be run directly from the directory
it's built in but it can be installed with:
sudo make install


Title: Re: CKPOOL software - Free pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on September 21, 2014, 01:23:53 AM
CKPOOL configuration

At least one bitcoind (aka btcd) is mandatory in ckpool mode with the minimum requirements of server, rpcuser and rpcpassword set. If no btcd is set up in the configuration, ckpool will look for a running bitcoind on the local machine on the default port 8332 and the username "user" and password "pass" set up.

At the very least you will need the following lines in your bitcoin.conf file:

Code:
server=1
rpcuser=user
rpcpassword=pass
rpcallowip=127.0.0.1

It is also recommended you start bitcoind with the -blocknotify feature calling the ckpool notifier as described here: https://bitcointalk.org/index.php?topic=790323.msg8907597#msg8907597


Ckpool takes a json encoded configuration file in ckpool.conf by default or ckproxy.conf in proxy or passthrough mode unless specified with -c. Sample configurations for ckpool and ckproxy are included with the source. Entries after the valid json are ignored and the space there can be used for comments.

Sample ckpool.conf file:
Code:
{
"btcd" :  [
        {
                "url" : "localhost:8332",
                "auth" : "user",
                "pass" : "pass",
                "notify" : true
        },
        {
                "url" : "backup:8332",
                "auth" : "user",
                "pass" : "pass",
                "notify" : false
        }
],
"btcaddress" : "14BMjogz69qe8hk9thyzbmR5pg34mVKB1e",
"btcsig" : "/mined by ck/",
"blockpoll" : 100,
"update_interval" : 30,
"serverurl" : "ckpool.org:3333",
"mindiff" : 1,
"startdiff" : 42,
"logdir" : "logs"
}
Comments from here on are ignored.

Sample ckproxy.conf file:
Code:
{
"proxy" :  [
        {
                "url" : "ckpool.org:3333",
                "auth" : "user",
                "pass" : "pass"
        },
        {
                "url" : "backup.ckpool.org:3333",
                "auth" : "user",
                "pass" : "pass"
        }
],
"update_interval" : 30,
"serverurl" : "192.168.1.100:3334",
"mindiff" : 1,
"startdiff" : 42,
"logdir" : "logs"
}
Comments from here on are ignored.
The options recognised are as follows:


"btcd" : This is an array of bitcoind(s) with the options url, auth  and pass
which match the configured bitcoind. This is mandatory in pool mode. The
optional boolean field notify tells ckpool this btcd is using the notifier
and does not need to be polled for block changes.

"proxy" : This is an array in the same format as btcd above but is used in
proxy and passthrough mode to set the upstream pool and is mandatory.

"btcaddress" : This is the bitcoin address to try to generate blocks to.

"btcsig" : This is an optional signature to put into the coinbase of mined
blocks.

"blockpoll" : This is the frequency in milliseconds for how often to check for
new network blocks and is 100 by default. It is intended to be a backup only
for when the notifier is not set up and only polls if the "notify" field is
not set on a btcd.

"update_interval" : This is the frequency that stratum updates are sent out to
miners and is set to 30 seconds by default to help perpetuate transactions for
the health of the bitcoin network.

"serverurl" : This is the IP to try to bind ckpool uniquely to, otherwise it
will attempt to bind to all interfaces in port 3333 by default in pool mode
and 3334 in proxy mode.

"mindiff" : Minimum diff that vardiff will allow miners to drop to. Default 1

"startdiff" : Starting diff that new clients are given. Default 42

"logdir" : Which directory to store pool and client logs. Default "logs"



It is anticipated that pool operators wishing to set up a full database based installation of ckpool+ckdb will be familiar with setting up postgresql and associated permissions to the directories where the various processes will communicate with each other and a web server so these will not be documented.

If you are not capable of setting up and running a database and/or webserver then you should be questioning whether you should be running a public pool or not.


Title: Re: CKPOOL software - Free pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on September 21, 2014, 01:24:13 AM
Stratum extensions:

In addition to support of all the common stratum features, ckpool supports extensions that are either not yet in use, along with its own interpretation of further stratum features as the need arises.

mining.passthrough

This is a unique stratum extension supported only by ckpools upstream and creates a stratum-through-stratum passthrough. It is not intended to be used by miners directly except through the use of the ckpool code itself in passthrough mode for connection combining.

mining.node

This is unique stratum extension supported only by ckpools upstream and creates a stratum-through-stratum passthrough and additionally receives workinfo information from the upstream pool to allow local block submission.

mining.get_transactions

This controversial bandwidth eating feature has been absorbed into ckpool but instead of it handing out the full transactions which are a complete waste of bandwidth, the number of transactions is returned. In addition to supporting the originally documented form with job_id embedded in the method, ckpool will accept the valid json job_id as a single array parameter eg: params: ["$jobid"] .The functionality of the original feature request has been supplanted by the following call instead:

mining.get_txnhashes

Instead of handing out the full transactions incorporated into a job, this version returns only the hashes of the transactions included in each job in a space separated string as the result. The returned hashes are less than 1/10th the bandwidth that returning the full transactions would have amounted to, but is ample information for auditing tools or external authorities to confirm what the running ckpool is working on. This feature is on and rate limited to return only one response per miner per job_id to avoid it becoming a source of DoS. eg:
Code:
{"id": 0, "method": "mining.get_txnhashes", "params":["545198de00000000"]}

mining.suggest_difficulty

Special handling is done for accepting a diff as requested by each mining connection. This is done separately from the per-worker connection so it allows overriding that. When a miner suggests a difficulty, ckpool will allow a slightly lower diff than it would have otherwise chosen, but still will not exceed 30 shares per minute to prevent miners from using this to flood the server with low diff shares.  In addition to supporting the originally documented form where the difficulty was embedded in the method name, ckpool will accept the valid json where the difficulty is a single arrray parameter in params. eg:
Code:
{"id": 2, "method": "mining.suggest_difficulty", "params": [42]}

mining.ping

This is as it says a simple ping sent to or from the miner without parameters. Ideally this would be used to ensure a miner is still alive or to inform the miner that the pool is still alive and ideally they should respond with a result of "pong" (or vice versa). Since most mining software does not currently support this it is not expected to be used for confirmation, although sending data is a good way to ensure a raw socket is still open.

Code:
{"id": 42, "method": "mining.ping", "params": []}

Code:
{"id": 42, "result": "pong", "error": null}


Title: Re: CKPOOL software - Free pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on September 21, 2014, 04:46:49 AM
FAQs

Q: I get permission errors on the sockets?
A: You cannot talk via unix sockets using sudo. Make sure your users have write permissions to the directory where your sockets go. In particular, apache/httpd cannot use /tmp so you will have to choose a different directory such as /opt and give write permission to the user/group that you run ckpool/ckdb as.

Q: System requirements?
A: This depends entirely on the mode of running ckpool and the number of clients you wish to connect to it.
In proxy passthrough mode even a single CPU 32MB ram VPS is enough and requires virtually no disk space.
Standalone proxy mode requires more ram and CPU.
Running a standalone pool without ckdb requires only a few hundred megabytes of ram and will run on about 256MB of ram and at least one virtual CPU if the bitcoind is run on a separate machine (not recommended but doable).
However bitcoind itself usually requires a minimum of 2GB of ram with the wallet disabled and almost 30GB of HD space.
So a recommended setup for a minimal pool with bitcoind would be a 4GB ram 4 virtual CPU without ckdb.
Ckdb however uses a lot of ram due to its nature of having all data memory resident for maximum speed so the ram requirements for a fully featured pool would be at least 16GB ram.

Q: Cross platform / other operating system support?
A: Linux is by far the most proven, tested, deployed server operating system of choice today, and by limiting ourselves to writing for it we are able to use many unique linux features and not have surprise differences in operating system behaviour. When working with low level socket code as ckpool does without a library, the actual operating system behaviour and APIs themselves matter, so it is not worth trying to port them across which is one of the major complaints about the protocol.

Q: What payscheme is it? Paying of orphans? Paying of transactions?
A: This is a choice at a pool operator level and has nothing to do with the core ckpool code. While intrinsically there is code for PPLNS in ckdb, the pay scheme and mechanism is up to the pool operator who sets up the pool with this code.

Q: Why not p2pool as a backend?
A: p2pool as a concept has failed as a scalable concept due to continually marginalising its smallest miners and increasing variance the more miners it has instead of decreasing variance the way a traditional pool does. I have not completely discounted this as a module for ckpool if we can come up with valid workarounds and we are always considering new options. We are instead proposing future development of sibling pools with ckpool to decrease variance by combining rewards from multiple pools into smaller pools. More on this to come.

Q: Other mining protocols?
A: While stratum may not be a perfect mining protocol, the adoption of it as the defacto standard for scalability and its robustness has been well proven. Instead of rewriting the protocol, we believe that a solid implementation is enough to offset any disadvantages to the protocol, and add extensions as the need arises. We support reporting of transaction hashes included in work templates as a security measure for validation by miners and auditors.

Q: GUI?
A: A GUI has no place in the core code of a server or database.

Q: Simple setup tutorial?
A: It is a cinch to set up a simple ckproxy or solo ckpool. If you need help setting up a fully featured pool then you shouldn't be doing it.

Q: Merged mining?
A: Any presumed profit increase from adding virtually worthless altcoins is not worth the disadvantage of introducing far more instability associated with running multiple lesser unstable coin daemons. The running overheads of ckpool should be so small as to allow low fees from pool operators and stability. Some purported free pools with multiple coin support have so much downtime that any extra profit from them is offset by their downtime and poor design.

Q: Altcoins?
A: The author has no interest in support for anything but bitcoin. You are free to modify the code yourself as you see fit, but no altcoin support will ever be merged into the master ckpool code.

Will be added to as the questions arise.


Title: Re: CKPOOL software - Free pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on September 21, 2014, 04:46:59 AM
Discussion/Future direction/Feature requests

At this time the development of the code pool code has been in an extensive testing, debugging and consolidation, having been completed months ago and has had a great deal of real world testing, minting many blocks along the way. The ckdb code is now at completion to the point where public pools can run the code, which is why we're finally able to announce this project. Future features are definitely planned once this consolidation phase is over, and bug reports/adoption/feature requests/code pushes are all to be expected.

The next major feature we wish to work on is to develop the node code to allow multiple trusted nodes in different locations share data, but this is primarily work to be done at the database level.

In the future I wish to develop the concept of sibling pools which will allow collaboration to minimise variance for miners while sharing rewards. The idea is to expand beyond the need for trusted nodes to be able to link up with other pools that can prove to each other the work they are performing towards a common reward. In essence it will involve proof-of-work much like miners do to the pool itself but with auditing of each other's work. The details of the protocol are not yet finalised and is still some way off.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: will on September 21, 2014, 06:10:59 AM
We are the owners of hashmine.io and commissioned the development of ckpool.

We've been working with Con & Kano on this for a few months now, and I must say it's a pleasure to see the masters at work. In a sense, the work was a natural progression of the solo-mining/gbt work on cgminer we commissioned earlier this year.

I started on basic visualization/GUI layer here: http://cpui.hashmine.io/ - changes to that sync with Kano's web implementation @ http://ice.kano.is/
Current focus is on browser compatibility, making it work and look serviceable on all devices. Priority is bugfixes and basic user management workflows, will look @ i18n and l10n after that.
This current UI is mainly a test for the REST API I'm building on Kano's ckdb work and testing the servicing of historical reporting. Will add more visualizations & reporting in the coming days.
Still very much in debug mode as daily changes are coming in, but will try to keep up with Kano & Con as time goes on.

hashmine.io takes a flat rate 1.5% fee, of which 0.5% goes directly to ckpool development (controlled by Con, and issued @ coinbase at time of blocksolve). Newly minted coins go directly into cold storage and I process them manually when the blocks mature. A payout history is available @ the above-mentioned UI. Will do this until I've worked through the security aspects of automation.

There's still much to do on this technical path (hardware, software, architecture, distribution, etc.) and this project will probably always be on-going. Once things calm down a bit we'll go into the unique-selling points of hashmine and the direction we'd like to take with it.

Will update this post with progress as I push changes.



Title: Re: CKPOOL software - Free pool/database/proxy/passthrough/library in c for Linux
Post by: QuiveringGibbage on September 21, 2014, 07:42:09 AM
Discussion/Future direction/Feature requests
In the future I wish to develop the concept of sibling pools which will allow collaboration to minimise variance for miners while sharing rewards. The idea is to expand beyond the need for trusted nodes to be able to link up with other pools that can prove to each other the work they are performing towards a common reward. In essence it will involve proof-of-work much like miners do to the pool itself but with auditing of each other's work. The details of the protocol are not yet finalised and is still some way off.
very interesting concept for multi pools to trust each other... this will change the pooled mining landscape. Bitcoin mining is on the change again, fascinating future ahead for the mining scene.

@conman & kanoi; Congrats on the release :) and thank you for sharing your code with the community.

Cheers,
QG


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on September 22, 2014, 06:56:39 AM
Added support for using ckproxy to p2pool and large coinbase pools. Be aware that most non-ckpool based pools (p2pool included) have work limitations per connection when proxied as discussed in the ckproxy post.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on September 26, 2014, 02:33:34 AM
I've substantially updated the ckproxy code to work much better in concert with p2pool, and to increase the maximum speed of clients that are connected via the proxy when connected to a non-ckpool. On most pools, you will now be able to connect up to 256 clients to the proxy (down from what was 64k) but the maximum hashrate of each connected miner has been pushed up from 5TH to 1.2PH.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on September 30, 2014, 06:36:29 AM
I've added logging and statistics internally to ckpool on a combined per-worker basis, storing stats for each worker in the logs/workers directory.

I've also added the ability to set a user chosen minimum worker difficulty, though this will require some ckdb and front-end changes to allow this to be set.

In addition, I've implemented support for the stratum suggest_difficulty extension and updated the docs to reflect this. I've modified the cgminer git master to support this new extension with the --suggest-diff command.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: mahrens917 on October 05, 2014, 01:54:09 AM
First off, thanks for ckpool - it really sounds like a great product and I am trying to learn more.  I have a p2pool server and I am trying to get a ckpool proxy setup in front of it since it sounds like this will reduce load on my server (provided I have more users).  First, with ckpool -A -p running will all downstream users continue to maintain their individual presence on the p2pool (like it is described to work with -P)?  Within ckpool.conf there is a proxy url and a server url that need to be set.  Running this on my p2pool server the proxy url seems to want to be set to my p2pool server with port 9332.  That what is server URL?  The IP and port that outside clients would connect to, to use the proxy before hitting the p2pool server?  I have tried multiple configurations and cannot get it to work.  Perhaps, there is a sample .conf file out there already for p2pool?  Thanks for all of the help.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on October 05, 2014, 02:05:20 AM
First off, thanks for ckpool - it really sounds like a great product and I am trying to learn more.  I have a p2pool server and I am trying to get a ckpool proxy setup in front of it since it sounds like this will reduce load on my server (provided I have more users).  First, with ckpool -A -p running will all downstream users continue to maintain their individual presence on the p2pool (like it is described to work with -P)?  Within ckpool.conf there is a proxy url and a server url that need to be set.  Running this on my p2pool server the proxy url seems to want to be set to my p2pool server with port 9332.  That what is server URL?  The IP and port that outside clients would connect to, to use the proxy before hitting the p2pool server?  I have tried multiple configurations and cannot get it to work.  Perhaps, there is a sample .conf file out there already for p2pool?  Thanks for all of the help.

Server URL is only when run in ckpool mode. The proxy entry is when you are running it in proxy mode. If you are connecting clients to the proxy, you can only have one upstream connection to the pool with one login only. If you allowed multiple logins it would end up just having multiple connections to the upstream pool so the proxy wouldn't actually be achieving anything. The -P option ONLY works when the upstream pool is a ckpool instance as the manual explicitly states and nothing else and does not decrease bandwidth, only the number of socket connections.

Simplest p2pool proxy entry would be just the proxy entry and nothing else. eg:

Code:
{
"proxy" :  [
        {
                "url" : "localhost:9332",
                "auth" : "user",
                "pass" : "pass"
        }
]
}

EDIT: I've been thinking of ways to allow multiple clients attach to the upstream pool with their username but it's a very invasive change to the code since it is designed around the concept of only one upstream server at any one time. Unless multiple clients are connected with the same username attach they're not going to benefit from the proxy being there, but this change will likely eventually make its way into the code, along with ways to open up extra connections once the proxy is "full" of clients.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: mahrens917 on October 05, 2014, 04:48:37 AM
Payout schemes are not discussed for ckpool.  Is it just solo or are others possible like PPLNS?  I have read everything i could find on ckpool and i do not belive this was ever explicitly stated.  Hopefully, this will be my last question for awhile.  Thanks!


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on October 05, 2014, 10:37:12 AM
Payout schemes are not discussed for ckpool.  Is it just solo or are others possible like PPLNS?  I have read everything i could find on ckpool and i do not belive this was ever explicitly stated.  Hopefully, this will be my last question for awhile.  Thanks!
Hi, read the FAQ linked in the top post. This is software, not a pool, so the payscheme is not fixed in the software design and entirely up to the pool. The ckdb code has a pplns calculation in it, but that doesn't mean the pool that adopts ckpool has to use pplns at all. Code to perform payments is not anywhere in the included code. Furthermore, if you are using ckproxy and not ckpool, the payment part is entirely dependent on your upstream pool and the proxy has zero effect on it. If you're asking specifically about the current pools that are running ckpool, hashmine.io and ckpool/kano.is are using pplns for payment, while solo.ckpool.org is using entire block reward payments.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: Walter Rothbard on October 12, 2014, 10:58:37 PM
Thanks for the awesome software - I was able to compile and configure a private pool in about five minutes!  :o


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: paradigmflux on October 13, 2014, 01:05:30 AM
Does this work for altcoins?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: Walter Rothbard on October 13, 2014, 02:14:52 AM
Does this work for altcoins?

The author said this:

Q: Altcoins?
A: The author has no interest in support for anything but bitcoin. You are free to modify the code yourself as you see fit, but no altcoin support will ever be merged into the master ckpool code.

Personally, I had no trouble getting it to work.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on October 13, 2014, 11:38:33 PM
To be clear, merge mining coins which were just invented to monetise yet another coin that's stuffed into the bitcoin blockchain is a complete waste in my opinion. Something that uses the bitcoin blockchain but doesn't directly add value to the bitcoin economy is just free-riding. Extensions to bitcoin itself that depend on side chains are a valid potential use though (in my opinion), but none have matured at this stage. Please don't try and convince me otherwise, the noise is best left to other threads where I can more meaningfully ignore it.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: mahrens917 on October 14, 2014, 04:22:11 AM
I run ckpool -A and if the serverurl (in ckpool.conf) is set to anything other than 127.0.0.1:3333 than I get this error: [2014-10-14 00:13:58] Failed to bind socket for ckpool.org:3333 <- or any domain name or IP address
[2014-10-14 00:13:58] Connector failed to bind to socket, retrying in 5s

If I use 127.0.0.1:3333 then ckpool runs but I cannot connect any miner to it.  My miner connects to solo.ckpool.org:3333 just fine.  My firewall is open for port 3333.

I also have ensured that I can write to my socket directory as a user (not root) in /tmp.  I have also tried -s /run to change the socket directory to no avail.

Any thoughts?  Thanks again.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on October 14, 2014, 04:23:32 AM
I run ckpool -A and if the serverurl (in ckpool.conf) is set to anything other than 127.0.0.1:3333 than I get this error: [2014-10-14 00:13:58] Failed to bind socket for ckpool.org:3333 <- or any domain name or IP address
[2014-10-14 00:13:58] Connector failed to bind to socket, retrying in 5s

If I use 127.0.0.1:3333 then ckpool runs but I cannot connect any miner to it.  My miner connects to solo.ckpool.org:3333 just fine.  My firewall is open for port 3333.

I also have ensured that I can write to my socket directory as a user (not root) in /tmp.  I have also tried -s /run to change the socket directory to no avail.

Any thoughts?  Thanks again.

What's your ifconfig look like? You need to bind it to whatever the interface is that looks out to the world (probably a 192.x address).


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: mahrens917 on October 14, 2014, 02:21:05 PM
Perfect, thanks.  I am running in a datacenter and I have a public and a private IP address.  I placed in my private IP address in the config file and I was able to reach it and solo mine on it via my public IP address.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: warrensgun on October 15, 2014, 08:29:36 PM
any ideas for these errors:

Code:
[2014-10-15 16:27:07] Failed to get a json result in parse_subscribe, got: {"id": null, "method": "mining.set_difficulty", "params": [16384.0]}
[2014-10-15 16:27:07] Failed all subscription options in subscribe_stratum
[2014-10-15 16:27:22] Nonce2 length 3 too small to be able to proxy

ckpoool -A -p
proxy setup with 4 pools (ghash, p2p, eligius and something else i forgot)


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on October 15, 2014, 09:15:08 PM
any ideas for these errors:

Code:
[2014-10-15 16:27:07] Failed to get a json result in parse_subscribe, got: {"id": null, "method": "mining.set_difficulty", "params": [16384.0]}
[2014-10-15 16:27:07] Failed all subscription options in subscribe_stratum
[2014-10-15 16:27:22] Nonce2 length 3 too small to be able to proxy

ckpoool -A -p
proxy setup with 4 pools (ghash, p2p, eligius and something else i forgot)
Looks like some pool responds with a command before it responds with the subscription, while another has a very small nonce2 (looks like f2pool or something).

The pool with a small nonce2 will likely only work with devices <5TH if I do this though.

I'll try and add workarounds for these in the code, thanks.

EDIT: Added nonce2 size 3 support with a warning.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: Walter Rothbard on October 21, 2014, 06:43:35 AM
Is there a way to tell ckpool to re-read its configuration file without a restart?

Apologies if this is answered somewhere; I looked through the FAQ and tried to search the whole thread.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: Walter Rothbard on October 22, 2014, 12:16:23 AM
I keep getting shut down with this message:

[2014-10-22 00:02:03] Failure in send_proc from stratifier.c ssend_process:2661 with errno 3: No such process
[2014-10-22 00:02:03] Child process received signal 15, forwarding signal to ckpool main process
[2014-10-22 00:02:03] Parent process ckpool received signal 15, shutting down

I've run without a hitch 24/7 until now.  What did I do?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on October 22, 2014, 12:29:15 AM
I keep getting shut down with this message:

[2014-10-22 00:02:03] Failure in send_proc from stratifier.c ssend_process:2661 with errno 3: No such process
[2014-10-22 00:02:03] Child process received signal 15, forwarding signal to ckpool main process
[2014-10-22 00:02:03] Parent process ckpool received signal 15, shutting down

I've run without a hitch 24/7 until now.  What did I do?
You probably had an upstream outage. The code was a little trigger happy at shutting itself down under those circumstances. Git pull the latest code.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: Walter Rothbard on October 22, 2014, 12:33:35 AM
Thanks, Con!


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: warrensgun on October 24, 2014, 05:51:26 PM
This just happened - but otherwise had been up and running for like 5 or 7 days without a problem.  I'll do a git pull to update - but in case this helps
Code:
[2014-10-24 13:22:36] Failed to recv in read_socket_line
[2014-10-24 13:22:36] Failed to read_socket_line in proxy_recv, attempting reconnect
[2014-10-24 13:22:36] Upstream socket invalidated, will attempt failover
[2014-10-24 13:22:36] Killing proxy
[2014-10-24 13:22:36] Nonce2 length 3 means proxied clients can't be >5TH each
[2014-10-24 13:22:41] Failed to receive line in auth_stratum
[2014-10-24 13:22:41] Failed initial authorise to pool:port with user !
[2014-10-24 13:22:42] Connected to upstream server pool2:port as proxy
[2014-10-24 13:22:42] Successfully reconnected to pool2:port as proxy
[2014-10-24 13:22:42] Killing proxy
[2014-10-24 13:22:42] Nonce2 length 3 means proxied clients can't be >5TH each
[2014-10-24 13:22:42] JSON-RPC decode failed: (unknown reason)
[2014-10-24 13:22:42] Failed to get a json result in parse_subscribe, got: {"id": null, "method": "mining.set_difficulty", "params": [8192.0]}
[2014-10-24 13:22:42] Failed all subscription options in subscribe_stratum
[2014-10-24 13:22:43] generator process dead! Relaunching
[2014-10-24 13:22:43] File /tmp/ckproxy/generator.pid exists
[2014-10-24 13:22:43] ckproxy generator starting
[2014-10-24 13:22:43] ckproxy generator ready
[2014-10-24 13:22:43] Nonce2 length 3 means proxied clients can't be >5TH each
[2014-10-24 13:22:48] Failed to receive line in auth_stratum
[2014-10-24 13:22:48] Failed initial authorise to pool:port with user !
[2014-10-24 13:22:55] Connected to upstream server pool2:port as proxy
[2014-10-24 13:22:55] Attempting to send message getnotify to dead process generator with errno 3: No such process
[2014-10-24 13:22:55] Failure in send_recv_proc from stratifier.c update_notify:852 with errno 3: No such process
[2014-10-24 13:22:55] Failed to get notify from generator in update_notify
[2014-10-24 13:22:55] Attempting to send message getsubscribe to dead process generator with errno 3: No such process
[2014-10-24 13:22:55] Failure in send_recv_proc from stratifier.c update_subscribe:809 with errno 3: No such process
[2014-10-24 13:22:55] Failed to get subscribe from generator in update_notify
[2014-10-24 13:22:55] ckproxy stratifier exiting with return code 1, shutting down!
[2014-10-24 13:22:55] Listener received shutdown message, terminating ckpool
[2014-10-24 13:22:55] Failed to write 4 byte length in send_unix_msg (32) with errno 32: Broken pipe
[2014-10-24 13:22:55] Failure in send_unix_msg from ckpool.c listener:255 with errno 32: Broken pipe
[2014-10-24 13:22:55] Parent process ckproxy received signal 15, shutting down


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on October 24, 2014, 09:42:00 PM
This just happened - but otherwise had been up and running for like 5 or 7 days without a problem.  I'll do a git pull to update - but in case this helps
Thanks, likely the same as the previous report of a trigger happy shutdown of the proxy which a git pull should fix.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on October 27, 2014, 08:57:12 PM
Fixed a bug which would previously crash ckpool if you had 1024 clients or more connected concurrently due to an expected system call limitation with select(), along with worker count being incorrect. It's now being used live on kano's ckpool with more than 1500 active workers.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: warrensgun on October 28, 2014, 12:08:18 AM
Code:
[2014-10-27 20:05:53] ckproxy stratifier ready
[2014-10-27 20:06:03] Failed to receive line in auth_stratum
[2014-10-27 20:06:14] Failed to receive line in auth_stratum
[2014-10-27 20:06:24] Failed to receive line in auth_stratum
[2014-10-27 20:06:34] Failed to receive line in auth_stratum
[2014-10-27 20:06:45] Failed to receive line in auth_stratum
[2014-10-27 20:07:00] Failed to receive line in auth_stratum
[2014-10-27 20:07:11] Failed to receive line in auth_stratum

This is after a fresh update.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on October 28, 2014, 02:40:39 AM
Code:
[2014-10-27 20:05:53] ckproxy stratifier ready
[2014-10-27 20:06:03] Failed to receive line in auth_stratum
[2014-10-27 20:06:14] Failed to receive line in auth_stratum
[2014-10-27 20:06:24] Failed to receive line in auth_stratum
[2014-10-27 20:06:34] Failed to receive line in auth_stratum
[2014-10-27 20:06:45] Failed to receive line in auth_stratum
[2014-10-27 20:07:00] Failed to receive line in auth_stratum
[2014-10-27 20:07:11] Failed to receive line in auth_stratum

This is after a fresh update.
What config and upstream pool? Seems to be working fine here. Maybe the pool you're trying to proxy is actually dead?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on October 30, 2014, 01:52:14 AM
I've updated the documentation to reflect the changes to the get_transactions, get_txnhashes and suggest_diff calls. The original documentation placed the parameter within the method which is not really meaningful use of json so ckpool supports the old form but expects the actual parameter within the params key.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on November 02, 2014, 11:28:30 PM
I thought I might explain a little of the CKDB share storage for anyone curious.
I was gonna post this in the pool thread, but of course realised, here is more appropriate.
(It relates to a change/fix I'm doing at the moment and thought I'd write out the current details at the same time)

CKDB has a 2 level structure for storing shares.
ShareSummary and MarkerSummary

ShareSummary is implemented.
MarkerSummary isn't yet - this simply means that I use a LOT more ram until I do implement it - and fast reporting at the 'Marker' level of course isn't possible until it's done.

CKPool creates work per WorkInfo which is effectively each block template we get from bitcoin.
We do this by default every 30s (faster than 'certain' other pools) since that is both good for Bitcoin and good for the pool.
For Bitcoin it means faster expected average transaction confirmation.
For the pool it means higher expected average transaction fees.
An obvious Win-Win for both.

CKDB groups shares, per WorkInfoID (the internal ID of the WorkInfo) and creates per worker ShareSummary records of these in RAM and in the DB.
You could compare this to what some other pools call "Shifts", with a ShareSummary record being a shift of work for a worker, of usually 30 seconds.
ShareSummary, per worker, per 30s, means a lot of ShareSummaries :)

The PPLNS code currently uses the ShareSummary information to calculate payouts, so the N value actually used for the payout will include the full 30s of work for the starting WorkInfoID calculated to be the start of the payout i.e. the N value used is expanded to the full first and last WorkInfoID - so, in concept, it is similar to a PPLNS "Shift" payout structure.

The MarkerSummary design allows any arbitrary range of WorkInfoIDs
The design is: to later to be able to determine the necessary WorkInfoID ranges to ensure all summary calculations required are possible, and then summarise the ShareSummaries into the MarkerSummaries and then be able to delete the ShareSummaries.
The original idea was that the Markers would be the block WorkInfoIDs and the PPLNS WorkInfoIDs and mean a much smaller amount of data required in RAM and in the database.
However, the timing of doing the summarisation to the Markers isn't possible until the end Marker is older than what is needed by other code.
For the current PPLNS used, that would mean: not until the end Marker is more than the N in PPLNS old.
i.e. all ShareSummaries would have to exist back to N share diff ago.

This actually runs pretty well on hashmine since most of the workers are high hash rate devices and have many high diff shares in each WorkInfo.
If the average number of shares per WorkInfo is low or the average difficulty of the shares is low, this of course leads to a much larger number of ShareSummaries - as is happening now on the kano.is pool.
Thus I've now decided to use the MarkerSummary to make larger "Shifts" that are both a subset of the original idea, i.e. more of them, but also at a size where it's OK to use for the PPLNS calculation - which I'll chose some value between 20 and 100 WorkInfoIDs (probably 50)
The MarkerSummary changes are pretty much next on the todo list.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on November 02, 2014, 11:51:08 PM
Milestone 7 was recently tagged as a nice stable point in the code to use, although we have continued to develop in the interim.

New features are the addition of the maxdiff and maxclients options.

Stratum redirect can now be sent via ckpmsg on the console to a URL of choice instead of just a blank redirect. Reconnect by itself will just issue a reconnect but url and port can be added:
reconnect:url,port

A substantial amount of performance tuning was performed on the code now that I've seen it working on kano's ckpool allowing me to find the largest CPU users and concentrate scalability improvements there. I've fixed a number of upper client limit issues and now it should only really be limited by available ram and open file limits on the system. The main connector was rewritten to use epoll and extra threads based on number of CPUs are now recruited for share processing and stratum message processing workqueues. CPU usage of any one component on ckpool is currently less than 5% for 2500 clients, but even if the pool was completely CPU bound at 100% it should still perform fine. If we get to 50 thousand clients I'll be able to see where the next bottleneck is and concentrate further improvements there. In the meantime, more work needs to be done to ckdb to address its memory usage to be suitable to support ckpool's growth and that's what Kano is currently working on.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: norgan on November 07, 2014, 03:47:45 AM
ok so firstly, my linux skills are not as good as my windows skills, i've compiled ckpool and bitcoind. i am trying to set up the web interface, i point apache to the http directory but get forbidden. apache works with default site so config is good. i have chmod 755 on both http and pool directories.

What am i missing?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on November 07, 2014, 12:52:19 PM
There are 2 git folders html and pool
html is the web folder.
If you read index.php (which is only 1 line of code) it should be abundantly clear where pool goes :)

The web/db side of the pool is not designed for the non-technical, on purpose.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: norgan on November 08, 2014, 05:06:03 AM
There are 2 git folders html and pool
html is the web folder.
If you read index.php (which is only 1 line of code) it should be abundantly clear where pool goes :)

The web/db side of the pool is not designed for the non-technical, on purpose.

ok so i see that, looks to only work with db version. I wondered if it could be a way of seeing proxy stats. i'm guessing standalone proxy (-A -p) you wont get any stats other than the logs. i might have a go at getting the db set up.

Edit: ohhh of course i need to move pool to the web directory lol


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kingscrown on November 08, 2014, 05:11:32 AM
u rock man, loving your work


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on November 08, 2014, 11:44:13 AM
There are 2 git folders html and pool
html is the web folder.
If you read index.php (which is only 1 line of code) it should be abundantly clear where pool goes :)

The web/db side of the pool is not designed for the non-technical, on purpose.

ok so i see that, looks to only work with db version. I wondered if it could be a way of seeing proxy stats. i'm guessing standalone proxy (-A -p) you wont get any stats other than the logs. i might have a go at getting the db set up.

Edit: ohhh of course i need to move pool to the web directory lol
No, the web based interface is connected to ckdb.
i.e. you need to run ckpool is full mode with ckdb to be able to get full web stats out of it.

You could use the worker.php and address.php I wrote that uses Con's solo pool stats interface.
However, very much by design, ckpool itself isn't a store of mining information, just as ckdb itself isn't a work generator for a mining pool.

The separation makes for a much more powerful pool.
CKPool's job is to generate work, hand it out to miners and report the work and hash rate that the miners do.
This removes all the overhead of data storage of a pool and means ckpool concentrates on being the best that it is at handling work.

CKDB deals with all the data storage and web interface needed and thus you need ckdb also if you want all that.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: norgan on November 08, 2014, 11:47:18 AM
Thanks mate, will have a play through the week.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: bicer on November 11, 2014, 12:29:01 AM
Running ckpool as proxy. After putting into production commit as of Nov 8 my local p2pool started reporting higher dead share rate, from around 0.5G-5G to 30-40G. After removing proxy stats returned to the expected numbers. Screen shot illustrates this. Since I'm code illiterate not sure if this is due to code change and now proxy provides true stats or p2pool node and pron't work well together.
http://s22.postimg.org/z6so4m4r5/dead_share.png

edit:corrected date, rate.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on November 12, 2014, 10:26:23 AM
Running ckpool as proxy. After putting into production commit as of Nov 8 my local p2pool started reporting higher dead share rate, from around 0.5G-5G to 30-40G. After removing proxy stats returned to the expected numbers. Screen shot illustrates this. Since I'm code illiterate not sure if this is due to code change and now proxy provides true stats or p2pool node and pron't work well together.
http://s22.postimg.org/z6so4m4r5/dead_share.png

edit:corrected date, rate.
No I can't think of a mechanism for this, but you are adding another link into the chain. The purpose of adding the proxy would only be to add more miners to the one upstream p2pool connection. If you're just adding a proxy and have only one rig connected to it there really is zero advantage to adding the extra link in the chain. I would suggest setting the connection to the proxy to have a fixed diff though with a +diff extension to your username. I suggest your hashrate in GH / 1.7


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: Dimoza on December 31, 2014, 06:32:57 PM
I'm trying to run solo via the http://solo.ckpool.org/ but however just a tiny fraction of shares are accepted. Is it possible to increase prevetively the minimum difficultiy form my (miner) side? I see the +diff option was named above. However I can't fid any relevant information regarding this option. How can  I use it with my USER(i.e. BTC address) parameter?

I'm using bfgminer, if it have a sense to mention.

Thank you!


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on January 01, 2015, 04:30:00 AM
I'm trying to run solo via the http://solo.ckpool.org/ but however just a tiny fraction of shares are accepted. Is it possible to increase prevetively the minimum difficultiy form my (miner) side? I see the +diff option was named above. However I can't fid any relevant information regarding this option. How can  I use it with my USER(i.e. BTC address) parameter?

You're posting in the support thread for the ckpool software. The solo ckpool thread is here:
https://bitcointalk.org/index.php?topic=763510.620

However the quick answer is with solo mining it doesn't matter how many shares you get accepted since you don't get paid for shares at all and you only get a reward if you solve a block. Don't worry about what diff it's using since it's just an indirect marker of how hard you're mining.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on January 20, 2015, 01:15:49 AM
There has been some instability in the master git for a little while now and it's only just been resolved, apologies for the inconvenience. It took a long time to discover that the utlist macros FOREACH_SAFE are only safe for linked list deletion but not freeing of ram within the list. I've contacted the utlist author to inform him but have added a workaround in the code in the meantime and the crashes have since resolved. In addition, although no crashes were seen in the code prior to the changes, some theoretical crashes have been fixed as well, though the solo pool was running for 42 days solid before I restarted it with the new code.

Changes to the git tree:
- Added best share support/reporting per user/worker
- Pruning of old disconnected instances and dead clients' ram.
- Repaired and upgraded the stratum reconnect support to work with any valid extranonce1 sizes.

I'll be tagging this as a milestone in the near future once I confirm the stability over a longer period.

Kano has made massive changes to the ckdb code to support markers and for pplns to be more shift-like, dramatically reducing the ram usage of last instances. Once Kano commits yet more changes I will likely tag yet another milestone in short order.

As a suggestion to ckpool software users, unless you are actively watching development in the #ckpool IRC channel, you should stick to tagged milestones or you will be unaware if there is any instability in the master tree.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: ZACHM on January 27, 2015, 09:08:35 PM
I want to be able to change what pool all of my miners are pointed to easily. I assume that if I setup ckpool as a proxy and point all of miners to it, then I can use the proxy to point everything (appearing as one miner) to whatever pool I set (and failovers) in the proxy settings for ckpool.

Assuming this is all correct I attempted to build ckpool on my Ubuntu 12.04 machine (desktop installation, but essentially used as a server).

I used:

Code:
git clone https://bitbucket.org/ckolivas/ckpool.git

Now I have a directory ckpool, when I am in the directory and try:

Code:
sudo apt-get install build-essential ./configure --without-ckdb make

I get this error:

Code:
E: Command line option --without-ckdb is not understood

Am I doing something wrong?
I saw the part that says "Building from git also requires autoconf and automake" so I also tried:

Code:
sudo apt-get install build-essential autoconf automake ./autogen.sh ./configure --without-ckdb make

with the same result.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on January 27, 2015, 09:40:55 PM
Read the readme directly instead of from the bitbucket page which doesn't handle the line breaks properly. Those are separate commands.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: ZACHM on January 27, 2015, 10:15:45 PM
Thanks. I feel stupid now, I should have known that.  :)


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on January 28, 2015, 08:45:24 AM
After yet more extensive debugging and fine tuning potential issues that were leading to hangs/lockups or crashes I finally found an issue that client instances could be in the process of being dropped and received messages from them would be processed ever so slightly after the drop, triggering... well, stuff. Anyway it's fixed and finally exhibiting stability in our real world pool usage and I've tagged a new milestone M10 to indicate its suitability for use.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: FaSan on January 29, 2015, 12:19:28 PM
I still try the CKProxy. I want to congratulate for this really great software.

But I found some problems, proxy going to crash many times :

Code:
[2015-01-29 10:57:31] ckproxy connector starting
[2015-01-29 10:57:31] ckproxy generator starting
[2015-01-29 10:57:31] ckproxy generator ready
[2015-01-29 10:57:31] ckproxy stratifier starting
[2015-01-29 10:57:31] Nonce2 length 3 means proxied clients can't be >5TH each
[2015-01-29 10:57:32] ckproxy connector ready
[2015-01-29 10:57:32] ckproxy stratifier ready
[2015-01-29 11:12:22] stratifier process dead, terminating!
[2015-01-29 11:12:23] Attempting to send message dropclient=46 to non existent process stratifier with errno 3: No such process
[2015-01-29 11:12:23] Failure in send_proc from connector.c stratifier_drop_client:241 with errno 3: No such process
[2015-01-29 11:12:23] Child process received signal 15, forwarding signal to ckproxy main process
[2015-01-29 11:12:23] Parent process ckproxy received signal 15, shutting down

and

Code:
root@devel:/opt/ckpool# src/ckpool -c /opt/ckpool/ckproxy.conf -A -p
[2015-01-29 12:05:39] ckproxy stratifier starting
[2015-01-29 12:05:39] ckproxy generator starting
[2015-01-29 12:05:39] ckproxy generator ready
[2015-01-29 12:05:39] ckproxy connector starting
[2015-01-29 12:05:39] Nonce2 length 3 means proxied clients can't be >5TH each
[2015-01-29 12:05:39] ckproxy connector ready
[2015-01-29 12:05:39] ckproxy stratifier ready
*** glibc detected *** src/ckpool: corrupted double-linked list: 0x00007f5dec004f80 ***



It's compiled without DB support in Ubuntu 12.04



Thank you in advance




FaSan


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on January 30, 2015, 01:09:57 AM
I know it wasn't long ago I tagged M10 but I finally found a bug which would present the way the crashes have shown up to date and have fixed it and tagged M11.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on February 05, 2015, 10:15:11 AM
Last bit of instability seems to have been quashed with yet another race fix. M12 was tagged shortly after that fix to signify the latest stable point and now significant attention is being given to the proxy side of the code which has not been touched in quite a while and showed a lot of immaturity in the code.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: ArchitektoR on February 23, 2015, 09:10:58 PM
First of all - thanks for all your work!

Now trying to setup a test pool on testnet - and get:

Code:
[2015-02-24 00:07:45] HTTP response not ok: HTTP/1.0 401 Authorization Required
[2015-02-24 00:07:45] Reopening socket to localhost:18332
[2015-02-24 00:07:45] Failed to get valid json response to getblocktemplate
[2015-02-24 00:07:45] CRITICAL: No bitcoinds active!

Do I need extra command or config lines?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on February 23, 2015, 09:15:14 PM
First of all - thanks for all your work!

Now trying to setup a test pool on testnet - and get:

Code:
[2015-02-24 00:07:45] HTTP response not ok: HTTP/1.0 401 Authorization Required
[2015-02-24 00:07:45] Reopening socket to localhost:18332
[2015-02-24 00:07:45] Failed to get valid json response to getblocktemplate
[2015-02-24 00:07:45] CRITICAL: No bitcoinds active!

Do I need extra command or config lines?
You need to set up the rpc username and password on your bitcoind and set the same auth and password in your ckpool.conf file.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: ArchitektoR on February 23, 2015, 09:28:22 PM
You need to set up the rpc username and password on your bitcoind and set the same auth and password in your ckpool.conf file.

Looks like it was illegal characters in rpcpassword, sorry!


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: ArchitektoR on February 23, 2015, 11:04:03 PM
Now it runs fine, no errors.

But pool.status shows no hashrate:

Code:
{"runtime": 241, "lastupdate": 1424732527, "Users": 2, "Workers": 2, "Idle": 2, "Disconnected": 0}
{"hashrate1m": "0", "hashrate5m": "0", "hashrate15m": "0", "hashrate1hr": "0", "hashrate6hr": "0", "hashrate1d": "0", "hashrate7d": "0"}
{"SPS1m": 0.0, "SPS5m": 0.0, "SPS15m": 0.0, "SPS1h": 0.0}

And the test AntMiner shows all shares as rejected, zero accepted. Running on testnet.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: ArchitektoR on February 24, 2015, 06:09:14 PM
And when doing ./configure --without-ckdb

it gives this:

Code:
checking linux/un.h usability... no
checking linux/un.h presence... yes
configure: WARNING: linux/un.h: present but cannot be compiled
configure: WARNING: linux/un.h:     check for missing prerequisite headers?
configure: WARNING: linux/un.h: see the Autoconf documentation
configure: WARNING: linux/un.h:     section "Present But Cannot Be Compiled"
configure: WARNING: linux/un.h: proceeding with the compiler's result
configure: WARNING:     ## --------------------------------- ##
configure: WARNING:     ## Report this to kernel@kolivas.org ##
configure: WARNING:     ## --------------------------------- ##
checking for linux/un.h... no

And when cat config.log | grep linux

Code:
configure:12878: checking linux/un.h usability
/usr/include/linux/un.h:7:2: error: unknown type name 'sa_family_t'
| #include <linux/un.h>
configure:12878: checking linux/un.h presence
configure:12878: WARNING: linux/un.h: present but cannot be compiled
configure:12878: WARNING: linux/un.h:     check for missing prerequisite headers?
configure:12878: WARNING: linux/un.h: see the Autoconf documentation
configure:12878: WARNING: linux/un.h:     section "Present But Cannot Be Compiled"
configure:12878: WARNING: linux/un.h: proceeding with the compiler's result
configure:12878: checking for linux/un.h
ac_cv_build=i686-pc-linux-gnu
ac_cv_header_linux_un_h=no
ac_cv_host=i686-pc-linux-gnu
ac_cv_target=i686-pc-linux-gnu
lt_cv_path_LD=/usr/i686-pc-linux-gnu/bin/ld

Looks like something is missing, but what?

But it compiles and runs without any errors thrown.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on February 24, 2015, 08:32:56 PM
Code:
configure:12878: checking linux/un.h usability
ac_cv_build=i686-pc-linux-gnu

Looks like something is missing, but what?

But it compiles and runs without any errors thrown.
Please, it's 2015. This is 64 bit code only, but if it's working ignore the error as it's just something to do with your distribution.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: ArchitektoR on February 24, 2015, 09:00:04 PM
Please, it's 2015. This is 64 bit code only, but if it's working ignore the error as it's just something to do with your distribution.

Compiled on another system (32-bit too - so the bitness doesn't meter) - now works like a charm :-)


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: ArchitektoR on February 24, 2015, 11:53:16 PM
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?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on February 25, 2015, 01:07:18 AM
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.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: ArchitektoR on February 25, 2015, 09:53:23 AM
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.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on February 25, 2015, 10:00:07 AM
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.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: ArchitektoR on February 25, 2015, 01:38:36 PM
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 :) - will try "dreadful Russian hackers" our community help. Thanks again for your work!


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on February 26, 2015, 12:04:40 AM
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 :) - 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 :P

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

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.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: ArchitektoR on February 26, 2015, 12:31:05 AM
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 :P

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

It looks like the task to modify the code is not very difficult for a programmer/developer, but I am not a programmer myself :) 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 :) ) 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 :)


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on March 21, 2015, 06:17:54 AM
Someone calling themselves HASHPOOL found a block using the existing code :)

https://blockchain.info/tx/4eb1d6e38d5953155c6b5ca7950405c578937a42fcc37080996931a0b864bb68


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: zefir on March 23, 2015, 08:48:02 AM
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.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on March 23, 2015, 08:51:26 AM
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


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: zefir on March 23, 2015, 09:26:46 AM
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.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on March 24, 2015, 12:22:44 AM
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.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: zefir on March 24, 2015, 10:48:58 PM
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.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on March 25, 2015, 12:10:10 AM
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.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: bgibso01 on April 19, 2015, 04:23:50 AM
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.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on April 30, 2015, 10:23:41 PM
Tagged milestone M15. Numerous bugfixes and performance improvements to ckpool and significant feature upgrades to ckdb, too many to describe in detail.


Title: CKPool Quesiton
Post by: iegservers on May 12, 2015, 12:39:30 AM
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!


Title: Re: CKPool Quesiton
Post by: -ck on May 12, 2015, 12:58:45 AM
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.


Title: Re: CKPool Quesiton
Post by: iegservers on May 12, 2015, 04:28:39 PM
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.



Title: Re: CKPool Quesiton
Post by: iegservers on May 12, 2015, 04:30:07 PM
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!



Title: Re: CKPool Quesiton
Post by: kano on May 13, 2015, 10:08:36 PM
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!
... create the database ...

... and I'll add my usual comment about this:
If you need someone to tell you how to create a database and configure it and can't understand the sql/ directory then you shouldn't be running a pool.
I wont ever be supplying step by step hand holding instructions for setting up ckdb since what needs to be done there is mostly what someone who can run a pool should know how to do.

If you ask questions that show that you know what you are doing, you will get answers.
If you ask questions for hand holding, I'll ignore them.

If you are going to ask more than 1 or 2 questions, then visit IRC, since I'm also not going to spend pages posting answers here.

I'm not interested in helping someone setup a pool that is bad for the miners if the pool OP can't fully manage the pool.
We have enough scams in the community without me helping people screw over miners (intentionally or unintentionally) :P


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: PrivacyBTC on May 15, 2015, 01:12:40 PM
Its up to you

You can answer simple questions or ignore, but setup a db is not easy and some users here like me can pay for setup db pool .

if you can do it with charge it will be a solution than ignoring us .


Title: Re: CKPool Quesiton
Post by: Mikestang on May 15, 2015, 03:58:16 PM

I'm not interested in helping someone setup a pool that is bad for the miners if the pool OP can't fully manage the pool.
We have enough scams in the community without me helping people screw over miners (intentionally or unintentionally) :P

I like your style, kano.  Now if only we could do something about some of those pools that do have "bad code" (for lack of a better description) that lets miners do things that are bad for bitcoin...


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: PrivacyBTC on May 15, 2015, 08:17:12 PM
Hi Con

I spent about 10 h last night to connect but its always Failed to connect socket

I tried
localhost:8332
localhost:3333
myserverip:3333
myserverip:8332
myserverip:80
url:3333

still Failed to connect socket
No bitcoinds Active !

Im running centos 6.6

Also I cant find
bitcoin.conf  file as you said in documet

CKPOOL configuration

At least one bitcoind (aka btcd) is mandatory in ckpool mode with the minimum requirements of server, rpcuser and rpcpassword set. If no btcd is set up in the configuration, ckpool will look for a running bitcoind on the local machine on the default port 8332 and the username "user" and password "pass" set up.

At the very least you will need the following lines in your bitcoin.conf file:

Code:

server=1
rpcuser=user
rpcpassword=pass
rpcallowip=127.0.0.1


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: Gws24 on May 15, 2015, 08:21:08 PM
Bitcoind doesn't automatically create bitcoin.conf when you install it so you have to create one yourself. Make a new text file (with any text editor) and put in those lines. Then save it as bitoin.conf and put it in the bitcoin data directory.

Watch the extension of the file; it needs to be exactly bitcoin.conf and not for example bitcoin.conf.txt


edit: if your bitcoind is running on another pc then ckpool you'll have to put in 'rpcallowip=ip of ckpool pc' as well

edit: and for the port you might want to add 'rpcport=8332'. You can look at https://en.bitcoin.it/wiki/Running_Bitcoin#Bitcoin.conf_Configuration_File for all the options


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: PrivacyBTC on May 15, 2015, 08:52:46 PM
Thank you very much

I'm creating it now .

I really appreciate your reply.

Thanks


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: Mikestang on May 15, 2015, 09:02:02 PM

server=1
rpcuser=user
rpcpassword=pass
rpcallowip=127.0.0.1

Be sure to use a secure rpc username and password, like the one Bitcoind generates.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: PrivacyBTC on May 15, 2015, 09:14:03 PM
Thanks Mikestang


Title: Re: CKPool Quesiton
Post by: iegservers on May 16, 2015, 05:16:30 PM
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!
... create the database ...

... and I'll add my usual comment about this:
If you need someone to tell you how to create a database and configure it and can't understand the sql/ directory then you shouldn't be running a pool.
I wont ever be supplying step by step hand holding instructions for setting up ckdb since what needs to be done there is mostly what someone who can run a pool should know how to do.

If you ask questions that show that you know what you are doing, you will get answers.
If you ask questions for hand holding, I'll ignore them.

If you are going to ask more than 1 or 2 questions, then visit IRC, since I'm also not going to spend pages posting answers here.

I'm not interested in helping someone setup a pool that is bad for the miners if the pool OP can't fully manage the pool.
We have enough scams in the community without me helping people screw over miners (intentionally or unintentionally) :P


Its already been taken care of.  It is now up and running.. btw.. love the Findshare&&EveroneDie! :)


Title: Re: CKPool Quesiton
Post by: kano on May 18, 2015, 12:08:30 AM
...
Its already been taken care of.  It is now up and running.. btw.. love the Findshare&&EveroneDie! :)
Yeah all the main loops in all the threads, and the db loading at the start, check 'everyone_die'
It's a simple trigger to shut down in a tidy manner - once they all say they've finished, it then completes the (unnecessary) code shutdown of freeing all the ram and disconnecting.

There's a main loop that checks if 'everyone is dead' and reports every few seconds who isn't finished yet so you can see on shutdown if a thread has locked up for some unexpected reason, and which thread it is - and a Ctrl-C will simply kill it all then and there.
i.e. you can decide if it doesn't matter to hit Ctrl-C now and kill it during an unexpected shutdown failure
- rather than the code killing everything when you send a terminate message, and threads not having a chance to finish their current action

I do lots of updates to ckdb quite regularly - so if you want to stay up to date with it, it's best to idle in the #ckpool IRC to know when I make changes and ask if you need to know if there's any steps required with a change
e.g. the recent change to no longer storing sharesummaries in the permanent DB means you can:
 delete * from sharesummary; vacuum sharesummary;
since the leftover data in there is no longer needed

Watch out for disk space, the hourly logs can get big fast if you have a lot of shares coming in.
- also note you can compress the ckpool logs/ckdb2*.log files and the ckdb reload will still reload them, use any of: lrzip, bzip2 or gzip
... but don't compress the current one while it's still being written to or the hour in it's UTC name is current :)
all other log files can of course be compressed as and when you like since ckdb doesn't need to read them


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: tl121 on May 20, 2015, 05:00:44 PM
I have been running a bunch of S3+ to BTC Guild and solo.ckpool.  The other day I installed ckproxy to combine all my miners into one connection. This is working well, with essentially the same hash rate at the pools as before.  However, my individual miners are showing 10 - 13 % rejected shares and around 1% stales.  I am curious as to why I am getting these errors or if anyone else sees similar errors.

I am using standard configuration of ckproxy.  The miners are using August, 2014 firmware, with cgminer updated to 4.6.0.



Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: jowo88 on June 02, 2015, 12:59:42 PM
Runing ckpool without ckdb on my vps one week,but every 2-3 hour showing error ,,

Code:
[2015-06-02 08:20:54] Failed to read socket line in json_rpc_call 
[2015-06-02 08:20:54] Reopening socket to 127.0.0.1:8332                                                           
[2015-06-02 08:20:54] Failed to get valid json response to getblocktemplate                                             
[2015-06-02 08:20:54] Failed to get block template from 127.0.0.1:8332                                                 
[2015-06-02 08:20:54] Killing server                                                                                   
[2015-06-02 08:20:54] Generator returned failure in update_base                                                       
[2015-06-02 08:20:57] Failed over to bitcoind:

My vps spec
Ram 4Gb swap 4 Gb
bitcoind version 0.10.1


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on June 02, 2015, 03:09:37 PM
You need more resources for bitcoind or protect it from the bitcoin network
It's god awful resource hungry and on occasions when you are getting spammed with transactions, it wont reply for quite a while.
I've spent a lot of time over the past 4 days dealing with bitcoin problems and making sure (in advance) that the 2 blocks my pool found over that time weren't orphans ...


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: jowo88 on June 02, 2015, 03:56:23 PM
You need more resources for bitcoind or protect it from the bitcoin network
It's god awful resource hungry and on occasions when you are getting spammed with transactions, it wont reply for quite a while.
I've spent a lot of time over the past 4 days dealing with bitcoin problems and making sure (in advance) that the 2 blocks my pool found over that time weren't orphans ...

Thank you for answer sir,,but on my control panel show like this
Code:
Memory Usage	
20% 836.71 MB of 4 GB Used / 3.18 GB Free
VSwap Usage
5% 193.13 MB of 4 GB Used / 3.81 GB Free

Peer connected above 40,so with my problems like that,it's safe for solo mining or not sir...last day i was sending 1200Th and seems no problem,,but when i check ckpool.log showing error  ;D


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on June 02, 2015, 10:28:29 PM
You need to look at bitcoind not ckpool.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: jowo88 on June 04, 2015, 03:41:19 PM
You need more resources for bitcoind or protect it from the bitcoin network
It's god awful resource hungry and on occasions when you are getting spammed with transactions, it wont reply for quite a while.
I've spent a lot of time over the past 4 days dealing with bitcoin problems and making sure (in advance) that the 2 blocks my pool found over that time weren't orphans ...

Look at this address sir,, make me confuse https://blockchain.info/address/1CD523oyvmb9QVyABc1uu9Zt9ovjPzXV7h

Maybe this attack the network?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: PrivacyBTC on June 07, 2015, 07:06:04 PM
My Pool Now is Online :))))

Thank You CK for your effort , Your ckpool now connected to bitcoind.

It's take about 14 days , more than 30 issues fixed until i seen my miners online and worked to my pool .

Actually it takes this period due to low resources on internet to running this kind of programs , Also my linux knowledge not so good .

I run bitcoind on windows server 2012  5G Ram 4 Processor

Running ckpool on centos   3g Ram .

Now Trying to fix Internal Server Error in webserver to got stats but ckpool.log is working fine for me as privet pool .

Now I don't care to spent 6 btc renting hash to my pool expect for orphans race .

Finlay Thanks very much you CK and Kano .
I ll be happy to know donation address to support this develop .

Regards


I got this Error every 10 minutes and sometimes every 1 h But pool working good and accept works .

[2015-06-09 02:29:27] Failed to recv in read_socket_line with errno 11: Resource temporarily unavailable
[2015-06-09 02:29:27] Failed to read http socket lines in json_rpc_call
[2015-06-09 02:29:27] Reopening socket to 64.#####:8332
[2015-06-09 02:29:27] Failed to get valid json response to getblocktemplate
[2015-06-09 02:29:29] Failed to recv in read_socket_line with errno 11: Resource temporarily unavailable
[2015-06-09 02:29:29] Failed to read http socket lines in json_rpc_call
[2015-06-09 02:29:29] Reopening socket to 64.#####:8332
[2015-06-09 02:29:29] Failed to get valid json response to getblocktemplate
[2015-06-09 02:29:29] CRITICAL: No bitcoinds active!

Restarting Bitcoind is a pain killer then restarting ckpool it return to

root@ip-###### [/home/owner/public_html]# ckpool -A
[2015-06-09 02:40:15] Unable to parse serverurl entries as an array
[2015-06-09 02:40:15] ckpool generator starting
[2015-06-09 02:40:15] ckpool stratifier starting
[2015-06-09 02:40:15] ckpool connector starting
[2015-06-09 02:40:16] ckpool connector ready
[2015-06-09 02:40:16] ckpool stratifier ready



Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: tf315 on June 15, 2015, 05:51:13 PM
I've been using ckproxy on a Centos machine for a while to connect to Kano.is and haven't had any problems. Thanks for writing this - its nice to have one connection out instead of one per machine.

I thought I would see if one of the small project boards would work as a proxy so I compiled it on an Odroid C1 (fedora). Compiled easily with only signed/unsigned warnings and connects just fine to kano.is but I get the following error when a miner finds a share and tries to submit it:

[2015-06-13 23:36:56] Invalid json line:1 col:4 pos:4 text: NULL string argument from stratifier.c submit_share:2953
[2015-06-13 23:36:56] Attempted to send null message to generator in send_proc
[2015-06-13 23:37:00] Invalid json line:1 col:4 pos:4 text: NULL string argument from stratifier.c submit_share:2953
[2015-06-13 23:37:00] Attempted to send null message to generator in send_proc
[2015-06-13 23:37:06] Invalid json line:1 col:4 pos:4 text: NULL string argument from stratifier.c submit_share:2953
[2015-06-13 23:37:06] Attempted to send null message to generator in send_proc
[2015-06-13 23:37:12] Invalid json line:1 col:4 pos:4 text: NULL string argument from stratifier.c submit_share:2953
[2015-06-13 23:37:12] Attempted to send null message to generator in send_proc
[2015-06-13 23:37:13] Invalid json line:1 col:4 pos:4 text: NULL string argument from stratifier.c submit_share:2953
[2015-06-13 23:37:13] Attempted to send null message to generator in send_proc
[2015-06-13 23:37:17] Invalid json line:1 col:4 pos:4 text: NULL string argument from stratifier.c submit_share:2953
[2015-06-13 23:37:17] Attempted to send null message to generator in send_proc

Any ideas on what could cause this?

I have it running right now without any miners attached and the log just has standard messages (0 hashrate and block hash change messages). When miners attach, they show share submitals, etc so it looks OK on that side. But proxy has the errors above and the pool doesn't show the shares since I'm sure they're not getting submitted.

Thanks


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on June 15, 2015, 09:58:59 PM

I thought I would see if one of the small project boards would work as a proxy so I compiled it on an Odroid C1 (fedora). Compiled easily with only signed/unsigned warnings and connects just fine to kano.is but I get the following error when a miner finds a share and tries to submit it:
32bit processor? There's no 32 bit support in ckpool code.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: tf315 on June 15, 2015, 10:58:38 PM

I thought I would see if one of the small project boards would work as a proxy so I compiled it on an Odroid C1 (fedora). Compiled easily with only signed/unsigned warnings and connects just fine to kano.is but I get the following error when a miner finds a share and tries to submit it:
32bit processor? There's no 32 bit support in ckpool code.

Understood - but I thought I saw a message earlier that someone had compiled it on a 32bit processor and it worked. I expected it wouldn't compile if that were the issue but it does and connects to kano.is with no problem. Just can't submit any shares.

I'll drop the experiment. Thought a simple, cheap, power efficient proxy would be good to run vs having it on one of my servers. It would be good to have a redundant, backup proxy.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: bgibso01 on June 24, 2015, 09:29:27 PM
I was kind of curious before trying to install CKPool to play around with.  What kind of share logs does it produce or the format of them?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on June 24, 2015, 11:12:40 PM
I was kind of curious before trying to install CKPool to play around with.  What kind of share logs does it produce or the format of them?
By default it doesn't log shares unless you enable the -L | --log-shares option.

If you do enable share logging it creates subdirectories for each stratum work update and a sharelog entry, eg:
logs/00058798/558b38ff00000000.sharelog     

each share is logged and looks like this:

Code:
{"workinfoid": 6164083182854471680, "enonce1": "00398b55", "clientid": 1, "createinet": "localhost:3333", "workername": "a", "createdate": "1435187472,294148559", "nonce2": "030000", "ntime": "558b38ff", "diff": 1.0, "result": true, "nonce": "9ffc0151", "hash": "00000000b2768b34f5af2ddcb197fbb8e30e2f2cdf9052bc23884de4fe6e86b1", "sdiff": 1.4344486271514834, "errn": 0, "createby": "code", "createcode": "parse_submit", "username": "a"}  


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: bgibso01 on June 25, 2015, 12:54:19 AM
I was kind of curious before trying to install CKPool to play around with.  What kind of share logs does it produce or the format of them?
By default it doesn't log shares unless you enable the -L | --log-shares option.

If you do enable share logging it creates subdirectories for each stratum work update and a sharelog entry, eg:
logs/00058798/558b38ff00000000.sharelog     

each share is logged and looks like this:

Code:
{"workinfoid": 6164083182854471680, "enonce1": "00398b55", "clientid": 1, "createinet": "localhost:3333", "workername": "a", "createdate": "1435187472,294148559", "nonce2": "030000", "ntime": "558b38ff", "diff": 1.0, "result": true, "nonce": "9ffc0151", "hash": "00000000b2768b34f5af2ddcb197fbb8e30e2f2cdf9052bc23884de4fe6e86b1", "sdiff": 1.4344486271514834, "errn": 0, "createby": "code", "createcode": "parse_submit", "username": "a"}  

Thanks for the post.  That was exactly what I wanted to know.  For my own playing around, I didn't want to have to deal with a database.  The logs look like they would be fine for importing csv info to calc if I wanted.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on June 25, 2015, 03:42:31 AM
... or you can just read the hourly logs/ckdbYYYYMMDDHH.log files that ckpool can create.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: bgibso01 on June 27, 2015, 01:21:58 AM
Ok, since there's no such thing as stupid questions... :)

Can a pool get it's block info from any node that's port 8333 is open?  I realize most run their own node, but just curious.

Heading over to page 1 again in case it states it there.

Edit:  Ok, guess not.  Pools look at 8332?

Maybe I'm missing something, but why wouldn't we want pools to be able to get info from any node?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on June 27, 2015, 01:52:58 AM
Well the answer is 2 fold ...

Indeed why would such a restriction exist? It doesn't. Look at the sample ckpool.conf
https://bitbucket.org/ckolivas/ckpool/src/580cf3a2b29a2a5e585cc3fb86fb6bf3ac86fef4/ckpool.conf?at=master
The first thing in there ... "btcd"

However, going remote to do getblocktemplate? Youch.

GBT is (lack of) designed for local access only.
https://github.com/bitcoin/bitcoin/issues/1985#issuecomment-10061729

If you start adding extra delays to work generation - that would be a bad idea.

A pool should have a local bitcoind.
If you are trying to run a pool on low performance hardware, then expect to lose out because of that.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: bgibso01 on June 27, 2015, 02:14:44 AM
Thanks.  Agreed.  Was just wondering if it would make more sense for a high speed node network.  But the more I think about it, the less centralized it becomes and that doesn't seem like a good thing.  I really like the implementation of CKPool.  I was running a full node earlier, but my cap is 350gb and with the household, I come really close to that with one running.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: TimSweat on July 12, 2015, 07:30:30 AM
Think I might stick my s1 on it for a few months and see if I get very very lucky . lmao , probably not but we will see .


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: achow101_alt on July 12, 2015, 10:02:16 PM
I'm trying to set up the whole thing as a test and learning experience, and when I try to start ckdb, I always get this error
Code:
check_db_version(): Select failed (7) 'ERROR:  relation "version" does not exist LINE 1: select version() as pgv,* from version;
Why? I can see that that table doesn't exist in the database. Won't ckdb set up all of its necessary tables by itself?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on July 12, 2015, 11:16:12 PM
I'm trying to set up the whole thing as a test and learning experience, and when I try to start ckdb, I always get this error
Code:
check_db_version(): Select failed (7) 'ERROR:  relation "version" does not exist LINE 1: select version() as pgv,* from version;
Why? I can see that that table doesn't exist in the database. Won't ckdb set up all of its necessary tables by itself?
There are scripts in the sql/ folder ... have a look at them.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: achow101_alt on July 12, 2015, 11:23:03 PM
I'm trying to set up the whole thing as a test and learning experience, and when I try to start ckdb, I always get this error
Code:
check_db_version(): Select failed (7) 'ERROR:  relation "version" does not exist LINE 1: select version() as pgv,* from version;
Why? I can see that that table doesn't exist in the database. Won't ckdb set up all of its necessary tables by itself?
There are scripts in the sql/ folder ... have a look at them.
Ah. I see. thanks.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: netnegar on July 13, 2015, 11:18:48 AM
Dear All

I configured the ckpool and it is work right .
But I have a problem with web interface .
I appreciate if someone provide me a web configuration manual
or how we can connect the interface to ckpool

Regards


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: dogedood on July 17, 2015, 07:00:21 AM
While running some tests on the pool software, I see lots of clients being dropped.

What do you make of this:

[2015-07-17 02:33:05.328] Client id 753 fd 22 RDHUP in epoll
[2015-07-17 02:33:05.329] Connector dropped client 753 fd 22
[2015-07-17 02:33:05.329] Opened client path /tmp/ckpool/stratifier successfully on socket 14
[2015-07-17 02:33:05.329] Closing file handle 14
[2015-07-17 02:33:05.329] Closing file handle 9
[2015-07-17 02:33:05.329] Connector recycling client 750
[2015-07-17 02:33:05.329] Closing file handle 744
[2015-07-17 02:33:05.329] Stratifier received request: dropclient=753
[2015-07-17 02:33:05.329] Stratifier asked to drop client 753
[2015-07-17 02:33:05.329] Dropped client 753 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Is this normal behavior or a problem?



Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on July 17, 2015, 11:43:28 AM
While running some tests on the pool software, I see lots of clients being dropped.

What do you make of this:

[2015-07-17 02:33:05.328] Client id 753 fd 22 RDHUP in epoll
[2015-07-17 02:33:05.329] Connector dropped client 753 fd 22
[2015-07-17 02:33:05.329] Opened client path /tmp/ckpool/stratifier successfully on socket 14
[2015-07-17 02:33:05.329] Closing file handle 14
[2015-07-17 02:33:05.329] Closing file handle 9
[2015-07-17 02:33:05.329] Connector recycling client 750
[2015-07-17 02:33:05.329] Closing file handle 744
[2015-07-17 02:33:05.329] Stratifier received request: dropclient=753
[2015-07-17 02:33:05.329] Stratifier asked to drop client 753
[2015-07-17 02:33:05.329] Dropped client 753 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Is this normal behavior or a problem?


If your clients are disconnecting, they're disconnecting from their end... there's nothing a pool can do to force them to stay connected.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: dogedood on July 17, 2015, 04:22:45 PM
Ok, thank you.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: nicklello on August 07, 2015, 12:25:43 PM
Slightly off-topic; but is there a list of known public ckpool pools that can be used as upstream pools for private pools ?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on August 07, 2015, 12:41:17 PM
Slightly off-topic; but is there a list of known public ckpool pools that can be used as upstream pools for private pools ?
I think the only two public ckpools are kano's pooled mining and my solo pooled mine; kano.is and solo.ckpool.org . I'm aware of private farms using ckpool either in pool, proxy or passthrough mode, but I'm not aware of any other public ckpools.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: loshia on August 07, 2015, 03:26:30 PM
Slightly off-topic; but is there a list of known public ckpool pools that can be used as upstream pools for private pools ?
I think the only two public ckpools are kano's pooled mining and my solo pooled mine; kano.is and solo.ckpool.org . I'm aware of private farms using ckpool either in pool, proxy or passthrough mode, but I'm not aware of any other public ckpools.
And http://tbdice.org


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on August 07, 2015, 03:32:47 PM
Slightly off-topic; but is there a list of known public ckpool pools that can be used as upstream pools for private pools ?
I think the only two public ckpools are kano's pooled mining and my solo pooled mine; kano.is and solo.ckpool.org . I'm aware of private farms using ckpool either in pool, proxy or passthrough mode, but I'm not aware of any other public ckpools.
And http://tbdice.org
Now that you mention it, I think westhash's solo pool also uses ckpool.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: loshia on August 07, 2015, 05:54:02 PM
Slightly off-topic; but is there a list of known public ckpool pools that can be used as upstream pools for private pools ?
I think the only two public ckpools are kano's pooled mining and my solo pooled mine; kano.is and solo.ckpool.org . I'm aware of private farms using ckpool either in pool, proxy or passthrough mode, but I'm not aware of any other public ckpools.
And http://tbdice.org
Now that you mention it, I think westhash's solo pool also uses ckpool.
I think so Yes they do. ...
 


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: nicklello on August 10, 2015, 07:16:07 AM
Building a pool on Debian;

Found one issue with building on Debian 8 --- I needed to modify the configure script to get the PostGres support to configure/compile.

The VM running CKProxy crashed overnight; I'm investigating what caused this....

Would it be of use if I were to provide my notes on getting a fully functional node working for inclusion in the git repo ?

Lastly, should ckpool (in pool mode) support connecting to an upstream pool as backup if the local bitcoind fails --- I tried using kano.is as backup but this did not work...



Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on August 10, 2015, 07:49:26 AM
Building a pool on Debian;

Found one issue with building on Debian 8 --- I needed to modify the configure script to get the PostGres support to configure/compile.
Works as is (of course) on Ubuntu and Fedora - no idea what the difference would be on debian.

Quote
...
Would it be of use if I were to provide my notes on getting a fully functional node working for inclusion in the git repo ?
Not for ckdb/web as I've stated a few times in here:
e.g. https://bitcointalk.org/index.php?topic=790323.msg11369243#msg11369243

Quote
Lastly, should ckpool (in pool mode) support connecting to an upstream pool as backup if the local bitcoind fails --- I tried using kano.is as backup but this did not work...
The pool is a pool, not a proxy.
What you are describing is setting up a proxy that points to both your pool and my pool.
As for when it fails over, well that depends on what happens to the pool.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: nicklello on August 12, 2015, 04:07:00 PM
Hi Kano,

Building a pool on Debian;

Found one issue with building on Debian 8 --- I needed to modify the configure script to get the PostGres support to configure/compile.
Works as is (of course) on Ubuntu and Fedora - no idea what the difference would be on debian.
Seems the GSL library in the Debian 8 repository no longer has main() ; configure needed to be told to also link in gslcblas (which is tested afterward) in order to work.... bit of a kludge on my part to get things to configure.

Quote
Quote
...
Would it be of use if I were to provide my notes on getting a fully functional node working for inclusion in the git repo ?
Not for ckdb/web as I've stated a few times in here:
e.g. https://bitcointalk.org/index.php?topic=790323.msg11369243#msg11369243
Fair enough...

Quote
Quote
Lastly, should ckpool (in pool mode) support connecting to an upstream pool as backup if the local bitcoind fails --- I tried using kano.is as backup but this did not work...
The pool is a pool, not a proxy.
What you are describing is setting up a proxy that points to both your pool and my pool.
As for when it fails over, well that depends on what happens to the pool.
I didn't think this one through properly... of course it needs to be another bitcoin server for the failover.


I have everything built and working on a single machine now..

The Systems Architect in me wants to break it all up into separate (virtual) machines;

I'd would like to setup:-
  • a VM for (walletless) bitcoin
  • a second (walletless) bitcoin server VM (if/when I go 'live') for failover
  • ckdb + postgres server
  • warm standby ckdb + failover postgres server
  • a ckpool server
  • a web server
  • a data backup server (literally just software and storage to backup to)

*however* looking at the close bindings between ckpool, ckdb and the web code is it even possible to split these onto separate machines ?

The idea is to keep everything loosely coupled to allow any component to be grown/shrunk/replaced; makes for a quick way to tear down and replace any machine that gets compromised.

Also, is any work being undertaken on the web code ? -- there are some tweaks I'd like to make but I don't want to duplicate effort.

Lastly, are you open to any tweaks being submitted as new branches / pull requests on the Bitbucket respository...


Regards,
Nick


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on August 12, 2015, 09:48:57 PM
Building a pool on Debian;

Found one issue with building on Debian 8 --- I needed to modify the configure script to get the PostGres support to configure/compile.
...
Seems the GSL library in the Debian 8 repository no longer has main() ; configure needed to be told to also link in gslcblas (which is tested afterward) in order to work.... bit of a kludge on my part to get things to configure.
Then see how -ck did it for postgresql and do something similar and submit a change for configure.ac

*however* looking at the close bindings between ckpool, ckdb and the web code is it even possible to split these onto separate machines ?

The idea is to keep everything loosely coupled to allow any component to be grown/shrunk/replaced; makes for a quick way to tear down and replace any machine that gets compromised.
They use linux sockets, so yeah not really possible with ckdb <-> ckpool with the current code.

The bitcoind needs to be REAL close since block changes need to be as fast as possible.
Block changes and sending out new work on a block change is so important on any pool, though it would seem that a lot of people can't understand that and mine on slow block change pools ... ... ... their loss.

Sooner or later (in the distant future? :) ) I'll write a separate (tiny) program as a standard socket that sits in front of ckdb, then it's only a matter of changing some of socket.php to talk to ckdb 'remotely' - i.e. web can be anywhere then.

Quote
Also, is any work being undertaken on the web code ? -- there are some tweaks I'd like to make but I don't want to duplicate effort.
? I don't commit often enough ??

Quote
Lastly, are you open to any tweaks being submitted as new branches / pull requests on the Bitbucket respository...

Regards,
Nick
Of course, but also you are best to have your own git fork (as I'm sure you do already) so that if you submit changes that aren't what I want, you still have your own version.

As I mentioned in the link before, asking in IRC is best regarding lots of questions.

There is a very long list of changes that I keep adding new ones to the list (that I write down any time I think of something) - for all sorts of reasons for each - some minor and some major :)


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: ldp on September 09, 2015, 04:53:13 PM

I have the same problem building (with ckdb) on Debian :

Error: Required library gsl-dev not found. Install it or disable support with --without-ckdb

What changes are needed to enable the build ?

Thanks


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on September 09, 2015, 09:48:29 PM

I have the same problem building (with ckdb) on Debian :

Error: Required library gsl-dev not found. Install it or disable support with --without-ckdb

What changes are needed to enable the build ?

Thanks
I updated the README a week ago and it shows the ubuntu requirements for gsl.
You'll have to work out how to translate that to debian if debian has different package names.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: goodgryphon on September 15, 2015, 03:08:59 AM
how do you know if u find a block solo mining solo.ckpool, my ant says it found a block but how do i confirm this?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: tokona44 on September 22, 2015, 10:36:42 PM
Question, can i use CKPOOL files to set up my own private pool on a raspberry pi to mine Peercoin solo with rent and home hash?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on September 22, 2015, 11:38:09 PM
Question, can i use CKPOOL files to set up my own private pool on a raspberry pi to mine Peercoin solo with rent and home hash?
No idea - we don't support any sort of alt-coin mining at all and no point asking questions about it here.

However, any mining needs a full fledged, high performance, hacked bitcoind ... so yeah that, oddly enough, wont run on an rpi.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: tokona44 on September 22, 2015, 11:57:38 PM
Question, can i use CKPOOL files to set up my own private pool on a raspberry pi to mine Peercoin solo with rent and home hash?
No idea - we don't support any sort of alt-coin mining at all and no point asking questions about it here.

However, any mining needs a full fledged, high performance, hacked bitcoind ... so yeah that, oddly enough, wont run on an rpi.
Yea ok np, was just thinking its a sha256 coin. But can i run a bitcoin-qt wallet on a rpi and mine solo on 127.0.0.1?? any way to set a stratum url for rent mining to home QT? 


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on September 23, 2015, 12:44:55 AM
Question, can i use CKPOOL files to set up my own private pool on a raspberry pi to mine Peercoin solo with rent and home hash?
No idea - we don't support any sort of alt-coin mining at all and no point asking questions about it here.

However, any mining needs a full fledged, high performance, hacked bitcoind ... so yeah that, oddly enough, wont run on an rpi.
Yea ok np, was just thinking its a sha256 coin. But can i run a bitcoin-qt wallet on a rpi ...
I very much doubt it, but if you could, you'd be silly to mine to it coz you'd have a VERY high chance of losing blocks you mine.

Quote
However, any mining needs a full fledged, high performance, hacked bitcoind


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: tokona44 on September 23, 2015, 03:34:19 AM
Question, can i use CKPOOL files to set up my own private pool on a raspberry pi to mine Peercoin solo with rent and home hash?
No idea - we don't support any sort of alt-coin mining at all and no point asking questions about it here.

However, any mining needs a full fledged, high performance, hacked bitcoind ... so yeah that, oddly enough, wont run on an rpi.
Yea ok np, was just thinking its a sha256 coin. But can i run a bitcoin-qt wallet on a rpi ...
I very much doubt it, but if you could, you'd be silly to mine to it coz you'd have a VERY high chance of losing blocks you mine.

Quote
However, any mining needs a full fledged, high performance, hacked bitcoind
Okie dokie i trust you kano. Thanks


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: Lyddite on October 22, 2015, 08:32:37 AM
Please, it's 2015. This is 64 bit code only, but if it's working ignore the error as it's just something to do with your distribution.

Compiled on another system (32-bit too - so the bitness doesn't meter) - now works like a charm :-)

Ok... this explains the problems I have had... Whether it works on a 32 bit system depends on how you use it.


I thought I would see if one of the small project boards would work as a proxy so I compiled it on an Odroid C1 (fedora). Compiled easily with only signed/unsigned warnings and connects just fine to kano.is but I get the following error when a miner finds a share and tries to submit it:
32bit processor? There's no 32 bit support in ckpool code.

Understood - but I thought I saw a message earlier that someone had compiled it on a 32bit processor and it worked. I expected it wouldn't compile if that were the issue but it does and connects to kano.is with no problem. Just can't submit any shares.

I'll drop the experiment. Thought a simple, cheap, power efficient proxy would be good to run vs having it on one of my servers. It would be good to have a redundant, backup proxy.

I managed to compile and run using debian jessie  and
Code:
./configure --without-ckdb
with the intention of running it on an old laptop as a proxy and hoping to get some nice logs.

Did not succeed in getting the "-p" proxy to run

It would almost work but the following would appear in the logs and eventually the hashrate on the pool ( kano.is ) would drop off and it would fail to submit shares.

Code:
Invalid json line:1 col:4 pos:4 text: NULL string argument from stratifier.c submit_share:2965
Attempted to send null message to generator in send_proc

The passthrough proxy "-P" does work well in 32 bit. The hashrates add up and each worker shows up on the pool. I have used it for several weeks to combine the connections from miners on different machines.

Code:
 Failed to set json object from connector.c connector_stats:782
 Invalid json line:1 col:5 pos:5 text: NULL string argument from connector.c connector_stats:784
 Failed to set json object from connector.c connector_stats:787
 Passthrough:{"runtime": 593}

My advice to anyone ckpool/ckproxy with a 32 bit system is to experiment, test, check the logs and verify that the hashrates  correspond at all ends. Difficulty adjustments can complicate the testing.

It would be nice if everything worked without problems on 32 bit systems. Then again, I should probably ditch the old laptops. For the record, I'm running my small ckproxy on an old Compaq Evo N410, Pentium III, 1200MHz ca. 2003.  ;D


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on November 22, 2015, 08:01:10 PM
I just set up the proxy to migrate away from p2pool without having to update each miner to a new URL. There seems to be an issue if the username on the miners contains p2pool difficulty settings such as "/256+256" tacked on to the end of the username. The miners using this technique see the ckproxy as dead.
The slash is illegal in the username and pointless to use with p2pool anyway. The + should work though.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: .anto. on November 29, 2015, 11:11:44 PM

I thought I would see if one of the small project boards would work as a proxy so I compiled it on an Odroid C1 (fedora). Compiled easily with only signed/unsigned warnings and connects just fine to kano.is but I get the following error when a miner finds a share and tries to submit it:
32bit processor? There's no 32 bit support in ckpool code.

Hi Con,

I don't believe that you clearly explained the requirement to use Linux amd64 for your CKPool. The only error I saw from the previous posts is the "unknown type name sa_family_t" from /usr/include/linux/un.h.

Could you please explain in detail which parts on your CKPool require Linux amd64?

The main reason I asked is that, for small VPS it is more efficient - in term of the RAM usage - to use Linux i386 instead of amd64.  So it would be helpful to know the impact of compiling and running your CKPool on Linux i386.

Cheers,

Anto


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on November 29, 2015, 11:16:33 PM
Hi Con,

I don't believe that you clearly explained the requirement to use Linux amd64 for your CKPool. The only error I saw from the previous posts is the "unknown type name sa_family_t" from /usr/include/linux/un.h.

Could you please explain in detail which parts on your CKPool require Linux amd64?

The main reason I asked is that, for small VPS it is more efficient - in term of the RAM usage - to use Linux i386 instead of amd64.  So it would be helpful to know the impact of compiling and running your CKPool on Linux i386.

Cheers,

Anto
The answer is I don't care so I've not bothered to make sure the code is fine on 32bit architectures and I don't want to care. You have your priorities wrong if you are worried about that on a pool.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on November 29, 2015, 11:17:50 PM
I'm really not sure how a 32bit OS can be more efficient on 64bit hardware ...

Edit: ... and I'll add that mining requires 64bit math quite a bit ... since 4billion really isn't a big enough number :)
So all that code would be slower.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: .anto. on November 29, 2015, 11:35:24 PM
Hi Con,

I don't believe that you clearly explained the requirement to use Linux amd64 for your CKPool. The only error I saw from the previous posts is the "unknown type name sa_family_t" from /usr/include/linux/un.h.

Could you please explain in detail which parts on your CKPool require Linux amd64?

The main reason I asked is that, for small VPS it is more efficient - in term of the RAM usage - to use Linux i386 instead of amd64.  So it would be helpful to know the impact of compiling and running your CKPool on Linux i386.

Cheers,

Anto
The answer is I don't care so I've not bothered to make sure the code is fine on 32bit architectures and I don't want to care. You have your priorities wrong if you are worried about that on a pool.
I clearly didn't ask or demanded that you should make sure your code run on i386. I just asked which parts rely on amd64. So never mind then.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: .anto. on November 30, 2015, 08:35:14 AM
I'm really not sure how a 32bit OS can be more efficient on 64bit hardware ...

Edit: ... and I'll add that mining requires 64bit math quite a bit ... since 4billion really isn't a big enough number :)
So all that code would be slower.

I am not a programmer and I know very little about 32bit vs 64bit programs. However, some years ago when I started to rent VPS for my private web site, I did some readings and testing myself. I have made the conclusion that Linux i386 is more efficient in using the RAM than Linux amd64. Somebody did more thorough tests than me and posted the results on this web page (http://askubuntu.com/questions/7034/what-are-the-differences-between-32-bit-and-64-bit-and-which-should-i-choose), if you wanted to know that.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on November 30, 2015, 03:38:14 PM
As I already implied, the software is full of 64bit maths and that will produce a noticeable difference, as will having double the registers in general code.

... and you will find that 5 year old link quite outdated now ... comments about not everyone having 64bit processors and "fewer issues" with 32bit are now wrong.
It's the other way around, fewer issues with 64bit and I'm not sure you can even find 32bit processors online any more.
If you can, you've been given old dodgy hardware.

Now the most relevant point ... if you want to run a pool, and you are trying to skimp on hardware, be well aware that you may lose blocks.
You need a bitcoind, and running one on a small vps is a problem waiting to happen.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: .anto. on November 30, 2015, 04:53:25 PM
As I already implied, the software is full of 64bit maths and that will produce a noticeable difference, as will having double the registers in general code.

... and you will find that 5 year old link quite outdated now ... comments about not everyone having 64bit processors and "fewer issues" with 32bit are now wrong.
It's the other way around, fewer issues with 64bit and I'm not sure you can even find 32bit processors online any more.
If you can, you've been given old dodgy hardware.
I am quite sure that I didn't mention anything related to 32bit processors. My questions are clearly related to the use CKPool software on VPS with Linux i386, which are still very easy to get from all Linux distros or compile it ourselves. All VPS' definitely use 64bit capable processors.

Now the most relevant point ... if you want to run a pool, and you are trying to skimp on hardware, be well aware that you may lose blocks.
You need a bitcoind, and running one on a small vps is a problem waiting to happen.
Again, I am not asking anything outside running CKPool software on VPS with Linux i386. I know the impact of running bitcoind on VPS with RAM less than 2GB as I experience the issues myself, e.g. bitcoind regularly crashes. So I have the full node running on a real hardware with a Quad Core 2 GHz each and 8 GB RAM. However, the bandwidth of the link of the full node is asymmetric. So I want to have the pool software on the VPS with symmetric bandwidth to be able to better manage the user connections.

Anyway, this discussion does not seem to lead anywhere. But thanks for responding to my questions.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on November 30, 2015, 10:24:57 PM
As I already implied, the software is full of 64bit maths and that will produce a noticeable difference, as will having double the registers in general code.

... and you will find that 5 year old link quite outdated now ... comments about not everyone having 64bit processors and "fewer issues" with 32bit are now wrong.
It's the other way around, fewer issues with 64bit and I'm not sure you can even find 32bit processors online any more.
If you can, you've been given old dodgy hardware.
I am quite sure that I didn't mention anything related to 32bit processors. My questions are clearly related to the use CKPool software on VPS with Linux i386, which are still very easy to get from all Linux distros or compile it ourselves. All VPS' definitely use 64bit capable processors.
Right so running i386 code on them pretends it's a 32bit processor missing all the vast gains in current 64bit processors,
the most obvious one (even mentioned at your very old link) being double the number of registers.

Quote
Now the most relevant point ... if you want to run a pool, and you are trying to skimp on hardware, be well aware that you may lose blocks.
You need a bitcoind, and running one on a small vps is a problem waiting to happen.
Again, I am not asking anything outside running CKPool software on VPS with Linux i386. I know the impact of running bitcoind on VPS with RAM less than 2GB as I experience the issues myself, e.g. bitcoind regularly crashes. So I have the full node running on a real hardware with a Quad Core 2 GHz each and 8 GB RAM. However, the bandwidth of the link of the full node is asymmetric. So I want to have the pool software on the VPS with symmetric bandwidth to be able to better manage the user connections.

Anyway, this discussion does not seem to lead anywhere. But thanks for responding to my questions.
So your design is to have a pool's main connection talking to a remote bitcoind ... sounds like a bad idea to me.
As for bandwidth, bitcoind will be higher than the pool unless you have a big pool ...


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: e46btc on December 12, 2015, 01:16:46 PM
Can someone give advice why ckdb (latest ver from git) can't connect via RPC to local bitcoind (v0.11.2) ?  

At least I am trying to setup BTC payout address in User settings (web) but got error ERR: Invalid BTC address

First time ckdb was not able to connect to standard bitcoind RPC port 8332 as it was hardcoded to 8330  in ckdb.c
Code:
char *btc_server = "http://127.0.0.1:8330";
char *btc_auth;

I've changed to 8332 and recompiled, it is connected but still no luck

Code:
[2015-12-12 13:04:28.923+00] _btc_io() btc server response not ok: HTTP/1.0 401 Authorization Required0x0d0x0aDate: Sat, 12 Dec 2015 13:04:28 +00000x0d0x0aServer: bitcoin-json-rpc/v0.11.2.0-g7e278920x0d0x0a
WWW-Authenticate: Basic realm="jsonrpc"0x0d0x0aContent-Type: text/html0x0d0x0aContent-Length: 2960x0d0x0a0x0d0x0a<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
0x0d0x0a"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">0x0d0x0a<HTML>0x0d0x0a<HEAD>0x0d0x0a<TITLE>Error</TITLE>0x0d0x0a<META HTTP-EQUIV='Content-Type'
CONTENT='text/html; charset=ISO-8859-1'>0x0d0x0a</HEAD>0x0d0x0a<BODY><H1>401 Unauthorized.</H1></BODY>0x0d0x0a</HTML>0x0d0x0a0x00
[2015-12-12 13:04:28.923+00] usersettings.userset5111.ERR.Invalid BTC address

I've tried to recompile this again w/ hardcoded username/password  in ckdb.c
Code:
char *btc_server = "http://127.0.0.1:8332";
char *btc_auth = "USER:PASS";

according to
Code:
	snprintf(buf, sizeof(buf), "%s:%s", btc_user, btc_pass);
btc_auth = http_base64(buf);

but the same result, this can't authenticate against bitcoind RPC.  

Any hints will be highly appreciated. Thanks!

ps: ckpool works fine via RPC using user/pass from ckpool.conf  , so there is no mistake in user/pass


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on December 12, 2015, 01:50:40 PM
command line:
./ckdb -p pgsqlpass -U btcuser -P btcpass -S http://127.0.0.1:8332 -m -g

https://bitbucket.org/ckolivas/ckpool/src/96d6707511de3cfcee37261a5e0516791789e1ff/src/ckdb.c?at=master&fileviewer=file-view-default#ckdb.c-5631

Edit: and of course below that:

https://bitbucket.org/ckolivas/ckpool/src/96d6707511de3cfcee37261a5e0516791789e1ff/src/ckdb.c?at=master&fileviewer=file-view-default#ckdb.c-5686

Edit2: firstly yeah you don't need to edit the code, just use the command line options
secondly, you didn't
Code:
btc_auth = http_base64(buf);


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: e46btc on December 12, 2015, 02:05:19 PM
Thank you Kano!  So easy, it works. 
I've missed command line params related to BTC  and instead of this "http://127.0.0.1:8330" string in ckdb log confused me.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: o_solo_miner on December 15, 2015, 06:54:07 PM
 ;) got it working!

Thank you both, Con & Kano.

I compiled all under Debian AMD64, no problem.
Configured first the proxy, than the rest, no problem.

That looks like your README is all I needet to come to sucsess.

All my miners goes now as 1 to cksolo.pool  ;D


You make me verry happy!

---

Next step is to get the relaynetwork working.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: hodedowe on December 24, 2015, 05:38:52 AM
Hope this helps someone else. If you get this response from the pool:

HTTP response to ( "getblock...) 0.001s not ok: HTTP/1.1 500 Internal Server Error


Then something has gone haywire with your Bitcoin core installation. It's not the pool. On one of my test machines was throwing this error with a remote core installation. I spent 2 days troubleshooting the pool and ports/etc. A simple shutdown>reinstall of bitcoin core fixed the problem.




Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: hodedowe on December 24, 2015, 03:03:37 PM
You could also just download the VMware version and run it on any machine. :)


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on January 04, 2016, 03:15:00 AM
Massive code drop into git master long overdue with many new features and improvements, mostly on the proxy and passthrough side. I've tagged milestone M18 to just before the code drop and M19 to after it, along with incrementing the version to 0.9.0. The new features are documented in the README and with sample configurations, and at some stage I'll add descriptions to this thread.


Title: Re: CKPOOL software - Free pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on January 04, 2016, 03:37:06 AM
I've quoted the opening post on ckproxy and highlighted the changes below in bold.

Ckproxy uses the same core code as ckpool and acts as a proxy with a simple switch (-p). It acts as a stratum-to-stratum proxy, or stratum-through-stratum proxy in passthrough mode (see below).

It is most useful to regular miners who wish to consolidate their mining hardware into one connection for minimal upstream/downstream bandwidth in standalone mode (with the additional -A switch). Ckproxy uses multiple modes to maintain as many miners as possible communicating with the upstream pool. It works by splitting up nonce2 sizes if the upstream pool's nonce2 is large enough and then it recruits extra upstream connections as needed to allow the number of downstream miners to scale indefinitely.

Ckproxy can be started in "userproxy" mode which monitors login names of miners attaching that don't match the master proxy username and recruits new upstream connections with each unique username, proxying all workers of the same username to the unique upstream proxy connections.

It can be configured to run with a database as per an actual pool entirely, thus acting like a child pool for a parent pool elsewhere, or simply for miners who wish full logging of every detail of their mining operation.

It can also act as a unique stratum-through-stratum passthrough mode which absolutely requires a ckpool as the parent pool with the -P switch. In this mode it does not decrease the bandwidth talking to the upstream pool but minimises the number of open connections instead, but requires extremely low resources to run. This mode is most useful for pools wishing to isolate their main pool instance from the outside world and set up multiple VPSs as a kind of front end proxy/firewall to the outside world. This also removes any realistic limit on the number of open connections since each passthrough instance could easily handle 10k connections, consolidating each into just 1 connection to the upstream pool.

In addition to the passthrough mode, there is a more advanced "node" mode which connects as a passthrough, but needs a local bitcoind connection of its own. It monitors all traffic and shares between the pool and miners, being able to display local hashrates and will submit any blocks found to the local bitcoind in addition to sending the shares to the upstream pool, circumventing the delay of block submission that would otherwise happen with remote nodes.

Finally ckproxy can be started in "redirector" mode which acts as a regular passthrough, but monitors share responses from the upstream pool, and once a valid share is recognised from the upstream pool it will redirect miners that support redirection (all cgminer based clients do) to the URL of your choice. Should the miners not support redirection, such as rental services, ckredirector will continue to act as an ordinary passthrough.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: analpaper on January 13, 2016, 01:05:10 PM
sorry lil question if possible: can we know what is the meaning of the variables tw=1 and fa=0 used in myqr.sh ?

this script doesnt exists in the repo so i rewrote it, and seems to me that this variables are just a check to see if the qr was parsed ok, but im not sure at all..

Thanks!


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on January 13, 2016, 11:55:25 PM
Basically you gotta write your own "$sfaurl" -> "qrcode"
Site works without it since it also displays a 'link' that is the "$sfaurl", just without a pretty qrcode by default.

Someone actually paid me to write the 2FA code but they think my web site sux so they have their own :P
So they didn't need my php for it, so I didn't provide the program I wrote to convert the input for the html5 in my php.
It's a completely separate program so wont be in git.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: mmpool on January 26, 2016, 05:42:23 AM
mmpool (https://bitcointalk.org/index.php?topic=559011.0) switched to using ckpool recently, from SockThing, mainly to get the benefit of variable difficulty settings for users but also to get a supported efficient codebase. We're a small pool and found the first block using the ckpool backend today.

We're not using the ckdb backend, - just ckpool. It connects to our merge mining server and the already existing pool reward system, database, etc. I wanted to minimize the integration work to try ckpool at the time. It was quite painless to integrate.

Thanks for the great software. I've sent a manual donation to the AUTHORS to help support the work.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on January 26, 2016, 05:53:23 AM
mmpool (https://bitcointalk.org/index.php?topic=559011.0) switched to using ckpool recently, from SockThing, mainly to get the benefit of variable difficulty settings for users but also to get a supported efficient codebase. We're a small pool and found the first block using the ckpool backend today.

We're not using the ckdb backend, - just ckpool. It connects to our merge mining server and the already existing pool reward system, database, etc. I wanted to minimize the integration work to try ckpool at the time. It was quite painless to integrate.

Thanks for the great software. I've sent a manual donation to the AUTHORS to help support the work.
You're most welcome. Thanks for the donation and good luck.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on January 26, 2016, 08:22:18 PM
mmpool (https://bitcointalk.org/index.php?topic=559011.0) switched to using ckpool recently, from SockThing, mainly to get the benefit of variable difficulty settings for users but also to get a supported efficient codebase. We're a small pool and found the first block using the ckpool backend today.

We're not using the ckdb backend, - just ckpool. It connects to our merge mining server and the already existing pool reward system, database, etc. I wanted to minimize the integration work to try ckpool at the time. It was quite painless to integrate.

Thanks for the great software. I've sent a manual donation to the AUTHORS to help support the work.
Thanks - very nice donation!
Now you need to start using ckdb :D
It uses truck loads of ram, but less CPU than ckpool on the same machine :)
Every so often I change something to reduce the ram requirements.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: chiguireitor on February 09, 2016, 04:23:56 AM
Was going to ask questions about constant disconnection of the clients on the proxy, but it seems it was just uplink unstability.

On another note, is there any documentation on ckpmsg? I would love to see what nifty things i can do with it/add to it...

Btw, loving your perpetual while conditions :) some Douglas Adams loving there.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on February 09, 2016, 04:30:28 AM
Was going to ask questions about constant disconnection of the clients on the proxy, but it seems it was just uplink unstability.

On another note, is there any documentation on ckpmsg? I would love to see what nifty things i can do with it/add to it...

Btw, loving your perpetual while conditions :) some Douglas Adams loving there.
Heh 42 indeed. There's no real documentation for anything ckpmsg has over and above what's in the main readme. If you can read the code you can issue direct commands to each of the main process loops provided you know the syntax but generally it's only expected people will use ckpmsg to speak to the main ckpool process which will forward on the relevant message. The other processes aren't obliged to provide a response whereas the main pool process always does as a rule.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: chiguireitor on February 09, 2016, 04:42:54 AM
...

Heh 42 indeed. There's no real documentation for anything ckpmsg has over and above what's in the main readme. If you can read the code you can issue direct commands to each of the main process loops provided you know the syntax but generally it's only expected people will use ckpmsg to speak to the main ckpool process which will forward on the relevant message. The other processes aren't obliged to provide a response whereas the main pool process always does as a rule.

Ok, will keep searching if there's some functionality already implemented for what i want to do. If i happen to add something useful, you wouldn't mind a PR?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on February 09, 2016, 04:59:31 AM
...

Heh 42 indeed. There's no real documentation for anything ckpmsg has over and above what's in the main readme. If you can read the code you can issue direct commands to each of the main process loops provided you know the syntax but generally it's only expected people will use ckpmsg to speak to the main ckpool process which will forward on the relevant message. The other processes aren't obliged to provide a response whereas the main pool process always does as a rule.

Ok, will keep searching if there's some functionality already implemented for what i want to do. If i happen to add something useful, you wouldn't mind a PR?
I always welcome outside code, but I'm very fussy...


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: chiguireitor on February 09, 2016, 05:18:04 AM
...

I always welcome outside code, but I'm very fussy...

Sure thing, i will use ckproxy for a product i'm developing, and as per the GPL i must release the source, so i'll be sure to let you know when/if i do changes.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: vh on February 10, 2016, 02:11:45 PM
quick question: do i need to wire the notifier to a bitcoind node to pick up block solve messages from upstream in proxy mode?   trying to read through the stratum protocol docs to understand it a bit more, but thought i'd just ask.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: chiguireitor on February 10, 2016, 02:37:32 PM
quick question: do i need to wire the notifier to a bitcoind node to pick up block solve messages from upstream in proxy mode?   trying to read through the stratum protocol docs to understand it a bit more, but thought i'd just ask.

From ckpool's readme:

Code:
notifier - An application designed to be run with bitcoind's -blocknotify to notify ckpool of block changes.

So you must set your blocknotify option on either bitcoind's command line or bitcoin.conf's


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: vh on February 10, 2016, 02:44:35 PM
From ckpool's readme:

Code:
notifier - An application designed to be run with bitcoind's -blocknotify to notify ckpool of block changes.

So you must set your blocknotify option on either bitcoind's command line or bitcoin.conf's

trying it out was my next step.   initially sounded like it applied only in solo mining mode, was unsure if proxy mode get broadcasts from upstream pools.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: chiguireitor on February 10, 2016, 02:49:46 PM
...
trying it out was my next step.   initially sounded like it applied only in solo mining mode, was unsure if proxy mode get broadcasts from upstream pools.

There's a stratum message that just does that, but i doubt ckproxy has a way to handle it from the command line, you could watch the log for the block hash change messages though.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on February 10, 2016, 08:29:21 PM
quick question: do i need to wire the notifier to a bitcoind node to pick up block solve messages from upstream in proxy mode?   trying to read through the stratum protocol docs to understand it a bit more, but thought i'd just ask.
Bitcoind is not used at all in proxy modes except for node mode.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: Subw on February 13, 2016, 11:34:30 PM
Code:
[2016-02-13 20:44:15.742] Proxy 1:stratum+tcp://stratum.f2pool.com:3333 failed, attempting reconnect
[2016-02-13 20:44:20.742] Proxy 1:stratum+tcp://stratum.f2pool.com:3333 recovered
[2016-02-13 20:57:25.442] Proxy 0:stratum+tcp://sha256.eu.nicehash.com:3334 recovered
[2016-02-13 20:57:25.442] Successfully connected to pool 0 stratum+tcp://sha256.eu.nicehash.com:3334 as proxy
[2016-02-13 20:59:30.354] Proxy 1:stratum+tcp://stratum.f2pool.com:3333 reconnect issue to zombies.f2pool.com:3333, dropping existing connection
[2016-02-13 20:59:30.354] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-13 20:59:35.354] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-13 21:01:55.891] Proxy 0:stratum+tcp://sha256.eu.nicehash.com:3334 reconnect issue to stratum+tcp://sha256.eu.nicehash.com:3334, dropping existing connection
[2016-02-13 21:01:55.891] Proxy 0:stratum+tcp://sha256.eu.nicehash.com:3334 failed, attempting reconnect
[2016-02-13 21:01:55.892] Successfully connected to pool 1 zombies.f2pool.com:3333 as proxy
[2016-02-13 21:02:00.892] Proxy 0:stratum+tcp://sha256.eu.nicehash.com:3334 recovered
[2016-02-13 21:02:00.892] Successfully connected to pool 0 stratum+tcp://sha256.eu.nicehash.com:3334 as proxy
[2016-02-13 21:08:56.245] Proxy 0:stratum+tcp://sha256.eu.nicehash.com:3334 failed, attempting reconnect
[2016-02-13 21:08:56.245] Successfully connected to pool 1 zombies.f2pool.com:3333 as proxy
[2016-02-13 21:20:20.762] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-13 21:20:25.763] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-13 21:40:31.450] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-13 21:40:36.450] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-13 22:01:31.443] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-13 22:01:36.443] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-13 22:22:30.755] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-13 22:22:35.755] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-13 22:42:48.924] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-13 22:42:53.924] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-13 23:03:09.367] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-13 23:03:14.368] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-13 23:25:08.741] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-13 23:25:13.741] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-13 23:45:31.433] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-13 23:45:36.433] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-14 00:06:11.522] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-14 00:06:16.522] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-14 00:26:31.409] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-14 00:26:36.409] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-14 00:46:48.799] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-14 00:46:53.799] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-14 00:57:21.523] Proxy 0:stratum+tcp://sha256.eu.nicehash.com:3334 recovered
[2016-02-14 00:57:21.524] Successfully connected to pool 0 stratum+tcp://sha256.eu.nicehash.com:3334 as proxy
[2016-02-14 01:04:16.722] Proxy 0:stratum+tcp://sha256.eu.nicehash.com:3334 failed, attempting reconnect
[2016-02-14 01:04:16.723] Successfully connected to pool 1 zombies.f2pool.com:3333 as proxy
[2016-02-14 01:08:28.734] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-14 01:08:33.734] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-14 01:28:48.041] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-14 01:28:53.041] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-14 01:49:08.817] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-14 01:49:13.817] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-14 02:09:28.039] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-14 02:09:33.039] Proxy 1:zombies.f2pool.com:3333 recovered

Code:
[2016-02-14 02:36:43.014] ckproxy generator starting
[2016-02-14 02:36:43.015] ckproxy connector starting
[2016-02-14 02:36:43.015] ckproxy connector ready
[2016-02-14 02:36:43.015] ckproxy stratifier starting
[2016-02-14 02:36:43.015] ckproxy stratifier ready
[2016-02-14 02:36:43.517] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 connection established
[2016-02-14 02:36:43.572] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 02:36:44.025] Successfully connected to pool 0 stratum+tcp://eu-01.miningrigrentals.com:3333 as proxy
[2016-02-14 02:36:44.025] ckproxy generator ready
[2016-02-14 02:36:48.572] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 02:36:48.572] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 02:36:53.573] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 02:36:53.573] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 02:36:58.573] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 02:36:58.573] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 02:37:03.573] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 02:37:03.573] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 02:37:08.574] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 02:37:08.574] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 02:37:13.574] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 02:37:13.574] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 02:37:18.574] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 02:37:18.574] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 02:37:23.574] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 02:37:23.574] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 02:37:28.574] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 02:37:28.575] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect


why do i have so many reconnects? i belive my connection is not a problem here


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on February 14, 2016, 12:23:33 AM
Code:
[2016-02-13 20:44:15.742] Proxy 1:stratum+tcp://stratum.f2pool.com:3333 failed, attempting reconnect
[2016-02-13 20:44:20.742] Proxy 1:stratum+tcp://stratum.f2pool.com:3333 recovered
[2016-02-13 20:57:25.442] Proxy 0:stratum+tcp://sha256.eu.nicehash.com:3334 recovered
[2016-02-13 20:57:25.442] Successfully connected to pool 0 stratum+tcp://sha256.eu.nicehash.com:3334 as proxy
[2016-02-13 20:59:30.354] Proxy 1:stratum+tcp://stratum.f2pool.com:3333 reconnect issue to zombies.f2pool.com:3333, dropping existing connection
[2016-02-13 20:59:30.354] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-13 20:59:35.354] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-13 21:01:55.891] Proxy 0:stratum+tcp://sha256.eu.nicehash.com:3334 reconnect issue to stratum+tcp://sha256.eu.nicehash.com:3334, dropping existing connection
[2016-02-13 21:01:55.891] Proxy 0:stratum+tcp://sha256.eu.nicehash.com:3334 failed, attempting reconnect
[2016-02-13 21:01:55.892] Successfully connected to pool 1 zombies.f2pool.com:3333 as proxy
[2016-02-13 21:02:00.892] Proxy 0:stratum+tcp://sha256.eu.nicehash.com:3334 recovered
[2016-02-13 21:02:00.892] Successfully connected to pool 0 stratum+tcp://sha256.eu.nicehash.com:3334 as proxy
[2016-02-13 21:08:56.245] Proxy 0:stratum+tcp://sha256.eu.nicehash.com:3334 failed, attempting reconnect
[2016-02-13 21:08:56.245] Successfully connected to pool 1 zombies.f2pool.com:3333 as proxy
[2016-02-13 21:20:20.762] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-13 21:20:25.763] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-13 21:40:31.450] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-13 21:40:36.450] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-13 22:01:31.443] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-13 22:01:36.443] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-13 22:22:30.755] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-13 22:22:35.755] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-13 22:42:48.924] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-13 22:42:53.924] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-13 23:03:09.367] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-13 23:03:14.368] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-13 23:25:08.741] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-13 23:25:13.741] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-13 23:45:31.433] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-13 23:45:36.433] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-14 00:06:11.522] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-14 00:06:16.522] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-14 00:26:31.409] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-14 00:26:36.409] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-14 00:46:48.799] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-14 00:46:53.799] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-14 00:57:21.523] Proxy 0:stratum+tcp://sha256.eu.nicehash.com:3334 recovered
[2016-02-14 00:57:21.524] Successfully connected to pool 0 stratum+tcp://sha256.eu.nicehash.com:3334 as proxy
[2016-02-14 01:04:16.722] Proxy 0:stratum+tcp://sha256.eu.nicehash.com:3334 failed, attempting reconnect
[2016-02-14 01:04:16.723] Successfully connected to pool 1 zombies.f2pool.com:3333 as proxy
[2016-02-14 01:08:28.734] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-14 01:08:33.734] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-14 01:28:48.041] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-14 01:28:53.041] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-14 01:49:08.817] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-14 01:49:13.817] Proxy 1:zombies.f2pool.com:3333 recovered
[2016-02-14 02:09:28.039] Proxy 1:zombies.f2pool.com:3333 failed, attempting reconnect
[2016-02-14 02:09:33.039] Proxy 1:zombies.f2pool.com:3333 recovered

Code:
[2016-02-14 02:36:43.014] ckproxy generator starting
[2016-02-14 02:36:43.015] ckproxy connector starting
[2016-02-14 02:36:43.015] ckproxy connector ready
[2016-02-14 02:36:43.015] ckproxy stratifier starting
[2016-02-14 02:36:43.015] ckproxy stratifier ready
[2016-02-14 02:36:43.517] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 connection established
[2016-02-14 02:36:43.572] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 02:36:44.025] Successfully connected to pool 0 stratum+tcp://eu-01.miningrigrentals.com:3333 as proxy
[2016-02-14 02:36:44.025] ckproxy generator ready
[2016-02-14 02:36:48.572] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 02:36:48.572] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 02:36:53.573] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 02:36:53.573] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 02:36:58.573] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 02:36:58.573] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 02:37:03.573] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 02:37:03.573] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 02:37:08.574] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 02:37:08.574] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 02:37:13.574] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 02:37:13.574] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 02:37:18.574] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 02:37:18.574] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 02:37:23.574] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 02:37:23.574] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 02:37:28.574] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 02:37:28.575] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect


why do i have so many reconnects? i belive my connection is not a problem here
Why blame the code? Your "pools" are disconnecting you, probably because you're idle. They look like they have 5 minute idle timeouts.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: Subw on February 14, 2016, 12:27:31 AM
true, no miners connected through proxy, but look at a second log it is constant reconnects, no 5 min delays there, it reconnects every 5 seconds


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on February 14, 2016, 12:34:39 AM
true, no miners connected through proxy, but look at a second log it is constant reconnects, no 5 min delays there, it reconnects every 5 seconds
I can't speak for what your upstream pools do with your chosen credentials. Try logging in debug mode and you might get more info.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: Subw on February 14, 2016, 12:39:20 AM
credential are valid i copied them from miner's config.


here is level 7 log:
Code:
sudo ./ckpool --proxy -c ckproxy.conf --loglevel 7
[2016-02-14 03:37:57.104] ckproxy connector starting
[2016-02-14 03:37:57.104] ckproxy connector ready
[2016-02-14 03:37:57.105] ckproxy stratifier starting
[2016-02-14 03:37:57.105] ckproxy generator starting
[2016-02-14 03:37:57.105] ckproxy stratifier ready
[2016-02-14 03:37:57.480] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 connection established
[2016-02-14 03:37:57.536] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 03:37:58.117] Successfully connected to pool 0 stratum+tcp://eu-01.miningrigrentals.com:3333 as proxy
[2016-02-14 03:37:58.117] ckproxy generator ready
[2016-02-14 03:38:02.536] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 03:38:02.537] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 03:38:07.537] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 03:38:07.537] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 03:38:12.537] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 03:38:12.537] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 03:38:17.537] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 03:38:17.537] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 03:38:22.538] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 03:38:22.538] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 03:38:27.538] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 03:38:27.539] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 03:38:32.539] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 03:38:32.539] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on February 14, 2016, 12:42:07 AM
credential are valid i copied them from miner's config.


here is level 7 log:
Code:
sudo ./ckpool --proxy -c ckproxy.conf --loglevel 7
[2016-02-14 03:37:57.104] ckproxy connector starting
[2016-02-14 03:37:57.104] ckproxy connector ready
[2016-02-14 03:37:57.105] ckproxy stratifier starting
[2016-02-14 03:37:57.105] ckproxy generator starting
[2016-02-14 03:37:57.105] ckproxy stratifier ready
[2016-02-14 03:37:57.480] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 connection established
[2016-02-14 03:37:57.536] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 03:37:58.117] Successfully connected to pool 0 stratum+tcp://eu-01.miningrigrentals.com:3333 as proxy
[2016-02-14 03:37:58.117] ckproxy generator ready
[2016-02-14 03:38:02.536] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 03:38:02.537] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 03:38:07.537] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 03:38:07.537] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 03:38:12.537] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 03:38:12.537] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 03:38:17.537] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 03:38:17.537] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 03:38:22.538] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 03:38:22.538] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 03:38:27.538] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 03:38:27.539] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 03:38:32.539] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 03:38:32.539] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect

That's the console output, not the log...


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: Subw on February 14, 2016, 12:48:06 AM
Code:
[2016-02-14 03:46:32.283] Setting maxclients to 921 due to max open file limit of 1024
[2016-02-14 03:46:32.284] ckproxy stratifier starting
[2016-02-14 03:46:32.283] ckproxy connector starting
[2016-02-14 03:46:32.283] ckproxy connector ready
[2016-02-14 03:46:32.284] ckproxy generator starting
[2016-02-14 03:46:32.284] ckproxy stratifier ready
[2016-02-14 03:46:32.283] File /tmp/ckproxy/generator.pid exists
[2016-02-14 03:46:32.283] File /tmp/ckproxy/stratifier.pid exists
[2016-02-14 03:46:32.283] File /tmp/ckproxy/connector.pid exists
[2016-02-14 03:46:32.507] Found notify for new proxy 0:0 with enonce f800002e nonce2len 4
[2016-02-14 03:46:32.507] Got updated subscribe for proxy 0
[2016-02-14 03:46:32.507] Stratifier added new proxy 0
[2016-02-14 03:46:32.507] Upstream pool stratum+tcp://eu-01.miningrigrentals.com:3333 0 extranonce2 length 4, max proxy clients 256
[2016-02-14 03:46:32.657] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 connection established
[2016-02-14 03:46:32.712] Proxy 0:0 stratum+tcp://eu-01.miningrigrentals.com:3333 failed to epoll/read_socket_line in proxy_recv
[2016-02-14 03:46:32.712] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 03:46:32.923] Found notify for new proxy 0:0 with enonce f800002e nonce2len 4
[2016-02-14 03:46:32.923] Got updated subscribe for proxy 0
[2016-02-14 03:46:32.923] Upstream pool stratum+tcp://eu-01.miningrigrentals.com:3333 0 extranonce2 length 4, max proxy clients 256
[2016-02-14 03:46:33.285] Pool:{"runtime": 1, "lastupdate": 1455410793, "Users": 0, "Workers": 0, "Idle": 0, "Disconnected": 0}
[2016-02-14 03:46:33.285] Pool:{"hashrate1m": "0", "hashrate5m": "0", "hashrate15m": "0", "hashrate1hr": "0", "hashrate6hr": "0", "hashrate1d": "0", "hashrate7d": "0"}
[2016-02-14 03:46:33.285] Pool:{"SPS1m": 0.0, "SPS5m": 0.0, "SPS15m": 0.0, "SPS1h": 0.0}
[2016-02-14 03:46:33.294] Successfully connected to pool 0 stratum+tcp://eu-01.miningrigrentals.com:3333 as proxy
[2016-02-14 03:46:33.295] ckproxy generator ready
[2016-02-14 03:46:37.712] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 03:46:37.713] Proxy 0:0 stratum+tcp://eu-01.miningrigrentals.com:3333 failed to epoll/read_socket_line in proxy_recv
[2016-02-14 03:46:37.713] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 03:46:37.927] Found notify for new proxy 0:0 with enonce f800002e nonce2len 4
[2016-02-14 03:46:37.927] Got updated subscribe for proxy 0
[2016-02-14 03:46:37.927] Upstream pool stratum+tcp://eu-01.miningrigrentals.com:3333 0 extranonce2 length 4, max proxy clients 256
[2016-02-14 03:46:42.713] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 03:46:42.713] Proxy 0:0 stratum+tcp://eu-01.miningrigrentals.com:3333 failed to epoll/read_socket_line in proxy_recv
[2016-02-14 03:46:42.713] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 03:46:42.928] Found notify for new proxy 0:0 with enonce f800002e nonce2len 4
[2016-02-14 03:46:42.928] Got updated subscribe for proxy 0
[2016-02-14 03:46:42.928] Upstream pool stratum+tcp://eu-01.miningrigrentals.com:3333 0 extranonce2 length 4, max proxy clients 256
[2016-02-14 03:46:47.713] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 03:46:47.713] Proxy 0:0 stratum+tcp://eu-01.miningrigrentals.com:3333 failed to epoll/read_socket_line in proxy_recv
[2016-02-14 03:46:47.713] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 03:46:47.922] Found notify for new proxy 0:0 with enonce f800002e nonce2len 4
[2016-02-14 03:46:47.922] Got updated subscribe for proxy 0
[2016-02-14 03:46:47.922] Upstream pool stratum+tcp://eu-01.miningrigrentals.com:3333 0 extranonce2 length 4, max proxy clients 256
[2016-02-14 03:46:52.713] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 03:46:52.713] Proxy 0:0 stratum+tcp://eu-01.miningrigrentals.com:3333 failed to epoll/read_socket_line in proxy_recv
[2016-02-14 03:46:52.713] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 03:46:52.927] Found notify for new proxy 0:0 with enonce f800002e nonce2len 4
[2016-02-14 03:46:52.928] Got updated subscribe for proxy 0
[2016-02-14 03:46:52.928] Upstream pool stratum+tcp://eu-01.miningrigrentals.com:3333 0 extranonce2 length 4, max proxy clients 256
[2016-02-14 03:46:53.645] Parent process ckproxy received signal 2, shutting down


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on February 14, 2016, 12:54:07 AM
Code:
[2016-02-14 03:46:32.283] Setting maxclients to 921 due to max open file limit of 1024
[2016-02-14 03:46:32.284] ckproxy stratifier starting
[2016-02-14 03:46:32.283] ckproxy connector starting
[2016-02-14 03:46:32.283] ckproxy connector ready
[2016-02-14 03:46:32.284] ckproxy generator starting
[2016-02-14 03:46:32.284] ckproxy stratifier ready
[2016-02-14 03:46:32.283] File /tmp/ckproxy/generator.pid exists
[2016-02-14 03:46:32.283] File /tmp/ckproxy/stratifier.pid exists
[2016-02-14 03:46:32.283] File /tmp/ckproxy/connector.pid exists
[2016-02-14 03:46:32.507] Found notify for new proxy 0:0 with enonce f800002e nonce2len 4
[2016-02-14 03:46:32.507] Got updated subscribe for proxy 0
[2016-02-14 03:46:32.507] Stratifier added new proxy 0
[2016-02-14 03:46:32.507] Upstream pool stratum+tcp://eu-01.miningrigrentals.com:3333 0 extranonce2 length 4, max proxy clients 256
[2016-02-14 03:46:32.657] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 connection established
[2016-02-14 03:46:32.712] Proxy 0:0 stratum+tcp://eu-01.miningrigrentals.com:3333 failed to epoll/read_socket_line in proxy_recv
[2016-02-14 03:46:32.712] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 03:46:32.923] Found notify for new proxy 0:0 with enonce f800002e nonce2len 4
[2016-02-14 03:46:32.923] Got updated subscribe for proxy 0
[2016-02-14 03:46:32.923] Upstream pool stratum+tcp://eu-01.miningrigrentals.com:3333 0 extranonce2 length 4, max proxy clients 256
[2016-02-14 03:46:33.285] Pool:{"runtime": 1, "lastupdate": 1455410793, "Users": 0, "Workers": 0, "Idle": 0, "Disconnected": 0}
[2016-02-14 03:46:33.285] Pool:{"hashrate1m": "0", "hashrate5m": "0", "hashrate15m": "0", "hashrate1hr": "0", "hashrate6hr": "0", "hashrate1d": "0", "hashrate7d": "0"}
[2016-02-14 03:46:33.285] Pool:{"SPS1m": 0.0, "SPS5m": 0.0, "SPS15m": 0.0, "SPS1h": 0.0}
[2016-02-14 03:46:33.294] Successfully connected to pool 0 stratum+tcp://eu-01.miningrigrentals.com:3333 as proxy
[2016-02-14 03:46:33.295] ckproxy generator ready
[2016-02-14 03:46:37.712] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 03:46:37.713] Proxy 0:0 stratum+tcp://eu-01.miningrigrentals.com:3333 failed to epoll/read_socket_line in proxy_recv
[2016-02-14 03:46:37.713] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 03:46:37.927] Found notify for new proxy 0:0 with enonce f800002e nonce2len 4
[2016-02-14 03:46:37.927] Got updated subscribe for proxy 0
[2016-02-14 03:46:37.927] Upstream pool stratum+tcp://eu-01.miningrigrentals.com:3333 0 extranonce2 length 4, max proxy clients 256
[2016-02-14 03:46:42.713] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 03:46:42.713] Proxy 0:0 stratum+tcp://eu-01.miningrigrentals.com:3333 failed to epoll/read_socket_line in proxy_recv
[2016-02-14 03:46:42.713] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 03:46:42.928] Found notify for new proxy 0:0 with enonce f800002e nonce2len 4
[2016-02-14 03:46:42.928] Got updated subscribe for proxy 0
[2016-02-14 03:46:42.928] Upstream pool stratum+tcp://eu-01.miningrigrentals.com:3333 0 extranonce2 length 4, max proxy clients 256
[2016-02-14 03:46:47.713] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 03:46:47.713] Proxy 0:0 stratum+tcp://eu-01.miningrigrentals.com:3333 failed to epoll/read_socket_line in proxy_recv
[2016-02-14 03:46:47.713] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 03:46:47.922] Found notify for new proxy 0:0 with enonce f800002e nonce2len 4
[2016-02-14 03:46:47.922] Got updated subscribe for proxy 0
[2016-02-14 03:46:47.922] Upstream pool stratum+tcp://eu-01.miningrigrentals.com:3333 0 extranonce2 length 4, max proxy clients 256
[2016-02-14 03:46:52.713] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 recovered
[2016-02-14 03:46:52.713] Proxy 0:0 stratum+tcp://eu-01.miningrigrentals.com:3333 failed to epoll/read_socket_line in proxy_recv
[2016-02-14 03:46:52.713] Proxy 0:stratum+tcp://eu-01.miningrigrentals.com:3333 failed, attempting reconnect
[2016-02-14 03:46:52.927] Found notify for new proxy 0:0 with enonce f800002e nonce2len 4
[2016-02-14 03:46:52.928] Got updated subscribe for proxy 0
[2016-02-14 03:46:52.928] Upstream pool stratum+tcp://eu-01.miningrigrentals.com:3333 0 extranonce2 length 4, max proxy clients 256
[2016-02-14 03:46:53.645] Parent process ckproxy received signal 2, shutting down
All I see is lots of disconnects from the upstream pool. Are you using the latest git code? The code is a continual work in progress and it's easy to find a spot where things are broken if you're not careful. Current git is stable though.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: Subw on February 14, 2016, 12:58:47 AM
yes, latest git version.
i point proxy to sha256.eu.nicehash.com and there is no such disconnects.
but my miners are pointed to eu-01.miningrigrentals.com directly and they are doing fine.

btw is it possible to switch pools in the proxy list on the fly while miners are connected and working?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on February 14, 2016, 01:14:49 AM
yes, latest git version.
i point proxy to sha256.eu.nicehash.com and there is no such disconnects.
but my miners are pointed to eu-01.miningrigrentals.com directly and they are doing fine.

btw is it possible to switch pools in the proxy list on the fly while miners are connected and working?
Not at the moment, no. I suspect it's just some incompatibility with MRR but I can't guess what it might be sorry. Earlier on I had tested with MRR and saw they *always* disconnect idle miners, and additionally they use redirects with reconnects for changes in where the rentals are pointed.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: Subw on February 14, 2016, 01:21:16 AM
yes looks like only MRR doing this, tried stratum.f2pool.com and it is fine too


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on February 14, 2016, 12:53:47 PM
Hi ck

I'm getting the same errors over and over. I cloned and built from commit db42a13. Built with all dependencies satisfied. No build problems that I can remember. Running from build directory, not installed. Environment is 32-bit Arch Linux Arm running on a Raspberry Pi2. I haven't yet taken a dive into the lines of code specified here. Was hoping maybe this is something you've encountered before with an easy fix. Any help/pointers would be much appreciated.

Looks to me like stratifier and generator are not starting. I checked and all the sockets and such are getting successfully created in /tmp/ckpool. bitcoind is slow in responding sometimes on this box. Not sure if that could cause this issue.

command line:

Code:
./ckpool -k -A -c ../ckproxy2.conf

ckproxy2.conf:

Code:
{
"btcd" :  [
        {
                "url" : "localhost:8332",
                "auth" : "[user]",
                "pass" : "[pass]"
        }
],
"update_interval" : 30,
"serverurl" : [
        "127.0.0.1:3334"
        ],
"mindiff" : 1,
"startdiff" : 1000,
"maxdiff" : 0,
"logdir" : "logs",
"btcaddress" : "[address]",
"btcsig" : "[sig]"
}

console output:

Code:
[2016-02-14 07:35:22.481] ckpool stratifier starting
[2016-02-14 07:35:22.481] ckpool generator starting
[2016-02-14 07:35:22.482] ckpool connector starting
[2016-02-14 07:35:22.483] ckpool connector ready
[2016-02-14 07:35:27.484] Select1 failed in recv_unix_msg (2) with errno 2: No such file or directory
[2016-02-14 07:35:27.485] Failure in recv_unix_msg from stratifier.c stratifier:7546 with errno 2: No such file or directory
[2016-02-14 07:35:27.485] Failure in send_recv_proc from stratifier.c stratifier:7546 with errno 2: No such file or directory
[2016-02-14 07:35:32.487] Select1 failed in recv_unix_msg (2) with errno 2: No such file or directory
[2016-02-14 07:35:32.488] Failure in recv_unix_msg from stratifier.c stratifier:7546 with errno 2: No such file or directory
[2016-02-14 07:35:32.488] Failure in send_recv_proc from stratifier.c stratifier:7546 with errno 2: No such file or directory
[2016-02-14 07:35:37.490] Select1 failed in recv_unix_msg (2) with errno 2: No such file or directory

log output:

Code:
[2016-02-14 07:35:22.475] Setting maxclients to 921 due to max open file limit of 1024
[2016-02-14 07:35:22.481] ckpool stratifier starting
[2016-02-14 07:35:22.475] Setting maxclients to 921 due to max open file limit of 1024
[2016-02-14 07:35:22.481] ckpool generator starting
[2016-02-14 07:35:22.482] ckpool connector starting
[2016-02-14 07:35:22.483] ckpool connector ready
[2016-02-14 07:35:27.484] Select1 failed in recv_unix_msg (2) with errno 2: No such file or directory
[2016-02-14 07:35:27.485] Failure in recv_unix_msg from stratifier.c stratifier:7546 with errno 2: No such file or directory
[2016-02-14 07:35:27.485] Failure in send_recv_proc from stratifier.c stratifier:7546 with errno 2: No such file or directory
[2016-02-14 07:35:32.487] Select1 failed in recv_unix_msg (2) with errno 2: No such file or directory
[2016-02-14 07:35:32.488] Failure in recv_unix_msg from stratifier.c stratifier:7546 with errno 2: No such file or directory
[2016-02-14 07:35:32.488] Failure in send_recv_proc from stratifier.c stratifier:7546 with errno 2: No such file or directory


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on February 14, 2016, 01:01:25 PM
Environment is 32-bit ...
Ckpool demands a 64 bit environment and I have no interest in creating support for 32 bits sorry.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on February 14, 2016, 05:17:22 PM
Environment is 32-bit ...
Ckpool demands a 64 bit environment and I have no interest in creating support for 32 bits sorry.

Interesting. Thanks for clearing that up.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on February 17, 2016, 03:19:50 AM
Interestingly, it may actually have been working fine. I got similar errors on 64-bit as well. Issue seemed to be hangups with bitcoind. Adding more RAM and setting bitcoind to properly use the notifier seems to made it all work a lot smoother. Still running it on 64-bit.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on February 18, 2016, 03:00:29 AM
@ -ck

Can you elaborate from a high level what exactly happens when ckpool is notified by the notifier? I can see that it seems like miners start in on a new block immediately. How does ckpool decide which transactions to put in that new block? (I ask because it seems like miners start on the new block before the last one is fully downloaded and verified... But I could be mistaken on that).  I'm guessing since all we really need is the hash of the previous block we can start with that before its fully verified? Or am I really wrong in thinking that we are working on the next block before the last one is fully verified?

I see this on the first post:

"New work generation on block changes incorporate full bitcoind transaction
set without delay"

But from experience, I don't see the delay surrounding block changes that seemed to be present when mining directly to a node via GBT, so just a little curious how this works.

And yeah I know I can probably figure this all out by diving into the code, but I don't read code very well and was hoping a high level explanation wouldn't be too much of an ask.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on February 18, 2016, 03:04:33 AM
@ -ck

Can you elaborate from a high level what exactly happens when ckpool is notified by the notifier? I can see that it seems like miners start in on a new block immediately. How does ckpool decide which transactions to put in that new block? (I ask because it seems like miners start on the new block before the last one is fully downloaded and verified... But I could be mistaken on that).  I'm guessing since all we really need is the hash of the previous block we can start with that before its fully verified? Or am I really wrong in thinking that we are working on the next block before the last one is fully verified?

I see this on the first post:

"New work generation on block changes incorporate full bitcoind transaction
set without delay"

But from experience, I don't see the delay surrounding block changes that seemed to be present when mining directly to a node via GBT, so just a little curious how this works.

And yeah I know I can probably figure this all out by diving into the code, but I don't read code very well and was hoping a high level explanation wouldn't be too much of an ask.
The notify comes from bitcoind only once it has verified the previous block, the notifier then tells ckpool that bitcoind is ready to generate a new template so ckpool immediately requests a new template and works from that. It is always a fully verified block that ckpool works with and the getblocktemplate that bitcoind generates after the verified block.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on February 18, 2016, 03:08:35 AM
Ah okay I wasn't sure when the block notify was triggered by bitcoind. Thanks for that info.

I have a follow up, seemingly basic question that I couldn't find an answer to elsewhere... Do all miners everywhere concurrently work on the same block with the same transactions in it, or are the contents of a block at the discretion of each miner (assuming there are more than enough transactions on the mempool to cover more than one block worth)?

Sorry for getting a bit off topic...


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on February 18, 2016, 03:10:04 AM
Ah okay I wasn't sure when the block notify was triggered by bitcoind. Thanks for that info.

I have a follow up, seemingly basic question that I couldn't find an answer to elsewhere... Do all miners everywhere concurrently work on the same block with the same transactions in it, or are the contents of a block at the discretion of each miner (assuming there are more than enough transactions on the mempool to cover more than one block worth)?

Sorry for getting a bit off topic...
Same workinfo, same transactions for everyone.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on February 18, 2016, 03:19:11 AM
Ah okay I wasn't sure when the block notify was triggered by bitcoind. Thanks for that info.

I have a follow up, seemingly basic question that I couldn't find an answer to elsewhere... Do all miners everywhere concurrently work on the same block with the same transactions in it, or are the contents of a block at the discretion of each miner (assuming there are more than enough transactions on the mempool to cover more than one block worth)?

Sorry for getting a bit off topic...
Same workinfo, same transactions for everyone.

So I think I phrased that wrong or confusingly. By miners I didn't mean miners on the same pool. I meant I guess pools as mining entities, or maybe more accurately mining nodes. Wouldn't each node or pool potentially include a different transaction set per the block they are working on? Sorry these are probably really basic questions I can answer by re-reading the white paper or some other source.

I do have a more ckpool-specific question... Before I had the notifier and blocknotify setup on my bitcoind, there were times my miners were working on work that appears to be from previous blocks. It also seemed that ckpool would timeout when trying to get work from bitcoind. None of this happens anymore.

Is that because the "blockpoll" method is taxing on bitcoind? Or is it because requesting a new blocktemplate during verification causes slowdowns? Or both?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on February 18, 2016, 03:21:38 AM
I do have a more ckpool-specific question... Before I had the notifier and blocknotify setup on my bitcoind, there were times my miners were working on work that appears to be from previous blocks. It also seemed that ckpool would timeout when trying to get work from bitcoind. None of this happens anymore.

Is that because the "blockpoll" method is taxing on bitcoind? Or is it because requesting a new blocktemplate during verification causes slowdowns? Or both?
Both


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on February 18, 2016, 03:24:49 AM
Thanks for the quick replies.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: ksoze75 on February 24, 2016, 06:12:53 AM
I am trying to get this compiled and running on my RPi2B with Jessie lite. I git cloned the source and attempted to run autogen.sh and got the following output:

autom4te: cannot create autom4te.cache: No such file or directory
aclocal: error: echo failed with exit status: 1
autoreconf: aclocal failed with exit status: 1

I am guessing I am doing something wrong here. I am fairly new to Linux and am learning as fast as I can but I have no idea where to go with this other than check out the script and see what it is looking for and it is indeed missing.

Any help for this noob would be great.

K


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: irritant on February 24, 2016, 06:29:11 AM
I am trying to get this compiled and running on my RPi2B with Jessie lite. I git cloned the source and attempted to run autogen.sh and got the following output:

autom4te: cannot create autom4te.cache: No such file or directory
aclocal: error: echo failed with exit status: 1
autoreconf: aclocal failed with exit status: 1

I am guessing I am doing something wrong here. I am fairly new to Linux and am learning as fast as I can but I have no idea where to go with this other than check out the script and see what it is looking for and it is indeed missing.

Any help for this noob would be great.

K


have you installed autoconf and automake?

Building from git also requires autoconf and automake

sudo apt-get install build-essential libpq-dev autoconf automake libtool
./autogen.sh
./configure
make
dont know if it works on 32 bit but i read there is no support for it (rpi2b)


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: ksoze75 on February 24, 2016, 06:43:25 AM
Unsupported :(. I thought RPi2B was 64 bit. Maybe not, oh well.

I am pretty sure I installed those pkgs, I'll double check.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on February 24, 2016, 10:50:37 AM
Environment is 32-bit ...
Ckpool demands a 64 bit environment and I have no interest in creating support for 32 bits sorry.

But I was able to build and run on RPi2. I got errors while it was running but they may not have been related to running in a 32 bit environment.

Note that you'll definitely not be able to run with ckdb, as I believe it's recommended to have 16 GB ram or so for a full ckdb implementation running behind ckpool.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on February 24, 2016, 08:45:36 PM
Environment is 32-bit ...
Ckpool demands a 64 bit environment and I have no interest in creating support for 32 bits sorry.

But I was able to build and run on RPi2. I got errors while it was running but they may not have been related to running in a 32 bit environment.

Note that you'll definitely not be able to run with ckdb, as I believe it's recommended to have 16 GB ram or so for a full ckdb implementation running behind ckpool.
Warnings at startup are not actually unusual or fatal as the multiprocess nature of ckpool means that sometimes one process waits excessively for another process - usually because they're waiting on bitcoind responses for example. The latest git version has moved away from the multiprocess model so those warnings shouldn't occur any more. While the code was made to be general and should work on 32 bit and big endian, the fact remains that it was never tested on either of those so they should be considered unsupported. Of course if someone wants to audit the code and test it on those platforms and contribute patches to fix any issues they find, they're welcome to. Unlike cgminer, though, for speed of development the code for ckpool was intentionally designed with one platform in mind - making code suit multiple architectures and operating systems means dealing with the quirks of low level behaviour of each platform which slows development down and often limits what can even be done with the code. Since ckpool uses low level socket code and system functions all over the place, cross-platform support, for example, is never going to happen.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on February 24, 2016, 09:08:53 PM
Environment is 32-bit ...
Ckpool demands a 64 bit environment and I have no interest in creating support for 32 bits sorry.

But I was able to build and run on RPi2. I got errors while it was running but they may not have been related to running in a 32 bit environment.

Note that you'll definitely not be able to run with ckdb, as I believe it's recommended to have 16 GB ram or so for a full ckdb implementation running behind ckpool.
Warnings at startup are not actually unusual or fatal as the multiprocess nature of ckpool means that sometimes one process waits excessively for another process - usually because they're waiting on bitcoind responses for example. The latest git version has moved away from the multiprocess model so those warnings shouldn't occur any more. While the code was made to be general and should work on 32 bit and big endian, the fact remains that it was never tested on either of those so they should be considered unsupported. Of course if someone wants to audit the code and test it on those platforms and contribute patches to fix any issues they find, they're welcome to. Unlike cgminer, though, for speed of development the code for ckpool was intentionally designed with one platform in mind - making code suit multiple architectures and operating systems means dealing with the quirks of low level behaviour of each platform which slows development down and often limits what can even be done with the code. Since ckpool uses low level socket code and system functions all over the place, cross-platform support, for example, is never going to happen.

Yup. I'll be testing on 64 bit ARM as soo as my Odroid C2 comes in.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on February 24, 2016, 10:02:58 PM
@ck are the M* tags considered more stable than master? or S* tags? are there still version numbers for stable releases?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on February 24, 2016, 10:48:48 PM
@ck are the M* tags considered more stable than master? or S* tags? are there still version numbers for stable releases?
Tagged versions are considered stable for use indeed. The S tags were a mistake, the M tags stand for "milestone" releases. Having said that, the current git master is currently stable but that can change at any time. The version numbers are almost an afterthought.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on February 24, 2016, 11:21:00 PM
@ck are the M* tags considered more stable than master? or S* tags? are there still version numbers for stable releases?
Tagged versions are considered stable for use indeed. The S tags were a mistake, the M tags stand for "milestone" releases. Having said that, the current git master is currently stable but that can change at any time. The version numbers are almost an afterthought.

great so use M tags for stability when in doubt


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: chiguireitor on February 25, 2016, 12:19:23 AM
Can confirm master is stable as a rock.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on February 25, 2016, 12:29:28 AM
Cool yeah I built master just now and no problems so far


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: igorwhite on February 25, 2016, 01:40:35 PM
Hello!
I get this error when doing blocknotify.
Quote
~$ Failed to bind to socket in open_unix_client
Closing file handle 5
Failure in open_unix_client from notifier.c main:50
Failed to open socket: /tmp/ckpool/stratifier

What could be the problem?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on February 25, 2016, 02:31:53 PM
Hello!
I get this error when doing blocknotify.
Quote
~$ Failed to bind to socket in open_unix_client
Closing file handle 5
Failure in open_unix_client from notifier.c main:50
Failed to open socket: /tmp/ckpool/stratifier

What could be the problem?

Make sure /tmp/ckpool/stratifier exists. It's a socket opened by ckpool. Probably also need to make sure the user running bitcoind has access to that socket. This may not be the case especially if bitcoind is running as a service but you're running ckpool from command line.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on February 26, 2016, 07:05:42 AM
Hello!
I get this error when doing blocknotify.
Quote
~$ Failed to bind to socket in open_unix_client
Closing file handle 5
Failure in open_unix_client from notifier.c main:50
Failed to open socket: /tmp/ckpool/stratifier

What could be the problem?
One of 2 specific things:
1) your pointing the notifier at the wrong place
2) the notifier doesn't have privs to access it

... though this answer is basic linux 101.
CKPool is not a point and click pool.
You do need to know what you are doing and a lot about linux and system management to use it ...


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: igorwhite on February 26, 2016, 08:45:50 AM
WBF1, Kano

Many thanks!  :) There was insufficient privileges.  ::)


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: bitmine49 on March 01, 2016, 05:09:37 PM
If mining w/ ckpool via -A does found block get awarded to address in bitcoin.conf or ckpool.conf

And - can everyone stop mining for ten minutes so I can test my rig.

Thanks!


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on March 01, 2016, 05:42:29 PM
If mining w/ ckpool via -A does found block get awarded to address in bitcoin.conf or ckpool.conf

And - can everyone stop mining for ten minutes so I can test my rig.

Thanks!

I believe ckpool.conf, but you can just make them both the same to be certain.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on March 01, 2016, 07:51:52 PM
If mining w/ ckpool via -A does found block get awarded to address in bitcoin.conf or ckpool.conf

And - can everyone stop mining for ten minutes so I can test my rig.

Thanks!
ckpool.conf


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on March 03, 2016, 02:04:14 PM
Is there anything built into notifier to notify a remotely running ckpool of block changes? or would I have to set up the remote machine to execute notifier locally via ssh? Also, if notifier runs once from a local bitcoind, will ckpool grab work from all listed bitcoinds? And what happens if notifier runs between block changes? anything catastrophic or just gets new work more often?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on March 03, 2016, 08:47:14 PM
Is there anything built into notifier to notify a remotely running ckpool of block changes? or would I have to set up the remote machine to execute notifier locally via ssh? Also, if notifier runs once from a local bitcoind, will ckpool grab work from all listed bitcoinds? And what happens if notifier runs between block changes? anything catastrophic or just gets new work more often?
No. Yes. No. Nothing. Yes.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: bitmine49 on March 04, 2016, 04:47:37 PM
What do the values for mindiff (in ckpool.conf) mean? "mindiff": 1 -> if I set that to ten does that mean 10 zeros min prepending the hash?

Is there any feedback or insight on manipulating mindiff  - is there any benefit for a small pool?

Thanks,


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on March 04, 2016, 05:23:52 PM
What do the values for mindiff (in ckpool.conf) mean? "mindiff": 1 -> if I set that to ten does that mean 10 zeros min prepending the hash?

Is there any feedback or insight on manipulating mindiff  - is there any benefit for a small pool?

Thanks,

It's the minimum difficulty shares of work that will be sent to workers.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: bitmine49 on March 04, 2016, 05:48:59 PM


It's the minimum difficulty shares of work that will be sent to workers.

So the difficuly is ~158B. If I raise the mindiff in ckpool is there any benfit towards increasing the likelihood of mining a block? Why is the mindiff set to 1 is that only for the purpose of payment for shared pools? Sorry if I am lost on this.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on March 04, 2016, 08:50:38 PM


It's the minimum difficulty shares of work that will be sent to workers.

So the difficuly is ~158B. If I raise the mindiff in ckpool is there any benfit towards increasing the likelihood of mining a block? Why is the mindiff set to 1 is that only for the purpose of payment for shared pools? Sorry if I am lost on this.
This is a fundamental truth that everyone needs to understand: Nothing you do makes your likelihood of mining a block higher except for increasing your hashrate. Diff is just feedback for miners. Diff 1 is suitable feedback for only the very lowest speed mining hardware (such as the old ASICminer usb sticks).


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on March 04, 2016, 10:40:07 PM


It's the minimum difficulty shares of work that will be sent to workers.

So the difficuly is ~158B. If I raise the mindiff in ckpool is there any benfit towards increasing the likelihood of mining a block? Why is the mindiff set to 1 is that only for the purpose of payment for shared pools? Sorry if I am lost on this.

If I'm not mistaken, ckpool adjusts difficulty per user hashrate. There's probably a description on solo.ckpool.org or kano.is (the two most prominent pools I know of using ckpool backend).


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: bitmine49 on March 04, 2016, 11:18:37 PM
So what is the point for mindiff? I am just trying to understand all the settings. I am running ckpool locally, just getting started in bitcoin. And interested in the concept as a social and economic disruptive technology.  


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on March 05, 2016, 12:29:32 AM
So what is the point for mindiff? I am just trying to understand all the settings. I am running ckpool locally, just getting started in bitcoin. And interested in the concept as a social and economic disruptive technology.  

mindiff is the bottom limit for the vardiff calculated by the pool.

read about vardiff here: http://give-me-coins.com/support/faq/what-is-vardiff/

(also this is getting a little off topic. Might want to post a new thread for non-ckpool-related questions)


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: igorwhite on March 06, 2016, 05:08:30 PM
Hello.
The maximum number of miners can be connected to a ckproxy?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on March 06, 2016, 09:06:12 PM
Hello.
The maximum number of miners can be connected to a ckproxy?
Unlimited.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: bitmine49 on March 09, 2016, 11:43:35 PM
What is the best way to move from a standalone ckpool to proxy/stratum - is it just rerunning ckpool -P


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on March 10, 2016, 08:49:25 PM
@ck I'm running on commit f35f54a (https://bitbucket.org/ckolivas/ckpool/commits/f35f54a6428a99bacad6daedbd7cd8367c985242) from 2/23/16. I recently started noticing the odd occasion where there is a 2-40 second lag between block change of bitcoind/notifier running and ckpool logging a "block hash changed" message.

When I was running this on a different box with half as many cores and same amt of RAM, I was getting no lag at all (seeing less than a second between "UpdateTip" from bitcoind to "block hash changed" from ckpool).

One difference in the two boxes is file system. Could suboptimal fs performance be causing this? The older, seemingly quicker-to-change setup had the blockchain stored on ext4 while the newer, seemingly laggier-to-change setup has the blockchain stored on btrfs (I wanted to save some physical space with transparent compression... note to all: feel free to berate me on use of btrfs, but I don't want to derail this thread).

I can obviously reformat to ext4 and copy the blockchain over and back from a backup volume, but before I go through all that headache, I wanted to get your perspective on if it could be the root cause of the lagginess.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on March 10, 2016, 08:50:52 PM
Doubt it. That lag time sounds like it missed a notify entirely.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on March 10, 2016, 08:58:59 PM
I dug a little deeper and it seems it coordinates with warnings from ckdb about taking a long time to getblocktemplate, which I guess is not surprising. I guess bitcoind is running slow or something. whther or not that could be affected so much by filesystem I know is off topic here, but an interesting thing to inspect I guess.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on March 10, 2016, 09:02:20 PM
I dug a little deeper and it seems it coordinates with warnings from ckdb about taking a long time to getblocktemplate, which I guess is not surprising. I guess bitcoind is running slow or something. whther or not that could be affected so much by filesystem I know is off topic here, but an interesting thing to inspect I guess.
Tuning/hacking/optimising bitcoind is a whole topic in and of itself and it can perform terribly bad. That's why solo/kano.is run our own custom modified coin daemons (no there is no public code for these). Plus you're running classic as far as I can tell and that carries with it whatever separate differences it has itself. All of which are offtopic for this thread.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on March 10, 2016, 09:09:35 PM
Agreed on all counts. Thanks for the input though.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on March 10, 2016, 09:23:48 PM
Oh I guess unrelated question: any reason not to run on the latest version in the master tree? Is that what you're typically using in production? I know I've asked about the M tags before, but it doesn't seem like they keep up as much, as there hasn't been one in over a month (which isn't a big deal, but just curious).


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on March 10, 2016, 10:28:44 PM
Oh I guess unrelated question: any reason not to run on the latest version in the master tree? Is that what you're typically using in production? I know I've asked about the M tags before, but it doesn't seem like they keep up as much, as there hasn't been one in over a month (which isn't a big deal, but just curious).
There was very real instability in there. New tag just hit.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on March 10, 2016, 11:34:40 PM
Oh I guess unrelated question: any reason not to run on the latest version in the master tree? Is that what you're typically using in production? I know I've asked about the M tags before, but it doesn't seem like they keep up as much, as there hasn't been one in over a month (which isn't a big deal, but just curious).
There was very real instability in there. New tag just hit.

recommend M24 then or v0.9.3?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on March 11, 2016, 06:23:14 AM
Oh I guess unrelated question: any reason not to run on the latest version in the master tree? Is that what you're typically using in production? I know I've asked about the M tags before, but it doesn't seem like they keep up as much, as there hasn't been one in over a month (which isn't a big deal, but just curious).
There was very real instability in there. New tag just hit.

recommend M24 then or v0.9.3?
He said M tags before for a reason ...


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: chiguireitor on March 12, 2016, 06:48:18 PM
Do you by any chance have a consolidated log of the changes since last tag? (don't asking you to do it, just to see if there's a convenient place already to not waste time).


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on March 12, 2016, 07:41:48 PM
Do you by any chance have a consolidated log of the changes since last tag? (don't asking you to do it, just to see if there's a convenient place already to not waste time).

Read the titles of each commit on bitbucket.  Ck and kano seem to provide very descriptive info in the titles of the commits.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: chiguireitor on March 12, 2016, 09:07:03 PM
...

Read the titles of each commit on bitbucket.  Ck and kano seem to provide very descriptive info in the titles of the commits.

Yeah, i have the repo cloned, you can get a log since some commits ago, but i wanted to know if there was no necessity of doing that.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: zOU on March 25, 2016, 03:40:32 PM
Hello

I have 8 miners and I'm in the process of getting them hosted in a plce with low power cost.

It would greatly help me to have only 1 IP address accessing internet/kano.is.

So I was wondering if I could use CK proxy to do the following:

Miners ->ethernet switch-> RPI -> wireless -> internet router

This way I could have a separate LAN for my miners and install ckpool/proxy (and cryptoglance) on the RPI.

Before I try to make it work at home (miners are currently directly connected behind a firewall) i'd like to know if it would work ?

Thank you


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on March 26, 2016, 07:23:03 AM
One problem is that you'd be trusting all your hash rate to an RPi
However, we don't compile/test/run ckpool/ckdb ever on a 32bit environment ... and never will.

Simplest to get a small PC and put ubuntu on it and then run ckproxy on that.
Ubuntu says how to install it on any PC, and ckpool says how to compile and run it as a proxy in the README


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: zOU on March 26, 2016, 07:32:43 AM
Thank you Kano.

Maybe I'm trying too hard, using the RPI as as network gateway would be simply enough probably or an ethernet to Wi-Fi bridge...


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: irritant on March 26, 2016, 01:30:47 PM
rpi3 is 64bit iirc

edit: ok im half wrong, it needs more time
memory would probably be on the low side anyway


The Raspberry Pi 3 may have 64-bit CPU, but for now its default Linux OS remains at 32 bits.

The arrival of the $35, wireless-enabled, Raspberry Pi 3, following a similarly 64-bit, $40 Odroid-C2 SBC a few weeks ago, represent a big speed boost for Linux hacker boards but not a sudden switch to 64-bit ARM computing. While the Odroid project offers an Ubuntu 64-bit image for the C2, the default Linux distribution released by the Raspberry Pi Foundation is still 32-bit.

An eventual change to 64-bit ARM firmware is inevitable given the fact that the technology offers significantly improved performance. Pressure will also come from more power-efficient, 64-bit x86 chips. Yet, because of the extensive reworking of code required for the changeover, the Raspberry Pi Foundation will commit only to “considering” a change to 64-bit for the Pi’s default Raspbian distribution in the coming months.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: klintay on March 31, 2016, 10:34:58 AM
rpi3 is 64bit iirc

edit: ok im half wrong, it needs more time
memory would probably be on the low side anyway


The Raspberry Pi 3 may have 64-bit CPU, but for now its default Linux OS remains at 32 bits.

The arrival of the $35, wireless-enabled, Raspberry Pi 3, following a similarly 64-bit, $40 Odroid-C2 SBC a few weeks ago, represent a big speed boost for Linux hacker boards but not a sudden switch to 64-bit ARM computing. While the Odroid project offers an Ubuntu 64-bit image for the C2, the default Linux distribution released by the Raspberry Pi Foundation is still 32-bit.

An eventual change to 64-bit ARM firmware is inevitable given the fact that the technology offers significantly improved performance. Pressure will also come from more power-efficient, 64-bit x86 chips. Yet, because of the extensive reworking of code required for the changeover, the Raspberry Pi Foundation will commit only to “considering” a change to 64-bit for the Pi’s default Raspbian distribution in the coming months.

Yes Raspberry Pi 3 is definitely 64 bit, they are available for sale right now here:
https://bitcointalk.org/index.php?topic=1419675 (https://bitcointalk.org/index.php?topic=1419675)


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on March 31, 2016, 10:47:45 AM
rpi3 is 64bit iirc

edit: ok im half wrong, it needs more time
memory would probably be on the low side anyway


The Raspberry Pi 3 may have 64-bit CPU, but for now its default Linux OS remains at 32 bits.

The arrival of the $35, wireless-enabled, Raspberry Pi 3, following a similarly 64-bit, $40 Odroid-C2 SBC a few weeks ago, represent a big speed boost for Linux hacker boards but not a sudden switch to 64-bit ARM computing. While the Odroid project offers an Ubuntu 64-bit image for the C2, the default Linux distribution released by the Raspberry Pi Foundation is still 32-bit.

An eventual change to 64-bit ARM firmware is inevitable given the fact that the technology offers significantly improved performance. Pressure will also come from more power-efficient, 64-bit x86 chips. Yet, because of the extensive reworking of code required for the changeover, the Raspberry Pi Foundation will commit only to “considering” a change to 64-bit for the Pi’s default Raspbian distribution in the coming months.

Yes Raspberry Pi 3 is definitely 64 bit, they are available for sale right now here:
https://bitcointalk.org/index.php?topic=1419675 (https://bitcointalk.org/index.php?topic=1419675)
The issue is that if the operating system is still 32 bit then it's still in untested unsupported territory for ckpool, irrespective of the hardware being 64 bit.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: hurricandave on March 31, 2016, 03:45:47 PM
This might fit the req's. A bit more expensive though.

http://kck.st/1QUiv54 (http://kck.st/1QUiv54)


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on March 31, 2016, 11:07:42 PM
This might fit the req's. A bit more expensive though.

http://kck.st/1QUiv54 (http://kck.st/1QUiv54)
Well since that web site seems to think that Windows10 is part of their hardware, then nope waste of time - needs to be linux.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: hurricandave on March 31, 2016, 11:55:44 PM
This might fit the req's. A bit more expensive though.

http://kck.st/1QUiv54 (http://kck.st/1QUiv54)
- waste of time - needs to be linux.

That may become a bit blurred in the future, -Ubuntu Bash on Windoze w/Linux CMD prompt, sprinkle in a lil'bit Azure for sum extra confusion :P


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on April 03, 2016, 04:55:17 PM
This might fit the req's. A bit more expensive though.

http://kck.st/1QUiv54 (http://kck.st/1QUiv54)
- waste of time - needs to be linux.

That may become a bit blurred in the future, -Ubuntu Bash on Windoze w/Linux CMD prompt, sprinkle in a lil'bit Azure for sum extra confusion :P
No, it needs to be a full linux 64bit distribution.

CKPool/CKDB is linux centric code so we don't have to deal with reducing the performance, or lots of random if/but/maybe sections of code doing different things due to OSes not supporting certain linux library functions.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: WBF1 on April 03, 2016, 06:08:06 PM
A hardkernel odroid c2 will probably fit the bill. it is a 64bit arm platform for 40$ USD that can run native 64 bit arch linux (or ubuntu or debian or whatever you like). Better performance than rpi3 but no built in wireless protocols. huge plus is it can use an emmc chip for storage instead of/in addition to micro sdxc. i have my system root on a 8gb emmc module and extra 128gb storage on sdxc class 10 uhs-1.

I actually use mine as a desktop right now, but i see no reason it won't work just fine for your needs.

the only downside is a lack of hardware accelerated drivers for Xorg, but they should be coming sometime in April.

http://odroid.com/dokuwiki/doku.php?id=en:odroid-c2

http://www.hardkernel.com/main/products/prdt_info.php?g_code=G145457216438


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: SaBit on April 09, 2016, 09:51:13 PM
Ok. -- so i have been tinkering around woth bitcoin for a few days

Got my self 1 x 7. ,, and then just added another 2 x 7 a few days layer -- still gettiing thehandle of it. ... Will be adding many miners to mine on kano. ... As an when i get money and time to add them. ...u will see me on kano pool

I would like to ad ckpool as a proxy to limit my bandwidth. -- i'm sittin with a lte radio link until i get my fibre


Lets control those packats.  What machine specs would you suggest to run ckpool proxy, perhaps ckdlb and of course bitcoind?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on April 10, 2016, 12:09:55 AM
I would like to ad ckpool as a proxy to limit my bandwidth. -- i'm sittin with a lte radio link until i get my fibre


Lets control those packats.  What machine specs would you suggest to run ckpool proxy, perhaps ckdlb and of course bitcoind?
Even a low spec machine is more than enough to run ckpool in proxy mode, but bitcoind requires tons of storage and uses a lot more bandwidth than all your mining combined so if you're worried about bandwidth, bitcoind is not the way to go. Some cheap recent laptop will suffice for ckproxy so you can run a recent 64 bit ubuntu or similar and laptops effectively have an inbuilt UPS. You don't want ckdb as that's really meant for a full pool that has different users and isn't really designed to run with a simple proxy. In summary, a cheap netbook will do.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: SaBit on April 10, 2016, 06:05:50 AM
Thanks, I am running a full node in any case, on my main personal machine,,  but this also has all my media, and acts as a media server for my house -  and is a Windoze machine (when I initially set it up a few years ago I couldn't get decent Linux support for my raid cards -- and now that there is proper support, with 30tb of media on Raid 6 it is just too terrifying,,  -- and too much of a mission to start tinkering.

So I was thinking of taking bitcoind of off my main machine,,  and setting up a separate machine just handle all the "bit[Suspicious link removed]dies" including the bitcoinD -- and whatever monitoring software etc

So bandwidth is not SUPER critical , but I would like to do it more efficiently --

How about this little puppy for the job?   http://www.amazon.com/dp/B00LGJ9AT6/ref=psdc_11036071_t3_B005KKJPCO

 (http://www.amazon.com/dp/B00LGJ9AT6/ref=psdc_11036071_t3_B005KKJPCO)


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: bonso on May 07, 2016, 12:45:17 PM
Hello nice code and pool..... hoppe the luck will be back......

but what can i do for nextid() to find a matching id?

nextid(): No matching idname='userid'
cmd_adduser() reg5286.failed.DBE


tables are all created, and the db is raning/connect.....

Invalid username, password or email address - please try again


so thanks for all the fish.....


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on May 08, 2016, 09:55:44 AM
initid.sh


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: bonso on May 08, 2016, 06:46:36 PM
Thanks, but can i eat it?

or how must eat it? ckdb or ckpool?

the output is nice....

when must i exec. it ?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on May 08, 2016, 09:15:32 PM
Read the ckdb_cmd.c code.
If you don't understand the code, and how initid.sh relates to that, then CKDB is too complex for you to use.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: SpecialFish on July 22, 2016, 02:43:01 PM
Hi,

I Have been working on this most of the day, trying different things, ckdb and ckpool are talking. the notifier can find straifier for blockupdates

the only problem I have is when I connect I get an error

nextid(): No matching idname='userid'

I have tried running ./initid.sh before hand but no luck.

I had imported the ckdb.sql database originally, Should there have been another as I notice many sql files, or should there be an order to each one.

Thanks if you can help.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on July 22, 2016, 03:22:25 PM
Hi,

I Have been working on this most of the day, trying different things, ckdb and ckpool are talking. the notifier can find straifier for blockupdates

the only problem I have is when I connect I get an error

nextid(): No matching idname='userid'

I have tried running ./initid.sh before hand but no luck.

I had imported the ckdb.sql database originally, Should there have been another as I notice many sql files, or should there be an order to each one.

Thanks if you can help.
ckdb.sql is always the current version.
It says the version, rather obviously, on the end.

The other ones are for upgrading versions.

CKDB will report if the database is the wrong version and wont start.

nextid() error means you didn't apply initid.sh to the database


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: SpecialFish on July 22, 2016, 04:11:18 PM
Hi,

I Have been working on this most of the day, trying different things, ckdb and ckpool are talking. the notifier can find straifier for blockupdates

the only problem I have is when I connect I get an error

nextid(): No matching idname='userid'

I have tried running ./initid.sh before hand but no luck.

I had imported the ckdb.sql database originally, Should there have been another as I notice many sql files, or should there be an order to each one.

Thanks if you can help.
ckdb.sql is always the current version.
It says the version, rather obviously, on the end.

The other ones are for upgrading versions.

CKDB will report if the database is the wrong version and wont start.

nextid() error means you didn't apply initid.sh to the database

Right okay, Thanks for the tip, il look into that right away.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: SpecialFish on July 22, 2016, 04:51:36 PM
Hi,

I Have been working on this most of the day, trying different things, ckdb and ckpool are talking. the notifier can find straifier for blockupdates

the only problem I have is when I connect I get an error

nextid(): No matching idname='userid'

I have tried running ./initid.sh before hand but no luck.

I had imported the ckdb.sql database originally, Should there have been another as I notice many sql files, or should there be an order to each one.

Thanks if you can help.
ckdb.sql is always the current version.
It says the version, rather obviously, on the end.

The other ones are for upgrading versions.

CKDB will report if the database is the wrong version and wont start.

nextid() error means you didn't apply initid.sh to the database

Hi Kano,

What is the most appropriate way to apply this to the db (Im kinda new with PostgrSQL) I know MySQL/PHP very well though. so if you need SQL statements im okay with them.
When I try to apply the ID's because there is no data already in the Database it expects an expirydate also as primary key. which the initid.sh does not have.

Thanks for any help.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on July 22, 2016, 10:30:17 PM
Hi,

I Have been working on this most of the day, trying different things, ckdb and ckpool are talking. the notifier can find straifier for blockupdates

the only problem I have is when I connect I get an error

nextid(): No matching idname='userid'

I have tried running ./initid.sh before hand but no luck.

I had imported the ckdb.sql database originally, Should there have been another as I notice many sql files, or should there be an order to each one.

Thanks if you can help.
ckdb.sql is always the current version.
It says the version, rather obviously, on the end.

The other ones are for upgrading versions.

CKDB will report if the database is the wrong version and wont start.

nextid() error means you didn't apply initid.sh to the database

Hi Kano,

What is the most appropriate way to apply this to the db (Im kinda new with PostgrSQL) I know MySQL/PHP very well though. so if you need SQL statements im okay with them.
When I try to apply the ID's because there is no data already in the Database it expects an expirydate also as primary key. which the initid.sh does not have.

Thanks for any help.
The output of initid.sh is in the socket format that ckdb reads.
It's obviously not SQL.
Send it to ckdb with ckpmsg


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: SpecialFish on July 23, 2016, 01:18:45 AM
The output of initid.sh is in the socket format that ckdb reads.
It's obviously not SQL.
Send it to ckdb with ckpmsg

We can tell that. What do you make of this

Quote
bitcoinuser@vultr:~/ckpool/sql$ ./initid.sh | ckpmsg -s /opt
[2016-07-23 01:15:16+00] Got message: newid.workerid.idname=workerid    idvalue=20160723100000
Opened client path /opt/ckpool/listener successfully on socket 3
[2016-07-23 01:15:16+00] Received response: unknown
[2016-07-23 01:15:16+00] Got message: newid.paymentid.idname=paymentid  idvalue=20160723200000
Opened client path /opt/ckpool/listener successfully on socket 3
[2016-07-23 01:15:16+00] Received response: unknown
[2016-07-23 01:15:16+00] Got message: newid.authid.idname=authid        idvalue=20160723300000
Opened client path /opt/ckpool/listener successfully on socket 3
[2016-07-23 01:15:16+00] Received response: unknown
[2016-07-23 01:15:16+00] Got message: newid.userid.idname=userid        idvalue=20160723400000
Opened client path /opt/ckpool/listener successfully on socket 3
[2016-07-23 01:15:16+00] Received response: unknown
[2016-07-23 01:15:16+00] Got message: newid.markerid.idname=markerid    idvalue=20160723500000
Opened client path /opt/ckpool/listener successfully on socket 3
[2016-07-23 01:15:16+00] Received response: unknown
[2016-07-23 01:15:16+00] Got message: newid.paymentaddressid.idname=paymentaddressid    idvalue=20160723600000
Opened client path /opt/ckpool/listener successfully on socket 3
[2016-07-23 01:15:16+00] Received response: unknown
[2016-07-23 01:15:16+00] Got message: newid.payoutid.idname=payoutid    idvalue=20160723700000
Opened client path /opt/ckpool/listener successfully on socket 3
[2016-07-23 01:15:16+00] Received response: unknown
Failed to get a valid line
bitcoinuser@vultr:~/ckpool/sql$  

Where is the response meant to be coming from... ckdb?. There is not much documentation around this part. I would love to get this working as its a solid product.

Thank you for your help btw.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on July 23, 2016, 10:25:56 AM
... as it says, you sent it to ckpool, not ckdb.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: SpecialFish on July 23, 2016, 01:01:27 PM
... as it says, you sent it to ckpool, not ckdb.

Up and working now, I am sure I had tried that but obviously haven't.

Thanks for the help Kano, Really appreciate it.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: SpecialFish on July 24, 2016, 03:15:11 AM
Fixed the php error.

I did notice in uthash.h though...

Quote
Line 426: hashv = 0xfeedbeef;

This amused me.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: chillfactr on August 31, 2016, 06:28:17 AM
I think i got ckproxy setup,
i run ckpool -A -p and i get this.  any "help" would be appreciated

-A -p
[2016-08-31 00:23:29.100] ckproxy generator starting
[2016-08-31 00:23:29.100] ckproxy stratifier starting
[2016-08-31 00:23:29.101] ckproxy connector starting
[2016-08-31 00:23:29.104] ckproxy connector ready
[2016-08-31 00:23:29.105] ckproxy stratifier ready
[2016-08-31 00:23:49.335] Failed initial subscribe to solo.ckpool.org:80 !

 ??? ??? ???


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on August 31, 2016, 11:43:35 AM
I think i got ckproxy setup,
i run ckpool -A -p and i get this.  any "help" would be appreciated

-A -p
[2016-08-31 00:23:29.100] ckproxy generator starting
[2016-08-31 00:23:29.100] ckproxy stratifier starting
[2016-08-31 00:23:29.101] ckproxy connector starting
[2016-08-31 00:23:29.104] ckproxy connector ready
[2016-08-31 00:23:29.105] ckproxy stratifier ready
[2016-08-31 00:23:49.335] Failed initial subscribe to solo.ckpool.org:80 !

 ??? ??? ???
There is no stratum server at solo.ckpool.org:80 ... (hint, port)


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: chillfactr on September 01, 2016, 01:27:13 AM
I think i got ckproxy setup,
i run ckpool -A -p and i get this.  any "help" would be appreciated

-A -p
[2016-08-31 00:23:29.100] ckproxy generator starting
[2016-08-31 00:23:29.100] ckproxy stratifier starting
[2016-08-31 00:23:29.101] ckproxy connector starting
[2016-08-31 00:23:29.104] ckproxy connector ready
[2016-08-31 00:23:29.105] ckproxy stratifier ready
[2016-08-31 00:23:49.335] Failed initial subscribe to solo.ckpool.org:80 !

 ??? ??? ???
There is no stratum server at solo.ckpool.org:80 ... (hint, port)

ah HAH, Thanx -ck


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: chillfactr on September 01, 2016, 04:54:35 AM
Ok now im stuck, and lost
anyone know what .conf i need to edit? -ck?
Thank you  :o




ckpool -A -p
[2016-08-31 22:42:16.579] ckproxy stratifier starting
[2016-08-31 22:42:16.579] ckproxy generator starting
[2016-08-31 22:42:16.581] ckproxy connector starting
[2016-08-31 22:42:16.581] ckproxy stratifier ready
[2016-08-31 22:42:16.582] ckproxy connector ready
[2016-08-31 22:42:16.778] Proxy 0:0 solo.ckpool.org:3333 failed to authorise in auth_stratum, got: {"id":42,"error":null,"result":false,"node.method":"auth.result"}
[2016-08-31 22:42:16.778] Failed initial authorise to solo.ckpool.org:3333 with user: !




Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on September 01, 2016, 04:59:41 AM
Ok now im stuck, and lost
anyone know what .conf i need to edit? -ck?
Thank you  :o




ckpool -A -p
[2016-08-31 22:42:16.579] ckproxy stratifier starting
[2016-08-31 22:42:16.579] ckproxy generator starting
[2016-08-31 22:42:16.581] ckproxy connector starting
[2016-08-31 22:42:16.581] ckproxy stratifier ready
[2016-08-31 22:42:16.582] ckproxy connector ready
[2016-08-31 22:42:16.778] Proxy 0:0 solo.ckpool.org:3333 failed to authorise in auth_stratum, got: {"id":42,"error":null,"result":false,"node.method":"auth.result"}
[2016-08-31 22:42:16.778] Failed initial authorise to solo.ckpool.org:3333 with user: !



You need to add a valid workername for the pool you're trying to mine to in the ckproxy.conf file (in this case a valid workername is a bitcoin address with any worker extension such as 1PKN98VN2z5gwSGZvGKS2bj8aADZBkyhkZ.proxy ).


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: chillfactr on September 01, 2016, 05:16:24 AM
Ok now im stuck, and lost
anyone know what .conf i need to edit? -ck?
Thank you  :o




ckpool -A -p
[2016-08-31 22:42:16.579] ckproxy stratifier starting
[2016-08-31 22:42:16.579] ckproxy generator starting
[2016-08-31 22:42:16.581] ckproxy connector starting
[2016-08-31 22:42:16.581] ckproxy stratifier ready
[2016-08-31 22:42:16.582] ckproxy connector ready
[2016-08-31 22:42:16.778] Proxy 0:0 solo.ckpool.org:3333 failed to authorise in auth_stratum, got: {"id":42,"error":null,"result":false,"node.method":"auth.result"}
[2016-08-31 22:42:16.778] Failed initial authorise to solo.ckpool.org:3333 with user: !



You need to add a valid workername for the pool you're trying to mine to in the ckproxy.conf file (in this case a valid workername is a bitcoin address with any worker extension such as 1PKN98VN2z5gwSGZvGKS2bj8aADZBkyhkZ.proxy ).

Thank you sooo much -ck   cant wait till i hit that solo block thats coming up.  lol  get ready for the tip



Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: chillfactr on September 01, 2016, 06:12:32 AM
Ok now im stuck, and lost
anyone know what .conf i need to edit? -ck?
Thank you  :o




ckpool -A -p
[2016-08-31 22:42:16.579] ckproxy stratifier starting
[2016-08-31 22:42:16.579] ckproxy generator starting
[2016-08-31 22:42:16.581] ckproxy connector starting
[2016-08-31 22:42:16.581] ckproxy stratifier ready
[2016-08-31 22:42:16.582] ckproxy connector ready
[2016-08-31 22:42:16.778] Proxy 0:0 solo.ckpool.org:3333 failed to authorise in auth_stratum, got: {"id":42,"error":null,"result":false,"node.method":"auth.result"}
[2016-08-31 22:42:16.778] Failed initial authorise to solo.ckpool.org:3333 with user: !



You need to add a valid workername for the pool you're trying to mine to in the ckproxy.conf file (in this case a valid workername is a bitcoin address with any worker extension such as 1PKN98VN2z5gwSGZvGKS2bj8aADZBkyhkZ.proxy ).


I do not see where to add worker name in the ckproxy.conf file. would it be in the ckpool.conf file?
this is all i see in ckproxy.conf, where would it go?
{
"proxy" :  [
        {
                "url" : "ckpool.org:3333",
                "auth" : "user",
                "pass" : "pass"
        },
        {
                "url" : "backup.ckpool.org:3333",
                "auth" : "user",
                "pass" : "pass"
        }
],
"update_interval" : 30,
"serverurl" : "192.168.1.100:3334",
"mindiff" : 1,
"startdiff" : 42,
"logdir" : "logs"
}
Comments from here on are ignored.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on September 01, 2016, 06:15:12 AM
Ok now im stuck, and lost
anyone know what .conf i need to edit? -ck?
Thank you  :o




ckpool -A -p
[2016-08-31 22:42:16.579] ckproxy stratifier starting
[2016-08-31 22:42:16.579] ckproxy generator starting
[2016-08-31 22:42:16.581] ckproxy connector starting
[2016-08-31 22:42:16.581] ckproxy stratifier ready
[2016-08-31 22:42:16.582] ckproxy connector ready
[2016-08-31 22:42:16.778] Proxy 0:0 solo.ckpool.org:3333 failed to authorise in auth_stratum, got: {"id":42,"error":null,"result":false,"node.method":"auth.result"}
[2016-08-31 22:42:16.778] Failed initial authorise to solo.ckpool.org:3333 with user: !



You need to add a valid workername for the pool you're trying to mine to in the ckproxy.conf file (in this case a valid workername is a bitcoin address with any worker extension such as 1PKN98VN2z5gwSGZvGKS2bj8aADZBkyhkZ.proxy ).


I do not see where to add worker name in the ckproxy.conf file. would it be in the ckpool.conf file?
this is all i see in ckproxy.conf, where would it go?
{
"proxy" :  [
        {
                "url" : "ckpool.org:3333",
                "auth" : "user",
                "pass" : "pass"
        },
        {
                "url" : "backup.ckpool.org:3333",
                "auth" : "user",
                "pass" : "pass"
        }
],
"update_interval" : 30,
"serverurl" : "192.168.1.100:3334",
"mindiff" : 1,
"startdiff" : 42,
"logdir" : "logs"
}
Comments from here on are ignored.
auth is your workername


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: chillfactr on September 01, 2016, 06:26:58 AM
Ok now im stuck, and lost
anyone know what .conf i need to edit? -ck?
Thank you  :o




ckpool -A -p
[2016-08-31 22:42:16.579] ckproxy stratifier starting
[2016-08-31 22:42:16.579] ckproxy generator starting
[2016-08-31 22:42:16.581] ckproxy connector starting
[2016-08-31 22:42:16.581] ckproxy stratifier ready
[2016-08-31 22:42:16.582] ckproxy connector ready
[2016-08-31 22:42:16.778] Proxy 0:0 solo.ckpool.org:3333 failed to authorise in auth_stratum, got: {"id":42,"error":null,"result":false,"node.method":"auth.result"}
[2016-08-31 22:42:16.778] Failed initial authorise to solo.ckpool.org:3333 with user: !



You need to add a valid workername for the pool you're trying to mine to in the ckproxy.conf file (in this case a valid workername is a bitcoin address with any worker extension such as 1PKN98VN2z5gwSGZvGKS2bj8aADZBkyhkZ.proxy ).


I do not see where to add worker name in the ckproxy.conf file. would it be in the ckpool.conf file?
this is all i see in ckproxy.conf, where would it go?
{
"proxy" :  [
        {
                "url" : "ckpool.org:3333",
                "auth" : "user",
                "pass" : "pass"
        },
        {
                "url" : "backup.ckpool.org:3333",
                "auth" : "user",
                "pass" : "pass"
        }
],
"update_interval" : 30,
"serverurl" : "192.168.1.100:3334",
"mindiff" : 1,
"startdiff" : 42,
"logdir" : "logs"
}
Comments from here on are ignored.
auth is your workername

OMG  i am running!!!! ;D ;D ;D ;D
thank you -ck


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: chillfactr on September 11, 2016, 02:36:59 PM
Ok now im stuck, and lost
anyone know what .conf i need to edit? -ck?
Thank you  :o




ckpool -A -p
[2016-08-31 22:42:16.579] ckproxy stratifier starting
[2016-08-31 22:42:16.579] ckproxy generator starting
[2016-08-31 22:42:16.581] ckproxy connector starting
[2016-08-31 22:42:16.581] ckproxy stratifier ready
[2016-08-31 22:42:16.582] ckproxy connector ready
[2016-08-31 22:42:16.778] Proxy 0:0 solo.ckpool.org:3333 failed to authorise in auth_stratum, got: {"id":42,"error":null,"result":false,"node.method":"auth.result"}
[2016-08-31 22:42:16.778] Failed initial authorise to solo.ckpool.org:3333 with user: !



You need to add a valid workername for the pool you're trying to mine to in the ckproxy.conf file (in this case a valid workername is a bitcoin address with any worker extension such as 1PKN98VN2z5gwSGZvGKS2bj8aADZBkyhkZ.proxy ).


I do not see where to add worker name in the ckproxy.conf file. would it be in the ckpool.conf file?
this is all i see in ckproxy.conf, where would it go?
{
"proxy" :  [
        {
                "url" : "ckpool.org:3333",
                "auth" : "user",
                "pass" : "pass"
        },
        {
                "url" : "backup.ckpool.org:3333",
                "auth" : "user",
                "pass" : "pass"
        }
],
"update_interval" : 30,
"serverurl" : "192.168.1.100:3334",
"mindiff" : 1,
"startdiff" : 42,
"logdir" : "logs"
}
Comments from here on are ignored.
auth is your workername

OMG  i am running!!!! ;D ;D ;D ;D
thank you -ck

Thank you for your wise words -ck

Tip finally went through
c60949e9409df0f79ea040fa82a906e4cf4c2ab6e00047b094972b7a34b4ed70


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on September 11, 2016, 08:48:37 PM
Thank you for your wise words -ck

Tip finally went through
c60949e9409df0f79ea040fa82a906e4cf4c2ab6e00047b094972b7a34b4ed70
Awesome, congrats on the block solve and thanks for donation! (You can't send money till the block has matured; well you can send it but it won't go anywhere till it matures.)


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: chillfactr on September 13, 2016, 03:27:07 AM
Thank you for your wise words -ck

Tip finally went through
c60949e9409df0f79ea040fa82a906e4cf4c2ab6e00047b094972b7a34b4ed70
Awesome, congrats on the block solve and thanks for donation! (You can't send money till the block has matured; well you can send it but it won't go anywhere till it matures.)

Yeah it took me a day or two to figure that out, lol i got worried and was like whats going on?
But its all good now.   :)


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: Subw on September 15, 2016, 12:48:30 PM
ck, is it possible to make a support for reconnect (https://en.bitcoin.it/wiki/Stratum_mining_protocol#client.reconnect) command?
i think this is a problem with MRR service


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on September 15, 2016, 01:05:48 PM
ck, is it possible to make a support for reconnect (https://en.bitcoin.it/wiki/Stratum_mining_protocol#client.reconnect) command?
i think this is a problem with MRR service
There's supposed to be support, though I believe it broke somewhere along the line. I'll look into it when time permits.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on September 19, 2016, 01:40:12 PM
ck, is it possible to make a support for reconnect (https://en.bitcoin.it/wiki/Stratum_mining_protocol#client.reconnect) command?
i think this is a problem with MRR service
There's supposed to be support, though I believe it broke somewhere along the line. I'll look into it when time permits.
This is now fixed in git master.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: MFahad on September 19, 2016, 04:29:22 PM
I love all the work that you have done with this and your other projects.  I just hope that people watch these new pools closely.  When it becomes this easy to deploy a mining pool, and the startup costs become no more than the domain, the server and maybe some promotion. Does this make for unqualified pool owners and managers?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: 2girls on September 19, 2016, 05:31:55 PM
When we see questions about simple changes to conf files on projects like this, to me that shows that we are going to have a lot of pools coming out.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on September 19, 2016, 11:14:12 PM
I love all the work that you have done with this and your other projects.  I just hope that people watch these new pools closely.  When it becomes this easy to deploy a mining pool, and the startup costs become no more than the domain, the server and maybe some promotion. Does this make for unqualified pool owners and managers?
Providing the software for free to run a good pool is indeed a two edged sword.

It lowers the barrier of entry to the point where anyone with the minimum necessary knowledge can start up a pool which is not a good thing because a pool needs to be run by someone who is a software and networking expert in their own right and can provide the kind of 24/7 experienced support and maintenance that a good server needs, not just 'some random guy renting out a vps.'

However it also provides the bitcoin world with a well tested, developed, scalable solution that is designed from the ground up to provide the best experience for miners and hardware that does not waste hashrate, electricity, and make hardware misbehave, along with a block creation system that is guaranteed to support the bitcoin blockchain in the best manner possible, not creating empty, partially validated blocks and skimping on transactions - which is the whole point of bitcoin. The mining was never meant to be a means unto itself, it was meant to be a system to validate transactions. Pools that choose software options that don't do this are harming or at least holding back bitcoin's growth and maturity - the four largest pools all do this - one has even published new pool software code that encourages it.

Providing free software is also a two edged sword, but that debate is better left elsewhere. My sum position is the software world at large has realised that it is better off with free software as it helps improve the global pool of knowledge more than it helps just lining the pockets of the people who created the software in the first place. I've always believed in this ideal and pushed my contractors to choose free software when possible, and even charge less to write free software than private code.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: noormcs5 on September 21, 2016, 03:27:32 PM
I love all the work that you have done with this and your other projects.  I just hope that people watch these new pools closely.  When it becomes this easy to deploy a mining pool, and the startup costs become no more than the domain, the server and maybe some promotion. Does this make for unqualified pool owners and managers?
Providing the software for free to run a good pool is indeed a two edged sword.

It lowers the barrier of entry to the point where anyone with the minimum necessary knowledge can start up a pool which is not a good thing because a pool needs to be run by someone who is a software and networking expert in their own right and can provide the kind of 24/7 experienced support and maintenance that a good server needs, not just 'some random guy renting out a vps.'

However it also provides the bitcoin world with a well tested, developed, scalable solution that is designed from the ground up to provide the best experience for miners and hardware that does not waste hashrate, electricity, and make hardware misbehave, along with a block creation system that is guaranteed to support the bitcoin blockchain in the best manner possible, not creating empty, partially validated blocks and skimping on transactions - which is the whole point of bitcoin. The mining was never meant to be a means unto itself, it was meant to be a system to validate transactions. Pools that choose software options that don't do this are harming or at least holding back bitcoin's growth and maturity - the four largest pools all do this - one has even published new pool software code that encourages it.

Providing free software is also a two edged sword, but that debate is better left elsewhere. My sum position is the software world at large has realised that it is better off with free software as it helps improve the global pool of knowledge more than it helps just lining the pockets of the people who created the software in the first place. I've always believed in this ideal and pushed my contractors to choose free software when possible, and even charge less to write free software than private code.

With luck, even those that have little knowledge will slide through without losing people's money.  Some people will scam, some people will simply fail and lose the funds.  I love the software, I would love to jump on it myself and actually considered using it to combine the efforts of multiple miners at my office and home.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: posternat on September 22, 2016, 03:23:07 PM
but I think that it should be password zipped and the password is only given at the end of a short test about simple things, terminal use in Ubuntu, PHP errors, basic Java debugging and maybe even a few questions on ethics,  :)


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: oser41eric on October 02, 2016, 12:33:02 PM
Maximum number of miners can be connected to a ckproxy is unlimited or limited?
Thank you


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on October 02, 2016, 12:34:51 PM
Maximum number of miners can be connected to a ckproxy is unlimited or limited?
Thank you
Unlimited. You'll have to configure your linux box to have enough open files to cope.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: jx16rman on December 01, 2016, 10:55:11 AM
when i exec ./initid.sh | ckpmsg /tmp

the ckdb log show me

[2016-12-01 18:30:58.978+08] Command disallowed for pool: 'Newid.workerid.idname=workerid0x09idvalue=...
[2016-12-01 18:30:58.979+08] Command disallowed for pool: 'Newid.paymentid.idname=paymentid0x09idvalu...
[2016-12-01 18:30:58.979+08] Command disallowed for pool: 'Newid.authid.idname=authid0x09idvalue=2016...
[2016-12-01 18:30:58.979+08] Command disallowed for pool: 'Newid.userid.idname=userid0x09idvalue=2016...
[2016-12-01 18:30:58.979+08] Command disallowed for pool: 'Newid.markerid.idname=markerid0x09idvalue=...
[2016-12-01 18:30:58.979+08] Command disallowed for pool: 'Newid.paymentaddressid.idname=paymentaddre...
[2016-12-01 18:30:58.980+08] Command disallowed for pool: 'Newid.payoutid.idname=payoutid0x09idvalue=...


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on December 03, 2016, 03:57:39 AM
Use php ckdb.php - not ckpmsg - there's problems using ckpmsg - and ckdb.php points to the correct socket if you are using /opt/ (don't use /tmp/)

Your error above means it sent it to the wrong socket.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: chasdabigone on January 15, 2017, 09:35:10 PM
Has anyone tried using the raspberry pi zero as a proxy? I was thinking of attaching one to each of my miners so that I can use wifi to change the address it is pointed to without disrupting the miner. Will it be fast enough?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: irritant on January 16, 2017, 12:30:34 AM
Has anyone tried using the raspberry pi zero as a proxy? I was thinking of attaching one to each of my miners so that I can use wifi to change the address it is pointed to without disrupting the miner. Will it be fast enough?

how do you intend to use wifi with the pi zero? you would need a wifi usb thing at least , because it doesn't have it on board iirc


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: chasdabigone on January 16, 2017, 12:33:13 AM
Has anyone tried using the raspberry pi zero as a proxy? I was thinking of attaching one to each of my miners so that I can use wifi to change the address it is pointed to without disrupting the miner. Will it be fast enough?

how do you intend to use wifi with the pi zero? you would need a wifi usb thing at least , because it doesn't have it on board iirc


I have some hats with extra usb ports and a built in wifi chip.

https://www.kickstarter.com/projects/1728237598/hubpiwi-raspberry-pi-zero-hub-with-wifi-no-cable-c/


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on January 23, 2017, 02:53:52 AM
Please note that I am no longer a developer on this project.
I run my own private git, and because of that the project owner decided to remove my access to the project.
I was effectively the only developer of CKDB on this project, so that no longer has any support.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on January 24, 2017, 01:29:27 AM
I maintain two private gits of ckpool, one for the solo ckpool which includes code that I do not plan to make public as it is the only thing that separates solo ckpool from any other. The other private git has code that is funded privately from a BitmainWarranty representative but all the code eventually gets pushed upstream to the master ckpool git.

As Kano said, ckdb support for this project is now in limbo as it currently has no maintainer. He had intimated his dissatisfaction with my contribution to his pool and that he would no longer be upstreaming his ckdb changes to the master git so it seemed inappropriate for him to have write access to the ckpool git any more. Once I revoked that it led to a cascade of events with him rage quitting the #ckpool IRC channel which implied to me he no longer wanted to have anything to do with me and my projects so I revoked his IRC channel operator and cgminer access as well. Should he wish to continue contributing I would reinstate his write access but he said he wouldn't upstream his code anyway and I doubt he wants to contribute to my projects any more since I've effectively not been contributing to his and I suspect he harbours an awful lot of ill will towards me now.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on January 26, 2017, 11:31:57 PM
My IRC comments (all, none missing) that he calls "cascade of events" and "rage quitting" :)

11:50 <@kanoi> yeah I have for you for ages : ) just finally got bored with that : )

Then I got a notification popup about being removed from the 'so called' BitmainWarranty git (that said 11:52)
I didn't realise there was also a message for the main git - my email notifier only shows the last message subject each time it checks
My next 2 comments were, in reference to that hidden git I had access to revoked:

11:58 <@kanoi> lol
...
11:58 <@kanoi> don't even know the last time I looked at it :)
...
12:01 <@kanoi> well I have my own private of the main one coz the 3 that exist are silly - one for solo that never checks any effect it has on a real pool, one for Lightsword that has a whole bunch of closed source that I'd never go near, and one public that randomly doesn't work

In reference to ckdb no longer having support that he was so happy about:
12:03 <@kanoi> the one part that always works :D
...
12:03 <@kanoi> actually there's about 5 but anyway :P
12:04 <@kanoi> (all of the others larger than me :P)
...
12:05 <@kanoi> yep - I don't consider lack of money a good reason to commit code that fails
...
12:06 <@kanoi> well choose one or the other :)
12:06 <@kanoi> s/and/or/ :)

Then I checked my email and found that I had been removed from the main git also back at 11:52, that has more code in it by me than him.
Thus since he removed my access to the public ckpool git and the irc channel being the #ckpool channel:
12:13 <@kanoi> oh lol it was both gits - well that means I've no reason to be in here :)
12:13 -!- kanoi [~kanoi@...] has left #ckpool []

After I left, I saw this in the #cgminer thread:
12:12 -!- mode/#cgminer [+o conman] by ChanServ
12:13 -!- mode/#cgminer [-o kanoi] by ChanServ
Meaning he'd taken away my IRC privs in #cgminer, and I found he'd also taken away my cgminer git access.
So I:
12:13 -!- kanoi [~kanoi@...] has left #cgminer []

So I went and created the #kano.is channel in my sig - since that's what I run, and monitor, the real pool, and have always run since I started it.

Thus the above comment:
https://bitcointalk.org/index.php?topic=790323.msg17590873#msg17590873


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on January 27, 2017, 01:44:15 AM
...
Should he wish to continue contributing I would reinstate his write access but he said he wouldn't upstream his code anyway and I doubt he wants to contribute to my projects any more since I've effectively not been contributing to his ...
Oh! Silly me who thought the project was ckpool and ckdb.

Lulz - "reinstate"
You mean it was just you throwing a public tantrum at the time locking me out of 2 projects (ckpool and cgminer) and removing my privs in 2 irc channels?

I had already stated that I would only update the public git if paid to make changes.
Like you do for Bitmain for most of the changes you make.
I must do it for free?

Will and Bitmain/BitClub have paid (a lot) for most of your work in ckpool
... though my tiny contribution to you (of my own choice) of only about 120 BTC over the 2 years probably counts for nothing ... since you have ignored some changes I've requested ...


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: mrbodz on January 29, 2017, 02:26:45 AM
While trying to setup ckpool i needed a way to integrate ckpool with other pool frontends.

So here's my version written in python

https://github.com/ahmedbodi/PyCKDB/

ATM it only handles user authentication and share inserts for MPOS.

Tip Jar for anyone who finds it useful: 1D9sGeqx5TVzcCSdmiUqxtdqbc8puyVM9N

I'll try and keep it maintained and up to date

Ahmed


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on January 29, 2017, 02:27:39 AM
While trying to setup ckpool i needed a way to integrate ckpool with other pool frontends.

So here's my version written in python

https://github.com/ahmedbodi/PyCKDB/

ATM it only handles user authentication and share inserts for MPOS.

Tip Jar for anyone who finds it useful: 1D9sGeqx5TVzcCSdmiUqxtdqbc8puyVM9N

I'll try and keep it maintained and up to date

Ahmed
Thanks for that, I'm sure someone out there might find it quite helpful.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: mrbodz on January 31, 2017, 06:39:50 PM
While trying to setup ckpool i needed a way to integrate ckpool with other pool frontends.

So here's my version written in python

https://github.com/ahmedbodi/PyCKDB/

ATM it only handles user authentication and share inserts for MPOS.

Tip Jar for anyone who finds it useful: 1D9sGeqx5TVzcCSdmiUqxtdqbc8puyVM9N

I'll try and keep it maintained and up to date

Ahmed

An update fixing the handling of the "BLOCK" commands and auto-creating workers in the db if the user already exists has been made

Ahmed


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: agentcash on March 05, 2017, 09:16:23 AM
Tried to set up ckproxy on a Raspberry Pi. Threw these errors while making

Code:
stratifier.c: In function ‘read_userstats’:
stratifier.c:5126:2: warning: passing argument 1 of ‘json_get_int64’ from incompatible pointer type [enabled by default]
ckpool.h:371:6: note: expected ‘int64_t *’ but argument is of type ‘__time_t *’
stratifier.c: In function ‘read_workerstats’:
stratifier.c:5179:2: warning: passing argument 1 of ‘json_get_int64’ from incompatible pointer type [enabled by default]
ckpool.h:371:6: note: expected ‘int64_t *’ but argument is of type ‘__time_t *’
stratifier.c: In function ‘read_poolstats’:
stratifier.c:8487:2: warning: passing argument 1 of ‘json_get_int64’ from incompatible pointer type [enabled by default]
ckpool.h:371:6: note: expected ‘int64_t *’ but argument is of type ‘__time_t *’

Then when run it complains thusly
Code:
[2017-03-05 01:13:19.278] ckproxy stratifier ready
[2017-03-05 01:13:19.397] Invalid json line:1 col:14 pos:14 text: NULL string argument from generator.c send_subscribe:1485
[2017-03-05 01:13:19.400] Failed to json decode subscribe response in update_subscribe (null)
[2017-03-05 01:13:19.403] Invalid json line:1 col:4 pos:4 text: NULL string argument from generator.c send_diff:1251
[2017-03-05 01:13:19.406] Failed to json decode in update_diff
[2017-03-05 01:13:19.409] Invalid json line:1 col:4 pos:4 text: NULL string argument from generator.c send_notify:1278 with errno 11: Resource temporarily unavailable
[2017-03-05 01:13:19.412] Failed to json decode in update_notify
[2017-03-05 01:13:19.414] Invalid json line:1 col:4 pos:4 text: NULL string argument from generator.c send_diff:1251 with errno 11: Resource temporarily unavailable
[2017-03-05 01:13:19.417] Failed to json decode in update_diff

the NULL errors keep repeating every few seconds.

Is it a lost cause due to the yasm requirement?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on March 05, 2017, 09:33:24 AM
Tried to set up ckproxy on a Raspberry Pi. Threw these errors while making

Code:
stratifier.c: In function ‘read_userstats’:
stratifier.c:5126:2: warning: passing argument 1 of ‘json_get_int64’ from incompatible pointer type [enabled by default]
ckpool.h:371:6: note: expected ‘int64_t *’ but argument is of type ‘__time_t *’
stratifier.c: In function ‘read_workerstats’:
stratifier.c:5179:2: warning: passing argument 1 of ‘json_get_int64’ from incompatible pointer type [enabled by default]
ckpool.h:371:6: note: expected ‘int64_t *’ but argument is of type ‘__time_t *’
stratifier.c: In function ‘read_poolstats’:
stratifier.c:8487:2: warning: passing argument 1 of ‘json_get_int64’ from incompatible pointer type [enabled by default]
ckpool.h:371:6: note: expected ‘int64_t *’ but argument is of type ‘__time_t *’

ckpool/proxy is 64bit only. Did you compile it on a 32 bit environment?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: agentcash on March 05, 2017, 09:48:37 AM
Yep, this is an old 32 bit Pi. I'll give it a try on 64 bit model 3 with 64bit suse tomorrow and report back.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: agentcash on March 06, 2017, 02:02:31 AM
Seems to be working great on RPi3 running 64bit OpenSuse Leap - https://en.opensuse.org/HCL:Raspberry_Pi3

instead of apt-get just run
Code:
  zypper in yasm autoconf libtool git
  zypper in --type pattern devel_basis

then follow the rest of the install instructions. Thanks ck!


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: agentcash on March 15, 2017, 08:00:09 PM
My setup has slush, kano, & solo.ckpool as proxies 0,1, & 2 respectively. Kano lost connectivity or restarted the pool a few hours ago and the proxies switched to it and stayed there for a few hours until I noticed and restarted them.

Code:
[2017-03-15 18:11:57.400] Proxy:{"current": 0, "active": 3, "total": 3}
[2017-03-15 18:12:34.834] Proxy 1:0 stratum+tcp://stratum.kano.is:3333 failed to read_socket_line in proxy_recv
[2017-03-15 18:12:34.834] Proxy 1:0 stratum+tcp://stratum.kano.is:3333 epoll hangup in proxy_recv
[2017-03-15 18:12:34.834] Proxy 1:stratum+tcp://stratum.kano.is:3333 failed, attempting reconnect
[2017-03-15 18:12:39.010] Found notify for new proxy 1:0 with enonce 159c0d5d nonce2len 8
[2017-03-15 18:12:39.010] Got updated subscribe for proxy 1
[2017-03-15 18:12:39.010] Upstream pool stratum+tcp://stratum.kano.is:3333 1 extranonce2 length 8, max proxy clients 4294967296
[2017-03-15 18:12:39.010] Stratifier setting active proxy to 1

Slush was still up and running fine the whole time judging by the logs. Is there a way to prevent this switch from happening on a pool restart?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on March 15, 2017, 09:20:08 PM
... Is there a way to prevent this switch from happening on a pool restart?
It's more a problem of knowing at what commit the ckpool programs are tested and working ...
As far as I know that is some time last year ...
The last tag is v0.9.4 2016-08-23 (for standard ckpool I run ded126d5 which is the same thing since there's no ckpool changes in between them and there's a deadlock some point after that and the workinfo changes after that can break ckdb shift processing and payouts)

The problem is that there's a collection of ckpool programs in there and they aren't all tested properly or at all (and at what version/commit):
Mining pool, standard proxy, passthru proxy, proxy node, remote node, redirector, bitmain's hidden ckpool api to manage ckpool programs directly.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: dogedood on March 22, 2017, 05:30:23 PM
... Is there a way to prevent this switch from happening on a pool restart?
It's more a problem of knowing at what commit the ckpool programs are tested and working ...
As far as I know that is some time last year ...
The last tag is v0.9.4 2016-08-23 (for standard ckpool I run ded126d5 which is the same thing since there's no ckpool changes in between them and there's a deadlock some point after that and the workinfo changes after that can break ckdb shift processing and payouts)

The problem is that there's a collection of ckpool programs in there and they aren't all tested properly or at all (and at what version/commit):
Mining pool, standard proxy, passthru proxy, proxy node, remote node, redirector, bitmain's hidden ckpool api to manage ckpool programs directly.

This deadlock you mention, can you provide more info?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on March 23, 2017, 09:02:57 PM
... Is there a way to prevent this switch from happening on a pool restart?
It's more a problem of knowing at what commit the ckpool programs are tested and working ...
As far as I know that is some time last year ...
The last tag is v0.9.4 2016-08-23 (for standard ckpool I run ded126d5 which is the same thing since there's no ckpool changes in between them and there's a deadlock some point after that and the workinfo changes after that can break ckdb shift processing and payouts)

The problem is that there's a collection of ckpool programs in there and they aren't all tested properly or at all (and at what version/commit):
Mining pool, standard proxy, passthru proxy, proxy node, remote node, redirector, bitmain's hidden ckpool api to manage ckpool programs directly.

This deadlock you mention, can you provide more info?
It's no longer relevant.
ckpool deadlocks talking to ckdb, he doesn't test his changes with ckdb ... i.e. Bitmain pays him to break ckdb ... often.
... and he doesn't even test the effects of his changes on all the other ckpool modules :P


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: agentcash on March 29, 2017, 01:04:10 AM
Might have a memory leak when running ckproxy. Had a Pi start acting up this morning after running fine for about 3 weeks. Turned out it ran out of free memory and the watchdog had trouble killing it and killed some system processes instead. Checked the other Pis and the ckproxy process was using high amounts of memory. Percentage-wise the memory on most of them had gone over 60%, where on a fresh start it's more around 6-7%.

Edit: To note the Pi that locked up was also the one handling the highest hashrate, so that may be related. Since it ran out of memory while the lower hashrate Pis still had some free.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on March 29, 2017, 01:09:33 AM
Might have a memory leak when running ckproxy. Had a Pi start acting up this morning after running fine for about 3 weeks. Turned out it ran out of free memory and the watchdog had trouble killing it and killed some system processes instead. Checked the other Pis and the ckproxy process was using high amounts of memory. Percentage-wise the memory on most of them had gone over 60%, where on a fresh start it's more around 6-7%.
There could well be, especially if you're running older code. Try running latest git if you haven't upgraded lately as the code has been dramatically updated. When time permits I'll do a more extensive search for memleaks with the proxy code.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: JanAndre on March 29, 2017, 12:42:24 PM
Hi guys, I hope this is the right thread to submit a question.
We have successfully installed, and started CKpool, but only in Standalone mode. It doesn't seems like we are receving any blocks, so i want to start the pool in regular mode. we have installed DB, so that should be ok. The problem is when we start with just ckpool, we can connect any workers.
I know im a noob in this, so Im hoping to get some tips of what could be wrong. Im helping out a freind in Asia, that have 70 units of Antminer S9 ready.
Any input would be helpful. Im not sure about the directory permissions and also the correct syntax to startup the pool.

There are so little information about CKpool and how to run it.

Please help! :)


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on March 29, 2017, 10:24:16 PM
Hi guys, I hope this is the right thread to submit a question.
We have successfully installed, and started CKpool, but only in Standalone mode. It doesn't seems like we are receving any blocks, so i want to start the pool in regular mode. we have installed DB, so that should be ok. The problem is when we start with just ckpool, we can connect any workers.
I know im a noob in this, so Im hoping to get some tips of what could be wrong. Im helping out a freind in Asia, that have 70 units of Antminer S9 ready.
Any input would be helpful. Im not sure about the directory permissions and also the correct syntax to startup the pool.

There are so little information about CKpool and how to run it.
The documentation is all in the ckpool readme for running it in standalone mode and it is well documented. If that is not clear enough then can I suggest you're probably not skilled enough to run a pool? If you're not finding blocks then you're not finding blocks; perhaps you don't even understand that 70 Antminer S9s is an extremely small hashrate to find blocks by today's standards.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: JanAndre on March 30, 2017, 12:21:25 PM
Thank you for your answer.. I found it a bit arrogant, but a answer anyway.
I'm not running the pool, I'm trying to help out friends in Asia, that dont understand English to good.

I would find your answer more helpful if it actually contained some info about the problem.

The only good information i got from your post, is that its maybe not a good idea to run CKpool with 'just' 70 units of Antminer S9. I will let the right persons know.

I know they are waiting to get a confirmation that the CKpool works, and they will purchase another 1000 units.

Have a nice day, regards Jan.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: Hannu on May 18, 2017, 03:36:42 PM
Oh no did i lost you on technical problems? "Cannot send to channel #ckpool" Nou! What is wrong with it? I use data cloud.
I dont have purpose to trolling or anything like that  ??? Technical data is important to me and if you need ask something. :(


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on May 18, 2017, 09:20:04 PM
Oh no did i lost you on technical problems? "Cannot send to channel #ckpool" Nou! What is wrong with it? I use data cloud.
I dont have purpose to trolling or anything like that  ??? Technical data is important to me and if you need ask something. :(
The IRC channel was under attack and moderation of the whole channel had to be turned on to manage it. This has been rectified now.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: makkotech on May 31, 2017, 04:27:06 AM
Awesome, Thank you, guys!!! Full Node running !!!, I am a Happy Panda lol, Guys I need a recommendation, what is the best option to run this like a behind process and close my terminal without killing the process, I try it using:

-  screen, Forever, pm2, & option, etc .. etc ..

But every time that I use one of those the process was broken, I need help to apply the best practice doing this last step.

Thank you in advance.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: o_solo_miner on May 31, 2017, 08:11:02 AM
If you use screen, you have to start screen first and then
your bitcoind in daemon mode with blocknotify:
bitcoind -daemon -blocknotify=/usr/bin/notify.sh

then you must start ckpool with your wanted option like this:
ckpool -A -s /opt/ckpool

and optional the Relaynetworkclient:
./relaynetworkclient 127.0.0.1 8333

or you use the Fibrenetwork in conjunction with bitcoind 14.1 and a propper bitcoin.conf

Some Help for Screen:

screen [ENTER]
CTRL A followed by CTRL C to open another Screen console
CTRL A followed by CTRL K to kill a Screen console
to switch between screen console
CTRL A followed by N for next screen
CTRL A followed by P for previous screen

If you want to return to main console, without stopping screen and all running processes:
CTRL A followed by D to detach from screen and return to main console
( ckpool and all other stuff you started is still running in the background, you can check that with top or
htop if you have it installed )

to reconnect later to a running screen just type:
screen -r [ENTER]

sometimes that is not possible and a message appears telling you allready connected
so you type screen -d -r [ENTER]

thats all

Quote
But every time that I use one of those the process was broken

is not very helpfull, please include the complete message for fault finding next time

EDIT: like allways typo


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: makkotech on May 31, 2017, 05:15:43 PM
If you use screen, you have to start screen first and then
your bitcoind in daemon mode with blocknotify:
bitcoind -daemon -blocknotify=/usr/bin/notify.sh

then you must start ckpool with your wanted option like this:
ckpool -A -s /opt/ckpool

and optional the Relaynetworkclient:
./relaynetworkclient 127.0.0.1 8333

or you use the Fibrenetwork in conjunction with bitcoind 14.1 and a propper bintcoin.conf

Some Help for Screen:

screen [ENTER]
CTRL A followed by CTRL C to open another Screen console
CTRL A followed by CTRL K to kill a Screen console
to switch between screen console
CTRL A followed by N for next screen
CTRL A followed by P for previous screen

If you want to return to main console, without stopping screen and all running processes:
CTRL A followed by D to detach from screen and return to main console
( ckpool and all other stuff you started is still running in the background, you can check that with top or
htop if you have it installed )

to reconnect later to a running screen just type:
screen -r [ENTER]

sometimes that is not possible and a message appears telling you allready connected
so you type screen -d -r [ENTER]

thats all

Quote
But every time that I use one of those the process was broken

is not very helpfull, please include the complete message for fault finding next time

EDIT: like allways


Awesome thank you for your response now my ckpool is running behind using screen, I am so Happy guys, all of you are amazing, I´ll keep you posted!! Next Goal: Implement a new node using ckdb !!!


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on August 09, 2017, 09:45:09 PM
My setup has slush, kano, & solo.ckpool as proxies 0,1, & 2 respectively. Kano lost connectivity or restarted the pool a few hours ago and the proxies switched to it and stayed there for a few hours until I noticed and restarted them.

Code:
[2017-03-15 18:11:57.400] Proxy:{"current": 0, "active": 3, "total": 3}
[2017-03-15 18:12:34.834] Proxy 1:0 stratum+tcp://stratum.kano.is:3333 failed to read_socket_line in proxy_recv
[2017-03-15 18:12:34.834] Proxy 1:0 stratum+tcp://stratum.kano.is:3333 epoll hangup in proxy_recv
[2017-03-15 18:12:34.834] Proxy 1:stratum+tcp://stratum.kano.is:3333 failed, attempting reconnect
[2017-03-15 18:12:39.010] Found notify for new proxy 1:0 with enonce 159c0d5d nonce2len 8
[2017-03-15 18:12:39.010] Got updated subscribe for proxy 1
[2017-03-15 18:12:39.010] Upstream pool stratum+tcp://stratum.kano.is:3333 1 extranonce2 length 8, max proxy clients 4294967296
[2017-03-15 18:12:39.010] Stratifier setting active proxy to 1

Slush was still up and running fine the whole time judging by the logs. Is there a way to prevent this switch from happening on a pool restart?
agentcash, there's a recent commit in the public git many months later that may (or may not) have to do with your problem:
https://bitbucket.org/ckolivas/ckpool/commits/e7f36cbe4081ec9f419891aecb41c6f73e0aac2f

The commit says "Various proxy updates." so, to be blunt, is down right vague, and I've no idea why it's so vague :P

In the code it's to do with keeping proxy connections alive and may well be related, but I don't know.

It may help you mine less on my pool, and more on slush's pool, and thus get paid less :D
(Yes the last 6 months, while you were waiting for a bug fix, on my pool have averaged 127% PPS due to luck ... https://kano.is/index.php?k=pblocks )


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: Rheachan1425 on August 28, 2017, 12:24:39 PM
Can i ask a question, i don't know if its ok to you that i posted here.
But i just want to ask if KanoCkpool.com is a legit cloud mining site?
Thankyou.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on August 28, 2017, 12:26:48 PM
Can i ask a question, i don't know if its ok to you that i posted here.
But i just want to ask if KanoCkpool.com is a legit cloud mining site?
Thankyou.
Never heard of it. Quite sure it'll be a scam, like most cloud mining is.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: Rheachan1425 on August 29, 2017, 12:14:57 AM
Can i ask a question, i don't know if its ok to you that i posted here.
But i just want to ask if KanoCkpool.com is a legit cloud mining site?
Thankyou.
Never heard of it. Quite sure it'll be a scam, like most cloud mining is.
Thank you for the advice and answering my question.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: kano on August 29, 2017, 02:20:48 AM
Can i ask a question, i don't know if its ok to you that i posted here.
But i just want to ask if KanoCkpool.com is a legit cloud mining site?
Thankyou.
Scam:
https://bitcointalk.org/index.php?topic=2081653.msg20807180#msg20807180


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: chillfactr on October 03, 2017, 07:33:35 AM
HEY -ck, 

Why wont my s-9 connect  through ckproxy?  i set up same as my s-7's and s-4+,  but i put s-9's and they will never connect>?
what am i missing?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on October 03, 2017, 08:09:14 PM
HEY -ck, 

Why wont my s-9 connect  through ckproxy?  i set up same as my s-7's and s-4+,  but i put s-9's and they will never connect>?
what am i missing?
I'm not aware of anything stopping the S9s connecting. I know people with thousands of S9s connected via ckproxy.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: fudnet on October 13, 2017, 04:58:35 AM
Does ckpool work as a generic stratum proxy when run in proxy mode (-p) or is this Bitcoin specific? Wondering as I have use to aggregate multiple Scrypt miners, want to use ckpool in proxy mode to override stratum URL as well as auth credentials enmasse for multiple miners. Have compiled and configured as follows:

Run as: ckpool -p -c ckproxy.conf -k

ckproxy.conf:
Code:
{
"proxy" :  [
        {
                "url" : "scrypt.usa.nicehash.com:3333/#xnsub",
                "auth" : "some_btc_address",
                "pass" : "x"
        },
        {
                "url" : "scrypt.usa.nicehash.com:3333/#xnsub",
                "auth" : "some_btc_address",
                "pass" : "x"
        }
],
"update_interval" : 30,
"serverurl" : [
        "192.168.2.77:3334",
        "127.0.0.1:3334"
        ],
"mindiff" : 1,
"startdiff" : 1,
"maxdiff" : 0,
"logdir" : "logs",
"loglevel" : "7"
}

Onscreen results are:
Code:
[2017-10-12 23:05:48.118] ckproxy generator starting
[2017-10-12 23:05:48.119] ckproxy connector starting
[2017-10-12 23:05:48.119] ckproxy connector ready
[2017-10-12 23:05:48.119] ckproxy stratifier starting
[2017-10-12 23:05:48.120] ckproxy stratifier ready
[2017-10-12 23:05:48.417] Proxy 0:scrypt.usa.nicehash.com:3333/#xnsub connection established
[2017-10-12 23:05:49.130] Successfully connected to pool 0 scrypt.usa.nicehash.com:3333/#xnsub as proxy
[2017-10-12 23:05:49.130] ckproxy generator ready
[2017-10-12 23:05:53.367] Proxy 1:scrypt.usa.nicehash.com:3333/#xnsub connection established
[2017-10-12 23:11:45.366] Proxy 0:scrypt.usa.nicehash.com:3333/#xnsub reconnect issue to scrypt.usa.nicehash.com:3333/#xnsub, dropping existing connection
[2017-10-12 23:11:45.367] Successfully connected to pool 1 scrypt.usa.nicehash.com:3333/#xnsub as proxy
[2017-10-12 23:11:45.373] Proxy 1:scrypt.usa.nicehash.com:3333/#xnsub reconnect issue to scrypt.usa.nicehash.com:3333/#xnsub, dropping existing connection
[2017-10-12 23:11:46.374] Successfully connected to pool 0 scrypt.usa.nicehash.com:3333/#xnsub as proxy
[2017-10-12 23:11:50.367] Proxy 0:scrypt.usa.nicehash.com:3333/#xnsub completed issued reconnection
[2017-10-12 23:11:50.374] Proxy 1:scrypt.usa.nicehash.com:3333/#xnsub completed issued reconnection
[2017-10-12 23:14:01.141] Proxy 1:scrypt.usa.nicehash.com:3333/#xnsub failed, attempting reconnect
[2017-10-12 23:14:01.150] Proxy 0:scrypt.usa.nicehash.com:3333/#xnsub reconnect issue to scrypt.usa.nicehash.com:3333/#xnsub, dropping existing connection
[2017-10-12 23:14:01.202] Proxy 0 reached max clients 1
[2017-10-12 23:14:01.251] Temporarily insufficient proxies to accept more clients
[2017-10-12 23:14:01.251] Failed to provide subscription due to no sdata
[2017-10-12 23:14:06.142] Proxy 1:scrypt.usa.nicehash.com:3333/#xnsub recovered
[2017-10-12 23:15:32.115] - 0.00H/s  0.0 SPS  1 users  1 workers

The hashrate stays at 0H/s, and I see worker connection on pool, but miner shows all rejections/discards, and toggles between alive/dead status.

Thoughts?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on October 13, 2017, 05:04:52 AM
Does ckpool work as a generic stratum proxy when run in proxy mode (-p) or is this Bitcoin specific?
Documentation goes to great pains to say it's bitcoin only.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: fudnet on October 13, 2017, 05:07:27 AM
Well then, that explains it. I guess I assumed Bitcoin mention as generic crypto.  ???

Any other software you're aware of that does what ckpool does, but for Scrypt or other algorithms?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: wavelengthsf on October 16, 2017, 05:36:43 PM
The documentation for the proxy says:

Quote
Note that the upstream pool needs to be a ckpool for it to scale to large hashrates

Is there any guidance for what is "large" in the hashrate? Would 50 TH/s, for example, be large?



Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on October 16, 2017, 08:34:56 PM
The documentation for the proxy says:

Quote
Note that the upstream pool needs to be a ckpool for it to scale to large hashrates

Is there any guidance for what is "large" in the hashrate? Would 50 TH/s, for example, be large?


This is no longer the case. Any pool can be used upstream.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: powrslave on November 14, 2017, 12:45:03 AM
can I mine with nicehash on here?


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on November 14, 2017, 12:46:12 AM
can I mine with nicehash on here?
This is the ckpool SOFTWARE thread. You want the ckpool.org or solo.ckpool.org mining pool thread and the answer is yes.


Title: Re: CKPOOL - Open source pool/database/proxy/passthrough/library in c for Linux
Post by: Mamasita22 on December 02, 2017, 08:24:22 AM
Interestingly, it may actually have been working fine. I got similar errors on 64-bit as well. Issue seemed to be hangups with bitcoind. Adding more RAM and setting bitcoind to properly use the notifier seems to made it all work a lot smoother. Still running it on 64-bit.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: BenHacked on December 08, 2017, 07:04:21 PM
I'm hoping someone has already encountered this and has a quick answer.  Otherwise I'll do some digging this weekend.  I have set up the ckpool on just a clean local server.  If I'm reading the error correctly, it's the URL in the ckpool.conf file that's throwing the error when trying to bind to stratum port.  I also haven't seen any info on increasing the rcvbufsiz.  TIA.




[2017-12-08 12:52:01.802] ckpool generator starting
[2017-12-08 12:52:01.802] ckpool stratifier starting
[2017-12-08 12:52:01.802] ckpool connector starting
[2017-12-08 12:52:01.803] Failed to bind socket for 192.168.1.46:3333
[2017-12-08 12:52:01.803] Connector failed to bind to socket, retrying in 5s
[2017-12-08 12:52:01.962] Failed to increase rcvbufsiz to 532480, increase rmem_max or start ckpool privileged
[2017-12-08 12:52:02.215] ckpool generator ready
[2017-12-08 12:52:02.215] Connected to bitcoind: localhost:8332
[2017-12-08 12:52:02.287] ckpool stratifier ready[2017-12-08 12:52:06.803] Failed to bind socket for 192.168.1.46:3333
[2017-12-08 12:52:06.803] Connector failed to bind to socket, retrying in 5s
[2017-12-08 12:52:11.803] Failed to bind socket for 192.168.1.46:3333
[2017-12-08 12:52:11.803] Connector failed to bind to socket, retrying in 5s


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on December 08, 2017, 07:53:16 PM
I'm hoping someone has already encountered this and has a quick answer.  Otherwise I'll do some digging this weekend.  I have set up the ckpool on just a clean local server.  If I'm reading the error correctly, it's the URL in the ckpool.conf file that's throwing the error when trying to bind to stratum port.  I also haven't seen any info on increasing the rcvbufsiz.  TIA.




Code:
[2017-12-08 12:52:01.802] ckpool generator starting
[2017-12-08 12:52:01.802] ckpool stratifier starting
[2017-12-08 12:52:01.802] ckpool connector starting
[2017-12-08 12:52:01.803] Failed to bind socket for 192.168.1.46:3333
[2017-12-08 12:52:01.803] Connector failed to bind to socket, retrying in 5s
[2017-12-08 12:52:01.962] Failed to increase rcvbufsiz to 532480, increase rmem_max or start ckpool privileged
[2017-12-08 12:52:02.215] ckpool generator ready
[2017-12-08 12:52:02.215] Connected to bitcoind: localhost:8332
[2017-12-08 12:52:02.287] ckpool stratifier ready[2017-12-08 12:52:06.803] Failed to bind socket for 192.168.1.46:3333
[2017-12-08 12:52:06.803] Connector failed to bind to socket, retrying in 5s
[2017-12-08 12:52:11.803] Failed to bind socket for 192.168.1.46:3333
[2017-12-08 12:52:11.803] Connector failed to bind to socket, retrying in 5s
Assuming you have the correct IP address and you're not trying to bind to a privileged port, usually that means something else is bound to the port already. The rcvbufsiz message tells you what you need to change in your linux config (sysctl.conf). If you're only going to be using ckpool locally it is not needed.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: WBF1 on December 20, 2017, 03:55:53 AM
hi ck and kano

sorry to hear about the falling out.

without ckdb, there's no "easy way" to have ckpool set the generation address to the address of the user who finds it, right? And ckdb is still "as-is" in this repo?


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on December 20, 2017, 03:57:43 AM
hi ck and kano

sorry to hear about the falling out.

without ckdb, there's no "easy way" to have ckpool set the generation address to the address of the user who finds it, right? And ckdb is still "as-is" in this repo?
That's correct, though there is the ckpool-splns fork which does all the apportioning of reward via coinbase generation without a database, as used on ckpool.org


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: WBF1 on December 20, 2017, 04:03:24 AM
hi ck and kano

sorry to hear about the falling out.

without ckdb, there's no "easy way" to have ckpool set the generation address to the address of the user who finds it, right? And ckdb is still "as-is" in this repo?
That's correct, though there is the ckpool-splns fork which does all the apportioning of reward via coinbase generation without a database, as used on ckpool.org

is that fork public?

edit: nevermind i found it


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: WBF1 on December 20, 2017, 04:53:53 AM
hi ck and kano

sorry to hear about the falling out.

without ckdb, there's no "easy way" to have ckpool set the generation address to the address of the user who finds it, right? And ckdb is still "as-is" in this repo?
That's correct, though there is the ckpool-splns fork which does all the apportioning of reward via coinbase generation without a database, as used on ckpool.org

is that fork public?

edit: nevermind i found it

so, ckpool-splns changes that control the coinbase generation are in stratifier? Is it all documented only in code? or also in a readme somewhere?


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on December 20, 2017, 04:55:14 AM
hi ck and kano

sorry to hear about the falling out.

without ckdb, there's no "easy way" to have ckpool set the generation address to the address of the user who finds it, right? And ckdb is still "as-is" in this repo?
That's correct, though there is the ckpool-splns fork which does all the apportioning of reward via coinbase generation without a database, as used on ckpool.org

is that fork public?

edit: nevermind i found it

so, ckpool-splns changes that control the coinbase generation are in stratifier? Is it all documented only in code? or also in a readme somewhere?
Only in code. The code was meant only for my pool but I promised the users to make all the code fully open for verification.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: WBF1 on December 20, 2017, 06:32:57 AM
hi ck and kano

sorry to hear about the falling out.

without ckdb, there's no "easy way" to have ckpool set the generation address to the address of the user who finds it, right? And ckdb is still "as-is" in this repo?
That's correct, though there is the ckpool-splns fork which does all the apportioning of reward via coinbase generation without a database, as used on ckpool.org

is that fork public?

edit: nevermind i found it

so, ckpool-splns changes that control the coinbase generation are in stratifier? Is it all documented only in code? or also in a readme somewhere?
Only in code. The code was meant only for my pool but I promised the users to make all the code fully open for verification.

Got it. So if I compile and run the splns fork I can expect it to work like your splns pool @ ckpool.org?


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: rldleblanc on December 22, 2017, 12:09:43 AM

That's correct, though there is the ckpool-splns fork which does all the apportioning of reward via coinbase generation without a database, as used on ckpool.org

Does the SPLNS fork give the block finder a bonus in the block like p2pool does?


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on December 22, 2017, 12:28:30 AM

That's correct, though there is the ckpool-splns fork which does all the apportioning of reward via coinbase generation without a database, as used on ckpool.org

Does the SPLNS fork give the block finder a bonus in the block like p2pool does?
No. It gives a small bonus for their next block found only. It can be a substantial bonus if they're a very small miner only.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: optiroamru on December 26, 2017, 10:24:31 PM
Hello,

Than it can be treated?
doindex() ? ???

Quote
[Tue Dec 26 18:52:23.898781 2017] [:error] [pid 7865] [client ip:35162] PHP Fatal error:  Uncaught Error: Call to undefined function doindex() in /home/user/ckpool/pool/page.php:594\nStack trace:\n#0
/home/user/ckpool/pool/page_index.php(7): gopage(Array, NULL, 'doindex', 'index', Array, '', false)\n#1
/home/user/ckpool/pool/base.php(455): show_index(Array, 'index', Array, '', false)\n#2
/home/user/ckpool/pool/prime.php(49): showPage(Array, 'index', Array, '', false)\n#3
/home/user/ckpool/pool/prime.php(117): process(NULL, false, Array)\n#4
/home/user/ckpool/pool/prime.php(128): check()\n#5
/home/user/ckpool/html/index.php(2): include_once('/home/user/ck...')\n#6 {main}\n  thrown in /home/user/ckpool/pool/page.php on line 594

Thank.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: WBF1 on January 11, 2018, 09:41:13 PM
@-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.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on January 11, 2018, 09:45:44 PM
@-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.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: WBF1 on January 11, 2018, 10:56:11 PM
You mean with blockmaxweight right?


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on January 12, 2018, 01:08:15 AM
You mean with blockmaxweight right?
Yes


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: WBF1 on January 12, 2018, 05:39:26 AM
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).


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on January 12, 2018, 06:31:49 AM
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.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: WBF1 on January 12, 2018, 03:42:04 PM
OK will do.

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


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: WBF1 on January 19, 2018, 03:53:17 PM
disregarding capacity issues, can 2 instances of ckpool (of course, one splns one "solo") run off a single bitcoind?


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on January 19, 2018, 10:56:05 PM
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.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: micax1 on January 22, 2018, 07:39:32 PM
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.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: 1Dev on February 02, 2018, 10:56:33 AM
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.





Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: apxu on February 07, 2018, 06:22:00 PM
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,


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on February 07, 2018, 08:02:15 PM
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.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: apxu on February 08, 2018, 11:12:49 AM
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.   ???


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on February 08, 2018, 11:26:16 AM
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.   ???
What don't you understand about "doesn't matter"?


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: WBF1 on March 05, 2018, 05:40:04 PM
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.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on March 05, 2018, 08:00:20 PM
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.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: singleuseacct on March 08, 2018, 04:34:02 AM
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.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on March 08, 2018, 08:30:12 AM
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.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: singleuseacct on March 08, 2018, 02:00:46 PM
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.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: ThatRandomDude on June 11, 2018, 03:29:47 PM
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


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: andyjh12322 on July 12, 2018, 12:30:28 AM
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


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on July 12, 2018, 12:46:47 AM
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.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: huglester on August 11, 2018, 10:40:08 PM
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


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on August 11, 2018, 10:43:10 PM
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


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: huglester on August 11, 2018, 11:48:29 PM
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


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on August 11, 2018, 11:49:51 PM
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.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: huglester on August 12, 2018, 12:13:47 AM
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 :) maybe it's not suitable for this?

btw, can't simple proxy written it work? I mean if I only need to 'bridge' traffic?


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on August 12, 2018, 12:38:20 AM
I try to configure some shitcoin algo :)
You're on your own now.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: kano on August 15, 2018, 02:30:27 AM
...
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.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: chillfactr on September 11, 2018, 02:48:52 AM
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
 ??? ??? ???


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on September 11, 2018, 04:07:05 AM
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
 ??? ??? ???
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?


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: taserz on September 11, 2018, 04:19:43 AM
Hey -ck,

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

Much Love Brother <3


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: chillfactr on September 11, 2018, 04:37:55 AM
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
 ??? ??? ???
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


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on September 11, 2018, 06:05:35 AM
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


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: chillfactr on September 11, 2018, 06:11:43 AM
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  :o :o

i think he means bromance type of love



Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: taserz on September 11, 2018, 07:37:37 PM
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  :P haha

LMAO!!

Not into guys  :o :o

i think he means bromance type of love

Someone is looking out for me I see haha.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: dogedood on September 14, 2018, 01:41:34 AM
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.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: ProfMac on October 30, 2018, 06:57:16 PM
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.



Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on October 30, 2018, 08:10:49 PM
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?


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: ProfMac on October 30, 2018, 08:30:55 PM

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.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on October 30, 2018, 08:45:48 PM
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 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.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: ProfMac on November 10, 2018, 05:40:34 PM

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.



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.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: chillfactr on January 12, 2019, 11:36:59 PM
Ok fiured it out


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: chillfactr on January 17, 2019, 04:32:46 AM
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?


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: peoples on March 13, 2019, 09:12:54 AM
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



Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on March 13, 2019, 09:13:53 AM
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


That's a lot of data to hand over, the handover only hands over sockets, not the state of vardiff etc., and all of them will have to reconnect so all the previous connections will be invalid so you won't know who's on which socket after reconnect anyway. Worker names does not equal which socket they're connected to.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: peoples on March 13, 2019, 11:05:16 AM
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


That's a lot of data to hand over, the handover only hands over sockets, not the state of vardiff etc., and all of them will have to reconnect so all the previous connections will be invalid so you won't know who's on which socket after reconnect anyway. Worker names does not equal which socket they're connected to.

ok got it, thats for handover.
But why not serving previous difficulty after reconnect ?
Example:
1) Miner A with wokerName: MinerA  connected and mined for a while on stable diff.
2) pool stores this diff information per worker
3) Miner A disconnects and reconnects after few minutes
4) pool identifies miner by workerName -> gets old diff value from log and serves the stored diff instead of starting new vardiff ramping ?

Very likely that i oversee a detail, like i said -> Learning phase ..  so thanks for your answers ;)



Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on March 13, 2019, 11:13:20 AM
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


That's a lot of data to hand over, the handover only hands over sockets, not the state of vardiff etc., and all of them will have to reconnect so all the previous connections will be invalid so you won't know who's on which socket after reconnect anyway. Worker names does not equal which socket they're connected to.

ok got it, thats for handover.
But why not serving previous difficulty after reconnect ?
Example:
1) Miner A with wokerName: MinerA  connected and mined for a while on stable diff.
2) pool stores this diff information per worker
3) Miner A disconnects and reconnects after few minutes
4) pool identifies miner by workerName -> gets old diff value from log and serves the stored diff instead of starting new vardiff ramping ?

Very likely that i oversee a detail, like i said -> Learning phase ..  so thanks for your answers ;)


One workername can have 10 thousand separate workers all with the same workername, but each with separate diffs.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: peoples on March 13, 2019, 11:32:25 AM
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


That's a lot of data to hand over, the handover only hands over sockets, not the state of vardiff etc., and all of them will have to reconnect so all the previous connections will be invalid so you won't know who's on which socket after reconnect anyway. Worker names does not equal which socket they're connected to.

ok got it, thats for handover.
But why not serving previous difficulty after reconnect ?
Example:
1) Miner A with wokerName: MinerA  connected and mined for a while on stable diff.
2) pool stores this diff information per worker
3) Miner A disconnects and reconnects after few minutes
4) pool identifies miner by workerName -> gets old diff value from log and serves the stored diff instead of starting new vardiff ramping ?

Very likely that i oversee a detail, like i said -> Learning phase ..  so thanks for your answers ;)


One workername can have 10 thousand separate workers all with the same workername, but each with separate diffs.

Amen ... of course makes sense, worker name is no unique identifier. Thanks for that.

Does ckpool also adjusts diff down, or in general, is that something that pools do ?
For example miner hashrate drops by 50% in a current session because a hasboard died.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on March 13, 2019, 11:36:46 AM
Does ckpool also adjusts diff down, or in general, is that something that pools do ?
For example miner hashrate drops by 50% in a current session because a hasboard died.
Yes.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: peoples on March 13, 2019, 12:48:29 PM
Does ckpool also adjusts diff down, or in general, is that something that pools do ?
For example miner hashrate drops by 50% in a current session because a hasboard died.
Yes.

Great, thanks   :)


Title: Re: CKPOOL software - Free pool/database/proxy/passthrough/library in c for Linux
Post by: 80sKid on March 18, 2019, 01:48:29 AM
Could use a little help please.  I've been trying to compile/install ckpool, but it errors-out during 'make'.
I have tried on two separate machines with the same results.

Here's where it all ends:

make[3]: Entering directory '/home/v3/ckpool/ckpool/src'
  CC       libckpool.o
  CC       sha2.o
yasm -f x64 -f elf64 -X gnu -g dwarf2 -D LINUX -o sha256_code_release/sha256_sse4.A sha256_code_release/sha256_sse4.asm
  AR       libckpool.a
ar: `u' modifier ignored since `D' is the default (see `U')
  CC       ckpool.o
  CC       generator.o
  CC       bitcoin.o
  CC       stratifier.o
stratifier.c: In function ‘read_poolstats’:
stratifier.c:8512:17: warning: passing argument 1 of ‘json_get_int64’ from incompatible pointer type [-Wincompatible-pointer-types]
  json_get_int64(&last.tv_sec, val, "lastupdate");
                 ^
In file included from stratifier.c:23:0:
ckpool.h:369:6: note: expected ‘int64_t * {aka long long int *}’ but argument is of type ‘__time_t * {aka long int *}’
 bool json_get_int64(int64_t *store, const json_t *val, const char *res);
      ^~~~~~~~~~~~~~
  CC       connector.o
  CCLD     ckpool
/usr/bin/ld: i386:x86-64 architecture of input file `libckpool.a(sha256_sse4.A)' is incompatible with i386 output
collect2: error: ld returned 1 exit status
Makefile:502: recipe for target 'ckpool' failed
make[3]: *** [ckpool] Error 1
make[3]: Leaving directory '/home/v3/ckpool/ckpool/src'
Makefile:570: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/v3/ckpool/ckpool/src'
Makefile:410: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/v3/ckpool/ckpool'
Makefile:342: recipe for target 'all' failed
make: *** [all] Error 2


Can anyone please tell me what steps I should take to get this to work? Both machines are Intel 64 bit with Debian.
I'd be happy to donate some satoshi's for some help.  Thank you.

Oh, and I'm using the .zip file from:      https://bitbucket.org/ckolivas/ckpool/get/5d4dbe166c31.zip


Title: Re: CKPOOL software - Free pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on March 18, 2019, 01:50:36 AM
/usr/bin/ld: i386:x86-64 architecture of input file `libckpool.a(sha256_sse4.A)' is incompatible with i386 output
Might be an intel 64 bit machine but it looks like you're trying to compile it for a 32 bit userspace. Ckpool is 64 bit only.


Title: Re: CKPOOL software - Free pool/database/proxy/passthrough/library in c for Linux
Post by: 80sKid on March 18, 2019, 01:55:45 AM
/usr/bin/ld: i386:x86-64 architecture of input file `libckpool.a(sha256_sse4.A)' is incompatible with i386 output
Might be an intel 64 bit machine but it looks like you're trying to compile it for a 32 bit userspace. Ckpool is 64 bit only.



I'm relatively new to Linux.  Is there a way I can direct it to compile as 64 bit?  I just assumed it would do that somehow on its own.



By the way, I've been using your cgminer on another machine and it's been rock solid for a couple years.  Nice work.


Title: Re: CKPOOL software - Free pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on March 18, 2019, 01:56:55 AM
/usr/bin/ld: i386:x86-64 architecture of input file `libckpool.a(sha256_sse4.A)' is incompatible with i386 output
Might be an intel 64 bit machine but it looks like you're trying to compile it for a 32 bit userspace. Ckpool is 64 bit only.



I'm relatively new to Linux.  Is there a way I can direct it to compile as 64 bit?  I just assumed it would do that somehow on its own.



By the way, I've been using your cgminer on another machine and it's been rock solid for a couple years.  Nice work.

It just means you've installed a 32 bit linux distribution. Make sure to use a 64 bit one. There is no reason to use 32 bit any more anywhere.


Title: Re: CKPOOL software - Free pool/database/proxy/passthrough/library in c for Linux
Post by: 80sKid on March 18, 2019, 02:31:11 AM
Too funny. I thought I had installed the 64bit version.   Burning the new .iso now...


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: jstnryan on July 13, 2019, 07:47:24 AM
It seems I have the pool compiled and running with remote node and block notify, however it rejects all shares, and continuously reconnects my test miner. Is there something obvious I missed? The below is using ckpool-splns, but the result is the same with ckpool.

stdout
Code:
[2019-07-13 07:12:13.289] ckpool generator starting
[2019-07-13 07:12:13.293] ckpool stratifier starting
[2019-07-13 07:12:13.294] ckpool connector starting
[2019-07-13 07:12:13.294] ckpool connector ready
[2019-07-13 07:12:13.344] ckpool generator ready
[2019-07-13 07:12:13.344] Connected to bitcoind: 192.168.1.14:18333
[2019-07-13 07:12:13.364] ckpool stratifier ready
[2019-07-13 07:32:22.491] | 0.00H/s  0.0 SPS  1 users  1 workers

ckpool.conf
Code:
{
"btcd" :  [
    {
        "url" : "192.168.1.14:18333",
        "auth" : "user",
        "pass" : "pass",
        "notify" : true
    }
],
"btcaddress" : "ADDRESS",
"serverurl" : [
    "192.168.1.23:3333"
]
}

log sample
Code:
[2019-07-13 07:35:13.431] Pool:{"runtime": 1380, "lastupdate": 1563003313, "Users": 1, "Workers": 1, "Idle": 1, "Disconnected": 0}
[2019-07-13 07:35:13.431] Pool:{"diff": "0.0", "accepted": 0, "rejected": 7405568, "lns": 0.1, "herp": 0.1, "reward": 0.390625}
[2019-07-13 07:35:23.617] Client 7 rejecting for 120s, reconnecting
[2019-07-13 07:35:23.623] Dropped client 7 192.168.1.52 user ADDRESS worker ADDRESS.worker
[2019-07-13 07:35:23.629] Authorised client 8 worker ADDRESS.worker as user ADDRESS
[2019-07-13 07:35:38.642] Stored local workbase with 3 transactions


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: o_solo_miner on July 14, 2019, 09:19:08 AM
Code:
"btcaddress" : "ADDRESS",

did you got an valid btc address in, or did you leave the ADDRESS ?
It will only work with a proper btc address.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: jstnryan on July 14, 2019, 02:27:18 PM
Code:
"btcaddress" : "ADDRESS",

did you got an valid btc address in, or did you leave the ADDRESS ?
It will only work with a proper btc address.

Yes. And my test miner is obviously not configured as “ADDRESS.worker.”


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: o_solo_miner on July 14, 2019, 04:51:19 PM
How does your testminer setup looks like?
And what kind of miner did you use?

As far as I can see, the pool works as normal.
Only the tranfered shares of the miner get rejected,
You may look deeper in the log files of ckpool for debug of the tranfered data from the miner to ckpool.

Edit:
Quote
Client 7 rejecting for 120s
looks like the miner won't comunicate


Title: Re: CKPOOL software - Free pool/database/proxy/passthrough/library in c for Linux
Post by: riverdip on July 23, 2019, 06:42:44 PM
About ckproxy

Ckproxy uses the same core code as ckpool and acts as a proxy with a simple switch (-p). It acts as a stratum-to-stratum proxy, or stratum-through-stratum proxy in passthrough mode (see below).

It is most useful to regular miners who wish to consolidate their mining hardware into one connection for minimal upstream/downstream bandwidth in standalone mode (with the additional -A switch). Ckproxy uses multiple modes to maintain as many miners as possible communicating with the upstream pool. It works by splitting up nonce2 sizes if the upstream pool's nonce2 is large enough and then it recruits extra upstream connections as needed to allow the number of downstream miners to scale indefinitely.

Ckproxy can be started in "userproxy" mode which monitors login names of miners attaching that don't match the master proxy username and recruits new upstream connections with each unique username, proxying all workers of the same username to the unique upstream proxy connections.

It can be configured to run with a database as per an actual pool entirely, thus acting like a child pool for a parent pool elsewhere, or simply for miners who wish full logging of every detail of their mining operation.

It can also act as a unique stratum-through-stratum passthrough mode which absolutely requires a ckpool as the parent pool with the -P switch. In this mode it does not decrease the bandwidth talking to the upstream pool but minimises the number of open connections instead, but requires extremely low resources to run. This mode is most useful for pools wishing to isolate their main pool instance from the outside world and set up multiple VPSs as a kind of front end proxy/firewall to the outside world. This also removes any realistic limit on the number of open connections since each passthrough instance could easily handle 10k connections, consolidating each into just 1 connection to the upstream pool.

In addition to the passthrough mode, there is a more advanced "node" mode which connects as a passthrough, but needs a local bitcoind connection of its own. It monitors all traffic and shares between the pool and miners, being able to display local hashrates and will submit any blocks found to the local bitcoind in addition to sending the shares to the upstream pool, circumventing the delay of block submission that would otherwise happen with remote nodes.

Finally ckproxy can be started in "redirector" mode which acts as a regular passthrough, but monitors share responses from the upstream pool, and once a valid share is recognised from the upstream pool it will redirect miners that support redirection (all cgminer based clients do) to the URL of your choice. Should the miners not support redirection, such as rental services, ckredirector will continue to act as an ordinary passthrough.


ckproxy -p runs fine !


what could the best option to see the proxy status in nice web UI ?


Title: Re: CKPOOL software - Free pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on July 23, 2019, 09:34:46 PM
ckproxy -p runs fine !


what could the best option to see the proxy status in nice web UI ?
No such thing exists. You'd have to build your own, sorry.


Title: Re: CKPOOL software - Free pool/database/proxy/passthrough/library in c for Linux
Post by: riverdip on July 24, 2019, 03:52:38 AM
ckproxy -p runs fine !


what could the best option to see the proxy status in nice web UI ?
No such thing exists. You'd have to build your own, sorry.

yes i did it from logs, but are you aware killing ckpool is dropped most of time ?


ckpool -k

doesn't kill the process, i tried various other combinations too


Title: Re: CKPOOL software - Free pool/database/proxy/passthrough/library in c for Linux
Post by: -ck on July 24, 2019, 03:56:55 AM
yes i did it from logs, but are you aware killing ckpool is dropped most of time ?


ckpool -k

doesn't kill the process, i tried various other combinations too
Buggy proxy code. Never got around to fixing it. Lost any interest thanks to other events.


Title: Re: CKPOOL - Open source pool/proxy/passthrough/redirector/library in c for Linux
Post by: -ck on August 07, 2019, 08:31:09 AM
Locking this thread as well I'm afraid. The era where this software mattered is over, and I've lost interest in supporting it any further.