Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: bitcoin_builder on January 27, 2014, 05:57:47 PM



Title: API functions that are called when you add a worker
Post by: bitcoin_builder on January 27, 2014, 05:57:47 PM
When you add worker in a mining pool what happens at the back end? I am basically asking from bitcoin API point of view as to what functions are called when you add a worker in mining pool. This is the API I am talking about:

https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list


Title: Re: API functions that are called when you add a worker
Post by: Remember remember the 5th of November on January 28, 2014, 01:49:03 AM
Nothing happens. Afaik, Bitcoin has only one user and password, the pool acts as proxy to the bitcoin daemon. The pool takes care of share counting, validation(only if a share matches the target does it get sent to the daemon). So workers is a feature of the pools, not the daemon.


Title: Re: API functions that are called when you add a worker
Post by: bitcoin_builder on January 28, 2014, 06:10:08 AM
Oh so that means all the methods that we see for e.g. PPS etc. are based on ones own formulas?!


Title: Re: API functions that are called when you add a worker
Post by: Remember remember the 5th of November on January 28, 2014, 01:16:22 PM
Oh so that means all the methods that we see for e.g. PPS etc. are based on ones own formulas?!
Not exactly, but some people do think of their own payout methods.


Title: Re: API functions that are called when you add a worker
Post by: Rannasha on January 28, 2014, 02:31:05 PM
Oh so that means all the methods that we see for e.g. PPS etc. are based on ones own formulas?!

It means that payout distribution calculations are entirely done by the pool software, not by the bitcoin client.

Miners submit their shares to the pool software, the pool software validates them and logs them in a database for the relevant user. If the share is of high enough difficulty to be valid for a block, it is passed on to bitcoind (or whatever software is used to interact with the bitcoin network). The bitcoin-balance of each account in the pool is then calculated by the pool software again. If a user withdraws his balance, the pool software calls the relevant bitcoin API function to create and send a transaction.


Title: Re: API functions that are called when you add a worker
Post by: bitcoin_builder on January 28, 2014, 05:21:31 PM
Thanks. Now I am getting the hang of it. I know there are a few middleware softwares available but I wanted to create my own but I didn't know where to start.