I am trying to learn and understand more about mining software, and so I am trying to build a simple 1 to try it out.

I have been reading resources from SlushPool and a bit from the google link they shared, and came up with a sample of the below code.

# The below code is in Python 3
import socket

host = 'rvn.suprnova.cc'
port = 6667

with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
    s.connect((host, port))
    s.sendall(b'{"id": 1, "method": "mining.subscribe", "params": []}')
    data = s.recv(1024)


However, the response that I receive from the pool is:


However, I noticed that this response is different from the response that i'm supposed to be receiving. I say this is because the response i should be receiving (according to SlushPool) should be:

{"id": 1, "result": [ [ ["mining.set_difficulty", "b4b6693b72a50c7116db18d6497cac52"], ["mining.notify", "ae6812eb4cd7735a302a8a9dd95cf71f"]], "08000002", 4], "error": null}\n

I understand that the id will be different in the result.. But i'm not sure why is it that my response is not the mining.subscribe that I should be getting.

Any ideas? Thanks!

  • just a guess, but it might be waiting for you to submit some shares (to gauge your hashrate) before it sends you a difficulty.
    – JBaczuk
    May 14 '19 at 3:48
  • @JBaczuk hmm. I don't think so? And the reason for that is because, I need to connect to the server first, which will provide me with some required details such as Extranonce1 - Hex-encoded, per-connection unique string which will be used for coinbase serialization later. Then I can authorize workers with mining.authorize which will then return me a job. Am I mistaken?
    – jake wong
    May 14 '19 at 4:07
  • well, you aren't connecting to slush pool, you're connecting to a ravencoin pool, so you can't be sure the docs are accurate.
    – JBaczuk
    May 14 '19 at 4:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.