Bitcoin

Mining Pools – What’s wrong with this JSON-RPC? (via BTC.com)

Subscription messages work. But permission is not like that. I’m wondering why I can’t do this. The expected result is to have miners who are logged in and have no errors in authentication, subscription, or nonce capture. I get this in response to the code below:

Received: “error”:null,”id”:1,”result”:(((“mining.notify”,”0000ce121″),(“mining.set_difficulty”,”0000ce122″)),”0000ce12″ , 8)

Authentication response: “error”:null,”id”:1,”result”:false

# Subscribe to mining notifications
    subscribe_message=""id": 1, "method": "mining.subscribe", "params": ()\n"
    sock.sendall(subscribe_message.encode())
    
    # Receive and print the response
    data = sock.recv(1024)
    print(f'Received: data.decode()')
    
    # Extract the subscription ID and extranonce
    response_data = json.loads(data.decode())
    subscription_id = response_data('result')(1)
    extranonce1 = response_data('result')(1)(1)

    # Authenticate (replace 'username' and 'password' with your actual credentials)
    auth_message=""id": 2, "method": "mining.authorize", "params": ("username", "password")\n"
    sock.sendall(auth_message.encode())
    
    # Receive and print the authentication response
    auth_response = sock.recv(1024)
    print(f'Authentication Response: auth_response.decode()')
    

I just joined this pool. You seem to be unaware of the proper regulations for usernames and passwords to participate in the BTC.com pool. What if you have some knowledge about this pool that could help me?

Related Articles

Back to top button