1

I'm looking for resources to get me started on coding a mining pool from scratch. I know there are several mining pool implementations and it's reinventing the wheel, but I want to do it so I can learn and also it's kinda fun for me. I tried to reverse engineer some source code but I think I'll be better off having some sorta guide instead. What I'm looking for is :

  1. what information is exchanged between pool and miners
  2. Detailed explanation on what this information means
  3. If possible some pseudo code to generate that information

Any help is appreciated because I've been searching for a while and can't seem to find any good sources.

1 Answer 1

1
  1. See this answer for the messages used.
  2. The same above linked answer should be self explanatory apart from maybe the job blob, which is a block hashing blob, e.g. the data to hash. This and this should help on that front.
  3. The same above linked answer also has a link to an example bare-bones Python miner using the stratum protocol.
1
  • The blockhashing_blob is almost exactly the same for each miner, almost because the pool typically changes something in the reserved space for each miner. Therefore each miner is hashing something unique. A miners difficulty target is typically adjusted by the pool to a value that reflects how quickly a miner is hashing. e.g. target = max(client->total_hashes / client->connected_duration * retarget_time, pool->start_diff). Pools usually have a starting difficulty set per port.
    – jtgrassie
    Commented May 28, 2019 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.