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)

print(repr(data))

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

b'"id":null,"method":"mining.notify","params":["8cbb","e5d5d839ee8654e963c2f685297cce8b34f8397ff7bb0ca900004c2100000000","01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff2003c3c70a04240dda5c08","0d2f6e6f64655374726174756d2f00000000020000000000000000266a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf90088526a740000001976a91481985dc4238eb976bffa1476119a71d511b88ae488ac00000000",[],"30000000","1a5efd7e","5cda0d24",false]n'

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