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": nulln

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!

Article First Published here