zone117x / node-open-mining-portal

A scalable all-in-one easy to setup cryptocurrency mining pool and portal written entirely in Node.js.
GNU General Public License v2.0
1.02k stars 1.03k forks source link

XMR support? #501

Closed happyxie closed 6 years ago

happyxie commented 7 years ago

Does this one support XMR? I have set up nomp for one coin. I want to add xmr.

Also I saw another one node-cryptonote-pool which support XMR. Do I need to install both nomp and this one? Thanks!

ghost commented 7 years ago

@happyxie Hi. XMR - CRYPTONIGHT. Stratum supports it, but need test it. https://github.com/zone117x/node-cryptonote-pool is stand alone. Try it.

ghost commented 7 years ago

After install NOMP add this code to /nomp/node_modules/stratum-pool/lib/algoProperties.js

cryptonight: {
        hash: function(){
            return function(){
                return multiHashing.cryptonight.apply(this, arguments);
            }
        }
    }
happyxie commented 7 years ago

Thanks for fast response. I will give it a try with the modified algoProperties.js.

ghost commented 7 years ago

@happyxie Please, give result for us )

happyxie commented 7 years ago

I just tried and setup a private testnet. But I have some trouble with pool_configs. There is no conf file for the rpc info. Could you please help me with this? So I can continue the test. Thanks. Here is the monero.json file with error ([monero] (Thread 1) Could not parse rpc data from daemon instance 0 Request Data: {"method":"getinfo","params":[],"id":1504916512744} Reponse Data:) :

{ "enabled": true, "coin": "monero.json",

"address": "9wviCeWe2D8XS82k2ovp5EUYLzBt9pYNW2LXUFsZiv8S3Mt21FZ5qQaAroko1enzw3eGr9qC7X1D7Geoo2RrAotYPwq9Gm8",

"rewardRecipients": {
    "9wq792k9sxVZiLn66S3Qzv8QfmtcwkdXgM5cWGsXAPxoQeMQ79md51PLPCijvzk1iHbuHi91pws5B7iajTX9KTtJ4bh2tCh": 1.5
},

"paymentProcessing": {
    "enabled": false,
    "paymentInterval": 20,
    "minimumPayment": 70,
    "daemon": {
        "host": "127.0.0.1",
        "port": 28081,
        "user": "rpcuser",
        "password": "rpcpass"
    }
},

"ports": {
    "3008": {
        "diff": 4
    },
    "3333": {
        "diff": 32,
        "varDiff": {
            "minDiff": 2,
            "maxDiff": 512,
            "targetTime": 15,
            "retargetTime": 90,
            "variancePercent": 50
        }
    },
    "3256": {
        "diff": 256
    }
},

"daemons": [
    {
        "host": "127.0.0.1",
        "port": 28081,
        "user": "rpcuser",
        "password": "rpcpass"
    }
],

"p2p": {
    "enabled": true,
    "host": "127.0.0.1",
    "port": 28080,
    "disableTransactions": true
},

"mposMode": {
    "enabled": true,
    "host": "127.0.0.1",
    "port": 3306,
    "user": "root",
   "password": "",
    "database": "MPOS",
    "checkPassword": true,
    "autoCreateWorker": false
}

}

Note: one node with port 28080 and wallet with 28081. Update: need to run daemon with --rpc-login rpcuser:rpcpass Still have error: Unauthorized RPC access - invalid RPC username or password

ghost commented 7 years ago

@happyxie Is it real wallets? 9wviCeWe2D8XS82k2ovp5EUYLzBt9pYNW2LXUFsZiv8S3Mt21FZ5qQaAroko1enzw3eGr9qC7X1D7Geoo2RrAotYPwq9Gm8 9wq792k9sxVZiLn66S3Qzv8QfmtcwkdXgM5cWGsXAPxoQeMQ79md51PLPCijvzk1iHbuHi91pws5B7iajTX9KTtJ4bh2tCh Why so long? May be error?

For work you need synsronised wallet and more than 0 peers connected. Request Data: {"method":"getinfo","params":[],"id":1504916512744} Reponse Data:) :

NOMP can't receive and parce answer from wallet via RPC. Try getinfo in wallet dirrectly.

Update: need to run daemon with --rpc-login rpcuser:rpcpass No. Need run daemon with wallet config file like this:

rpcuser=monerorpc
rpcpassword=strongpasswordlikeyourwalletlenght
port=peerport
rpcport=rpcport
rpcthreads=8
rpcallowip=127.0.0.1
rpcallowip=ipofyourlocalmachinesorpools
rpctimeout=30
daemon=1
server=1
gen=0
happyxie commented 7 years ago

Those are testnet wallets. I am not familiar with xmr. Will take some time to check it. Right now, I will go for simple plan first, install separate package for each coin. If I figure out how to set up xmr with nomp, I will report it. Thanks for your help.

shtse8 commented 6 years ago

Thanks for your information. I am trying.

jabiers commented 6 years ago

I am trying to make monero pool. monero has rpc methods difference with bitcoin's rpc methods.

it makes error.

simply getinfo method doesn't exist on monero. it should get_info.

ghost commented 6 years ago

@jabiers Hi Recompile wallet and change command https://github.com/monero-project/monero/blob/591e53445b2643af1e9a5266ffa5324cad758255/src/rpc/daemon_messages.cpp

jabiers commented 6 years ago

@foxer666 have you ever succeed in making?

ghost commented 6 years ago

@jabiers Hi. I must try?

InfoSecREDD commented 6 years ago

Any news on this?..

ghost commented 6 years ago

Hi guys. Now work on more easy problems. XMR - global problem. Can't help now, try this week.

zone117x commented 6 years ago

Nomp only works on cryptocurrencies based on bitcoin. Monero is based on Bytecoin/cryptonote which is why a separate pool implementation was created for it: https://github.com/zone117x/node-cryptonote-pool

ghost commented 6 years ago

Reopen please, https://github.com/zone117x/node-cryptonote-pool does not support stratum to stratum.

Please add cryptonight in, it is a planned feature...

Meantime I see what I can do to add it in, probably not much :-/

thanks

Admiral-Noisy-Bottom commented 6 years ago

Cryptonight does work in Node-Cryptonote-Pool. I've got it working for Monero (XMR). Well, I think it's working, I've got no miners so I don't know if it will pay them when a block is found. You can check it out at [(http://xmr.pictureslots.net.au)]

I'm still working on it so it goes up and down, but it does work with a bit of fiddling around.