I write some stratum server, for mining in the pool. The answer goes from the client to my server:

{"method": "mining.submit", "params": ["g", "06a8", "01", "1d025f83", "c03f38ac"], "id":4}

What should I do with this in my stratum server? What next do I need to do with this data? (I write in Plain C)

1 Answer 1

  1. Read the documentation please: https://en.bitcoin.it/wiki/Stratum_mining_protocol#mining.submit

A quote from it:


mining.submit("username", "job id", "ExtraNonce2", "nTime", "nOnce")

Miners submit shares using the method "mining.submit". Client submissions contain:

Worker Name.
Job ID.

Server response is result: true for accepted, false for rejected (or you may get an error with more details).

  1. You write:

    What next do I need to do with this data?

You could check the poolserver for example code: https://github.com/GOSTSec/poolserver/blob/master/src/server/poolserver/Stratum/Client.h#L82

  • I know about mining.submit("username", "job id", "ExtraNonce2", "nTime", "nOnce") Thanks for example. I watch it later.
    – undefined
    Jun 5, 2017 at 21:15

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.