Can not find mnr_getWork method

65 Views Asked by At

I am going to run my own private merged mining pool compatible with RSK. I have installed ckpool on my server. ckpool is merged mining pool software written by C. I installed RSK and BTC node on my server. FOR RSK I used ubuntu package. Ubuntu version is 22.04. When I run this pool, this error is caused """"""""""" rsk node is not activate """"""". I have reviewed code and found that error is caused in this part.

"""""""""""""" static const char *rsk_getwork_req = "{"jsonrpc": "2.0", "method": "mnr_getWork", "params": [], "id": %d}\n";

""""""""""""" According to the result of my research, mnr_work is not supported anymore over RSK version 3.0. In this version we need to use getblocktemplate method instead of mnr_getwork. I tried to replace mnr_getWork with getblocktemplate but still the error is caused. How can I fix this error.

If anyone has got experience in installation of ckpool, please help me.

I have used curl command to check that rsk node is response properly for my request. The command is as below.

curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"getblocktemplate","params":[],"id":1}' http://localhost:4444/

the result is as below. {"jsonrpc":"2.0","id":1,"error":{"code":-32601,"message":"method not found"}}

What is error?

1

There are 1 best solutions below

5
ivega On

The issue here is that probably the mnr_ family of methods is not enabled by default. You can do that by adding it to the node.conf file:

rpc.modules = [
    {
        name: "eth",
        version: "1.0",
        enabled: "true",
    },
    {
        name: "net",
        version: "1.0",
        enabled: "true",
    },
    {
        name: "rpc",
        version: "1.0",
        enabled: "true",
    },
    {
        name: "web3",
        version: "1.0",
        enabled: "true",
    },
    {
        name: "evm",
        version: "1.0",
        enabled: "true",
    },
    {
        name: "sco",
        version: "1.0",
        enabled: "true",
    },
    {
        name: "txpool",
        version: "1.0",
        enabled: "true",
    },
    {
        name: "personal",
        version: "1.0",
        enabled: "true",
    },
    {
        name: "debug",
        version: "1.0",
        enabled: "true",
    },
    {
        name: "rsk",
        version: "1.0",
        enabled: "true",
    },
    {
        name: "mnr",
        version: "1.0",
        enabled: "true",
    },
]