2025-04-10 11:19:41 +00:00
|
|
|
m2pool app module code
|
|
|
|
|
|
|
|
environment:
|
|
|
|
nodejs v16.10.0 +
|
|
|
|
express
|
|
|
|
axios
|
|
|
|
mysql2
|
|
|
|
ioredis
|
|
|
|
|
|
|
|
if you want to support enx, kas...
|
|
|
|
add environment:
|
|
|
|
kaspa-rpc-client
|
|
|
|
|
|
|
|
### start common example ###
|
|
|
|
node app.js <method> <coin>
|
|
|
|
|
|
|
|
# if you used pm2, you can use this command
|
|
|
|
pm2 start app.js --name <pm2 process name> -- <method> <coin>
|
|
|
|
|
2025-04-10 11:36:31 +00:00
|
|
|
# config like this
|
|
|
|
// this file please use .conf
|
|
|
|
{
|
|
|
|
"master":{
|
|
|
|
"pooldb":{
|
|
|
|
"host": "",
|
|
|
|
"user": "",
|
|
|
|
"password": "",
|
|
|
|
"database": "",
|
|
|
|
"port":,
|
|
|
|
"waitForConnections": true,
|
|
|
|
"connectionLimit": 20,
|
|
|
|
"queueLimit": 0
|
|
|
|
},
|
|
|
|
"sharesdb":{
|
|
|
|
"host": "",
|
|
|
|
"user": "",
|
|
|
|
"password": "",
|
|
|
|
"database": "",
|
|
|
|
"port":,
|
|
|
|
"waitForConnections": true,
|
|
|
|
"connectionLimit": 20,
|
|
|
|
"queueLimit": 0
|
|
|
|
},
|
|
|
|
"distribution":{
|
|
|
|
"host": "",
|
|
|
|
"user": "",
|
|
|
|
"password": "",
|
|
|
|
"database": "",
|
|
|
|
"port":,
|
|
|
|
"waitForConnections": true,
|
|
|
|
"connectionLimit": 20,
|
|
|
|
"queueLimit": 0
|
|
|
|
},
|
|
|
|
"hashrate":{
|
|
|
|
"host": "",
|
|
|
|
"user": "",
|
|
|
|
"password": "",
|
|
|
|
"database": "",
|
|
|
|
"port":,
|
|
|
|
"waitForConnections": true,
|
|
|
|
"connectionLimit": 20,
|
|
|
|
"queueLimit": 0
|
|
|
|
},
|
|
|
|
"users_addresses":{
|
|
|
|
"host": "",
|
|
|
|
"user": "",
|
|
|
|
"password": "",
|
|
|
|
"database": "",
|
|
|
|
"port":,
|
|
|
|
"waitForConnections": true,
|
|
|
|
"connectionLimit": 20,
|
|
|
|
"queueLimit": 0
|
|
|
|
},
|
|
|
|
"balance":{
|
|
|
|
"host": "",
|
|
|
|
"user": "",
|
|
|
|
"password": "",
|
|
|
|
"database": "",
|
|
|
|
"port":,
|
|
|
|
"waitForConnections": true,
|
|
|
|
"connectionLimit": 20,
|
|
|
|
"queueLimit": 0
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"slave":{
|
|
|
|
"pooldb_slave":{
|
|
|
|
"host": "",
|
|
|
|
"user": "",
|
|
|
|
"password": "",
|
|
|
|
"database": "",
|
|
|
|
"port":,
|
|
|
|
"waitForConnections": true,
|
|
|
|
"connectionLimit": 20,
|
|
|
|
"queueLimit": 0
|
|
|
|
},
|
|
|
|
"sharesdb_slave":{
|
|
|
|
"host": "",
|
|
|
|
"user": "",
|
|
|
|
"password": "",
|
|
|
|
"database": "",
|
|
|
|
"port":,
|
|
|
|
"waitForConnections": true,
|
|
|
|
"connectionLimit": 20,
|
|
|
|
"queueLimit": 0
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"redis_options":{
|
|
|
|
"redis1":{
|
|
|
|
"host":"",
|
|
|
|
"port":,
|
|
|
|
"db":,
|
|
|
|
"connectTimeout":
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"node_options":{
|
|
|
|
"node1":{
|
|
|
|
"rpcUser":"",
|
|
|
|
"rpcPassword":"<alph api-key>",
|
|
|
|
"rpcPort":,
|
|
|
|
"rpcHost":""
|
|
|
|
},
|
|
|
|
"node2":{
|
|
|
|
"rpcUser":"",
|
|
|
|
"rpcPassword":"<alph api-key>",
|
|
|
|
"rpcPort":,
|
|
|
|
"rpcHost":""
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"retry_options":{
|
|
|
|
"node":{
|
|
|
|
"max_retries":,
|
|
|
|
"retry_delay":
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"REPORT_ADDRESS":"",
|
|
|
|
"MAX_MATURE":,
|
|
|
|
"distribution_conf":{
|
|
|
|
"PPLNS_SIZE":,
|
|
|
|
"MODEL_PERCENT":{
|
|
|
|
"SCORE":,
|
|
|
|
"PPLNS":,
|
|
|
|
"PROPDIF":
|
|
|
|
},
|
|
|
|
"SCORE_PERCENT":{
|
|
|
|
"HASHRATE":,
|
|
|
|
"STDDEVS":
|
|
|
|
},
|
|
|
|
"POOL_FEE":
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-10 11:19:41 +00:00
|
|
|
############# pm2 start common #############
|
2025-04-10 10:53:16 +00:00
|
|
|
pm2 start app.js --name nexa-hashratev2 -- hashrate nexa
|
|
|
|
pm2 start app.js --name nexa-reportv2 -- report nexa
|
|
|
|
pm2 start app.js --name nexa-confirm -- confirm nexa
|
|
|
|
pm2 start app.js --name nexa-distributionv2 -- distribution nexa
|
|
|
|
pm2 start app.js --name email -- notice nexa
|
|
|
|
pm2 start app.js --name nexa-balance -- balance nexa
|
|
|
|
|
|
|
|
pm2 start app.js --name grs-hashratev2 -- hashrate grs
|
|
|
|
pm2 start app.js --name grs-reportv2 -- report grs
|
|
|
|
pm2 start app.js --name grs-confirm -- confirm grs
|
|
|
|
pm2 start app.js --name grs-distributionv2 -- distribution grs
|
|
|
|
pm2 start app.js --name grs-balance -- balance grs
|
|
|
|
|
|
|
|
pm2 start app.js --name mona-hashratev2 -- hashrate mona
|
|
|
|
pm2 start app.js --name mona-reportv2 -- report mona
|
|
|
|
pm2 start app.js --name mona-confirm -- confirm mona
|
|
|
|
pm2 start app.js --name mona-distributionv2 -- distribution mona
|
|
|
|
pm2 start app.js --name mona-balance -- balance mona
|
|
|
|
|
|
|
|
pm2 start app.js --name dgbs-hashratev2 -- hashrate dgbs
|
|
|
|
pm2 start app.js --name dgbs-reportv2 -- report dgbs
|
|
|
|
pm2 start app.js --name dgbs-confirm -- confirm dgbs
|
|
|
|
pm2 start app.js --name dgbs-distributionv2 -- distribution dgbs
|
|
|
|
# pm2 start app.js --name dgbs-balance -- balance dgbs
|
|
|
|
|
|
|
|
pm2 start app.js --name dgbq-hashratev2 -- hashrate dgbq
|
|
|
|
pm2 start app.js --name dgbq-reportv2 -- report dgbq
|
|
|
|
pm2 start app.js --name dgbq-confirm -- confirm dgbq
|
|
|
|
pm2 start app.js --name dgbq-distributionv2 -- distribution dgbq
|
|
|
|
# pm2 start app.js --name dgbq-balance -- balance dgbq
|
|
|
|
|
|
|
|
pm2 start app.js --name dgbo-hashratev2 -- hashrate dgbo
|
|
|
|
pm2 start app.js --name dgbo-reportv2 -- report dgbo
|
|
|
|
pm2 start app.js --name dgbo-confirm -- confirm dgbo
|
|
|
|
pm2 start app.js --name dgbo-distributionv2 -- distribution dgbo
|
|
|
|
pm2 start app.js --name dgb-balance -- balance dgbo
|
|
|
|
|
|
|
|
pm2 start app.js --name rxd-hashratev2 -- hashrate rxd
|
|
|
|
pm2 start app.js --name rxd-reportv2 -- report rxd
|
|
|
|
pm2 start app.js --name rxd-confirm -- confirm rxd
|
|
|
|
pm2 start app.js --name rxd-distributionv2 -- distribution rxd
|
|
|
|
pm2 start app.js --name rxd-balance -- balance rxd
|
|
|
|
|
|
|
|
pm2 start app.js --name enx-hashrate -- hashrate enx
|
|
|
|
pm2 start app.js --name enx-report -- report enx
|
|
|
|
|
|
|
|
pm2 start app.js --name alph-report -- report alph
|
2025-04-11 11:59:58 +00:00
|
|
|
pm2 start app.js --name alph-hashrate -- hashrate alph
|
|
|
|
pm2 start app.js --name alph-confirm -- confirm alph
|
|
|
|
pm2 start app.js --name alph-distribution -- distribution alph
|
|
|
|
pm2 start app.js --name alph-balance -- balance alph
|