Giter Club home page Giter Club logo

nodejs-pool's People

Contributors

1rv1n-git avatar 78bash avatar adaxi avatar azaryc2s avatar bobbieltd avatar camthegeek avatar chron0 avatar coinlogik avatar didrole avatar ephz3nt avatar gardner avatar minemoneropro avatar moneroocean avatar mxjoe avatar quinnmallorry avatar snipa22 avatar songnob avatar spudz76 avatar suhz avatar uaktags avatar warcop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nodejs-pool's Issues

Sort workers on Dashboard

When viewing your workers from the dashboard, it would a nice feature to allow users to sort their workers by name, hash rate, or total hashes.

Feature Request: Altcoin Profitability

It would be nice to see the profitability of the altcoins in the page. We know that the pool auto-switches to them when they are at least 20% more profitable than XMR but we don't know the actual percentage when it happens. It is just good to know that we are switching to GRFT for example because it is 50% more profitable.

CN/2 (Monero Testnet v9) Not working

Hello,
When testing nodejs-pool with algo CN/2, the resultHash does not seem to match the user provided hash. However, it does seem to work with killallasics.moneroworld.com (cryptonote universal).

Can't quite pin down where the issue stems from, as the new cryptonight hashing does seem to convert blobs properly in it's v2 tests.

don't add incorrect user in table

May it can be better don't add with incorrect email
let filter = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
if (!filter.test(pass_split[1])) {
return;
}

global.mysql.query("INSERT INTO users (username, email) VALUES (?, ?)", [payoutAddress, pass_split[1]]);

global.database.getCache('pool_stats_pps') return false, do I miss something in db pool.config ?

Hi,
after first run deploy.sh , those API:

  • /api/pool/stats/pps
  • /api/pool/stats/pplns
  • /api/pool/stats/solo

keep telling:

TypeError: Cannot create property 'fee' on boolean 'false'
   at /home/username/nodejs-pool/lib/api.js:248:28
   at Layer.handle [as handle_request] (/home/username/nodejs-pool/node_modules/express/lib/router/layer.js:95:5)
   at next (/home/username/nodejs-pool/node_modules/express/lib/router/route.js:131:13)
   at makeResponseCacheable (/home/username/nodejs-pool/node_modules/apicache/src/apicache.js:207:5)
   at cache (/home/username/nodejs-pool/node_modules/apicache/src/apicache.js:438:16)
   at Layer.handle [as handle_request] (/home/username/nodejs-pool/node_modules/express/lib/router/layer.js:95:5)
   at next (/home/username/nodejs-pool/node_modules/express/lib/router/route.js:131:13)
   at Route.dispatch (/home/username/nodejs-pool/node_modules/express/lib/router/route.js:112:3)
   at Layer.handle [as handle_request] (/home/username/nodejs-pool/node_modules/express/lib/router/layer.js:95:5)
   at /home/username/nodejs-pool/node_modules/express/lib/router/index.js:277:22
   at param (/home/username/nodejs-pool/node_modules/express/lib/router/index.js:349:14)
   at param (/home/username/nodejs-pool/node_modules/express/lib/router/index.js:365:14)
   at Function.process_params (/home/username/nodejs-pool/node_modules/express/lib/router/index.js:410:3)
   at next (/home/username/nodejs-pool/node_modules/express/lib/router/index.js:271:10)
   at jsonParser (/home/username/nodejs-pool/node_modules/body-parser/lib/types/json.js:110:7)
   at Layer.handle [as handle_request] (/home/username/nodejs-pool/node_modules/express/lib/router/layer.js:95:5)

I've check the code, it seen not get the db cache on /api.js line 248,

global.database.getCache('pool_stats_pplns')

which returns a false value.
Do I miss some configs value in database pool.config or config.json something ?
And, API /leafApi also return a 502 Bad Gateway.

Thanks for help.

Email schedule feature

I’d like to have email merge feature so the miners will receive payments report once or twice per day (with payments and time of that payments). It’s mainly for small shit coins that low hashrate miners receive many payments.
Thanks MoneroOcean.
Very low priority ( I can disable or make payment interval higher to reduce emails as a workaround)

Can't open wallet_trust_1 file

Hi - on trying your fork the pool modules errors with:

2017-12-27 14:06 -05:00: Can't open wallet_trust_1 file
2017-12-27 14:06 -05:00: Can't open wallet_trust_2 file
2017-12-27 14:06 -05:00: Can't open wallet_trust_3 file
2017-12-27 14:06 -05:00: Can't open wallet_trust_4 file
2017-12-27 14:06 -05:00: Can't open wallet_trust_5 file
2017-12-27 14:06 -05:00: Can't open wallet_trust_6 file
2017-12-27 14:06 -05:00: Can't open wallet_trust_7 file
2017-12-27 14:06 -05:00: Can't open wallet_trust_8 file
2017-12-27 14:06 -05:00: Can't open wallet_trust_1 file
2017-12-27 14:06 -05:00: Can't open wallet_trust_2 file
2017-12-27 14:06 -05:00: Can't open wallet_trust_3 file
2017-12-27 14:06 -05:00: Can't open wallet_trust_4 file
2017-12-27 14:06 -05:00: Can't open wallet_trust_5 file
2017-12-27 14:06 -05:00: Can't open wallet_trust_6 file
2017-12-27 14:06 -05:00: Can't open wallet_trust_7 file
2017-12-27 14:06 -05:00: Can't open wallet_trust_8 file

Using your most recent commit of 2e32924

Any thoughts?

transfer_split issue

hi guys

if i try to change the transfer func to transfer_split here is the answer ai am getting from the wallet.

11|payment | 2018-07-08 13:09:33:985 +03:00: Unknown error from the wallet: {"amount_list":[1617070000000],"fee_list":[137045640],"multisig_txset":"","tx_hash_list":["a337f500c9b56f8deecc40ebf318f2b184910060f5a1b0e30e75f87ae7c702c9"]}

what could be the issue?

longRunner blockID variable type error

Hi MonerOcean,

When you have time, could you please take a look at the Snipa's code to see why we got longRunner errors :

  1. nodejs-pool/lib/local_comms.js :
    function (lastBlock, difficulty, callback) {
    let shareCount = 0;
    let pplnsFound = false;
    let blockList = [];
    console.log("Scanning from: "+lastBlock + " for more than: " + difficulty + " shares");
    range.range(0, lastBlock+1).forEach(function (blockID) {
    blockID = (blockID - lastBlock+1) * -1;
    if (blockID < 0){
    return;
    }
    debug("Scanning block: " + blockID);
    let txn = global.database.env.beginTxn({readOnly: true});
    let cursor = new global.database.lmdb.Cursor(txn, global.database.shareDB);
    for (let found = (cursor.goToRange(blockID) === blockID); found; found = cursor.goToNextDup()) {
    if (pplnsFound){

  2. The tweak that doesn't work : blockID = Number((blockID - lastBlock+1) * -1);

  3. The tweak that works : cursor.goToRange(parseInt(blockID))

  4. Error message : Error: You specified keyIsUint32 on the Dbi, so you can't use other key types with it.
    at /home/monero/nodejs-pool/lib/local_comms.js:638:46
    at Array.forEach () ....

Snipa is busy at the moment. I hope you can help. Thank you.

Request separate pool/port for profit switchers

Hi,

I would like to see a true profit switching pool, meaning only miners with profit switching configured will be on the pool. Also on this separate pool (port) I would like to see algo switch based on true profits without giving xmr 10% advantage. Everyone on the pool would mine the most profitable coin and share the rewards.

Thank you!

Aeon fork, cannot send payments

Hello :) I forked Aeon and have everything running. Pool runs okay, can find blocks, balances change. I have one last problem that I cannot solve.

No matter what I put for the balances or payments it always fails with

This is the output from the wallet
2018-06-18 13:58:45.853 [RPC0] ERROR wallet.wallet2 src/wallet/wallet2.cpp:6315 !scanty_outs.empty(). THROW EXCEPTION: error::not_enough_outs_to_mix
2018-06-18 13:58:45.868 [RPC0] WARN net.http src/wallet/wallet_errors.h:794 /home/pooldaemon/durinscoin/src/wallet/wallet2.cpp:6315:N5tools5error22not_enough_outs_to_mixE: not enough outputs to use, ring size = 2, scanty_outs:
9.000000000000 - 1
0.800000000000 - 1
0.600000000000 - 1
70.000000000000 - 1
0.020000000000 - 1

Payments module error

payments > 2018-06-19 13:00 +00:00: Issue making payments{"code":-19,"message":"not enough outputs to use Please use sweep_dust."}

payments > Will not make more payments until the payment daemon is restarted!

I tried to do sweep_unmixable in pools wallet and sweep_all 1 mywallet to get it to work but nothing helps.

I am not sure if it something to do with the coin or the pool isn't set up to send that many coins or something?

I set the max coins per transaction to something really low and have 1 payee per and still not enough output errors

Have over 10,000 coins in the wallet from 70 per block reward and I just cannot get coins to send.
Not sure if this is the best place to ask?

Is this something I need to fix with the coin or does anyone know of a workaround some how?
I am going to try send all the coins from the pool wallet to a new one and see if that works from there.
But even so when a new pool opens, they are never going to be able to make payouts.

How are outputs made? This is blockchain starting from height 0 not a real fork.

Options window

Options window automatically minimises after entering password. Make it stay open as this causes some confusion, as seen in discord chat ;)

API response 502, error log says No such file or directory at Database.initEnv

Hi guys,
this is my first time try to deploy the pool on server, then I got the 502 error response from API endpoint and login endpoint, after running the deploy script. Check the pm2 error logs, what it says as below. How to fix it ?

Error: No such file or directory
    at Database.initEnv (/home/pooluser/nodejs-pool/lib/local_comms.js:29:29)
    at /home/pooluser/nodejs-pool/init.js:54:21
    at tryCatcher (/home/pooluser/nodejs-pool/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/pooluser/nodejs-pool/node_modules/bluebird/js/release/promise.js:510:31)
    at Promise._settlePromise (/home/pooluser/nodejs-pool/node_modules/bluebird/js/release/promise.js:567:18)
    at Promise._settlePromise0 (/home/pooluser/nodejs-pool/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/home/pooluser/nodejs-pool/node_modules/bluebird/js/release/promise.js:691:18)
    at Async._drainQueue (/home/pooluser/nodejs-pool/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/home/pooluser/nodejs-pool/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/home/pooluser/nodejs-pool/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:810:20)
    at tryOnImmediate (timers.js:768:5)
    at processImmediate [as _immediateCallback] (timers.js:745:5)

TypeError: Cannot read property 'split' of undefined

2018-07-27 13:44 +00:00: TypeError: Cannot read property 'split' of undefined
at new Miner (/home/pooldaemon/nodejs-pool/lib/pool.js:264:27)
at handleMinerData (/home/pooldaemon/nodejs-pool/lib/pool.js:898:21)
at handleMessage (/home/pooldaemon/nodejs-pool/lib/pool.js:1188:13)
at Socket. (/home/pooldaemon/nodejs-pool/lib/pool.js:1246:25)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:246:13)
at Socket.Readable.push (_stream_readable.js:208:10)
at TCP.onread (net.js:594:20)
2018-07-27 13:44 +00:00: Error [ERR_IPC_CHANNEL_CLOSED]: channel closed
at ChildProcess.target.send (internal/child_process.js:588:16)
at Worker.send (internal/cluster/worker.js:54:28)
at /home/pooldaemon/nodejs-pool/lib/pool.js:138:16
at Array.forEach ()
at sendToWorkers (/home/pooldaemon/nodejs-pool/lib/pool.js:137:16)
at Worker.messageHandler (/home/pooldaemon/nodejs-pool/lib/pool.js:96:17)
at emitTwo (events.js:131:20)
at Worker.emit (events.js:214:7)
at ChildProcess.Worker.process.on (internal/cluster/worker.js:42:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at emit (internal/child_process.js:772:12)
at _combinedTickCallback (internal/process/next_tick.js:141:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9)

any idea?

Getting profitability data from API

I'm developing a profit switcher for cryptonight coins and pools and I would like to integrate MoneroOcean to my app. Therefore I need a way to estimate the profit per day in us dollar with a specified hash rate.

I looked at your API and found the following data:

 "activePortProfit": 0.000007890717962390947,
 "price": {
            "usd": 163.619,
            "eur": 138.690728466
    }

I'm assuming that this will help me but what exactly is the value from "activePortProfit" representing?
Can you help me to calculate an estimated profit in us dollar per day based on a specified hash rate?

Bash Script Failed install

When running the script, there were some errors, I think my issue is that I'm running npm v6.1.0:

block 1512410 / 15574852018-06-23 19:15:12.952 7f5869bf2740 WARN blockchain.db.lmdb src/blockchain_db/lmdb/db_lmdb.cpp:72 Failed to add tx data to db transaction: Input/output error
2018-06-23 19:15:12.987 7f5869bf2740 FATAL bcutil src/blockchain_utilities/blockchain_import.cpp:450Error adding block to blockchain: Failed to add tx data to db transaction: Input/output error

export NVM_DIR="/home/pooldaemon/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
v8.9.3 is already installed.
Now using node v8.9.3 (npm v6.1.0)
bash: line 46: cd: /home/pooldaemon/nodejs-pool: No such file or directory
npm WARN saveError ENOENT: no such file or directory, open '/usr/local/src/monero/package.json'
npm WARN saveError EACCES: permission denied, open '/usr/local/src/monero/package-lock.json.495618337'
npm WARN enoent ENOENT: no such file or directory, open '/usr/local/src/monero/package.json'
npm WARN monero No description
npm WARN monero No repository field.
npm WARN monero No README data
npm WARN monero No license field.

Checking connectivity... done.
npm WARN deprecated [email protected]: We don't recommend using Bower for new projects. Please consider Yarn and Webpack or Parcel. You can read how to migrate legacy project here: https://bower.io/blog/2017/how-to-migrate-away-from-bower/
npm WARN deprecated [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN xmrpoolui@ No repository field.
npm WARN xmrpoolui@ license should be a valid SPDX license expression

added 441 packages from 389 contributors and audited 1463 packages in 25.91s
found 11 vulnerabilities (4 low, 1 moderate, 6 high)
run npm audit fix to fix them, or npm audit for details

[PM2][Module] Installing module pm2-logrotate
[PM2][Module] Module already installed. Updating.
[PM2][ERROR] script not found : /home/pooldaemon/init.js
script not found : /home/pooldaemon/init.js

$ cd monero
$ ls
monero-blockchain-export monero-wallet-cli monero-wallet-rpc.log pool.keys
monero-blockchain-import monero-wallet-cli.log pool wallet_pass
monerod monero-wallet-rpc pool.address.txt
$ ./monerod --version
Monero 'Helium Hydra' (v0.11.1.0-release)

Do I need to delete this Linux account and start from scratch or is there another option.

Thank you,

Block Expired.

I am working on alternative coins, but I am trying to figure out what "Block Expired" means?

Database explosion - longRunner possible bug.

It’s only my theory that there is a bug in longRunner with troublesome network. I guess it won’t happen with Monero because Monero network with high hashrate and stable.

In theory, block with higher number will have timestamp higher. For example, block m and block n, if m>n, timestamp of block m will > timestamp of block n.
With pool forking (turtlecoin case), it makes two thing, two blocks with same height but different timestamp (one correct and one forked).
With timestamp attacks (turtlecoin and graft cases), block lower have higher timestamp.

By somehow, with these hapenning, database at my pools keep growing, turtlecoin (21G) and graft(24G).
If you have free time or find something in the future, I hope you can help to fix this.

Zone117x node-cryptonote-pool syntax support

Hi MO !

Some miners use syntax from other pools of which syntax is different. Can you add support for that syntax too ? It means the pool will accept two syntaxs from zone117x's repo and Snipa's repo.

Thanks.

Block detect very slow when restarting pool

Here is the log (one coin pool), very slow to have block template (I guess at worker) :
7|pool | 2018-09-28 13:12:53:981 +00:00: Invalid miner 8PQqeiKmBM:test (103.7.39.41) [], disconnecting due to: No active block template
7|pool | 2018-09-28 13:12:59:970 +00:00: Invalid miner 8PQqeiKmBM:test (103.7.39.43) [], disconnecting due to: No active block template
7|pool | 2018-09-28 13:13:05:991 +00:00: Invalid miner 8PQqeiKmBM:test (103.7.39.46) [], disconnecting due to: No active block template
7|pool | 2018-09-28 13:13:11:984 +00:00: Invalid miner 8PQqeiKmBM:test (103.7.39.46) [], disconnecting due to: No active block template
7|pool | 2018-09-28 13:13:17:991 +00:00: Invalid miner 8PQqeiKmBM:test (103.7.39.42) [], disconnecting due to: No active block template
7|pool | 2018-09-28 13:13:18:922 +00:00: >>> Trusted=0(0.00%) / Validated=0(0.00%) / Invalid=0(0.00%) / Outdated=0(0.00%) / Throttled=0(0.00%) / Total=0 shares
7|pool | 2018-09-28 13:13:24:009 +00:00: Invalid miner 8PQqeiKmBM:test (103.7.39.46) [], disconnecting due to: No active block template
7|pool | 2018-09-28 13:13:38:962 +00:00: Did not send e-mail to 'undefined' successfully! Response: undefined Response: undefined
7|pool | 2018-09-28 13:13:48:922 +00:00: >>> Trusted=0(0.00%) / Validated=0(0.00%) / Invalid=0(0.00%) / Outdated=0(0.00%) / Throttled=0(0.00%) / Total=0 shares
7|pool | 2018-09-28 13:14:18:922 +00:00: >>> Trusted=0(0.00%) / Validated=0(0.00%) / Invalid=0(0.00%) / Outdated=0(0.00%) / Throttled=0(0.00%) / Total=0 shares
7|pool | 2018-09-28 13:14:48:922 +00:00: >>> Trusted=0(0.00%) / Validated=0(0.00%) / Invalid=0(0.00%) / Outdated=0(0.00%) / Throttled=0(0.00%) / Total=0 shares
7|pool | 2018-09-28 13:14:59:948 +00:00: [*] New block to mine at 438167 height with 150964764 difficulty and 12090 port (with algo hash factor 1)
7|pool | 2018-09-28 13:15:18:922 +00:00: >>> Trusted=0(0.00%) / Validated=2(100.00%) / Invalid=0(0.00%) / Outdated=0(0.00%) / Throttled=0(0.00%) / Total=2 shares

Switching coin mechanism

Sorry because I haven’t dig thousand of code lines to answer for myself.
When the pool is mining a coin but in the time of mining (no block found yet), there is a new coin that is more profitable, will the pool switch or it will continue to mine the old coin up to block found ?

Wrong number of connections

I don’t know if you experience with Monero hfv7. When some one mines with wrong algo, it seems that connection is always shown up on pool connections number and won’t be decreased even that miner is off.

Migration from Snipa’s repo to MoneroOcean’s repo

As I see in your code, you changed both code and database. Your repo is more active than Snipa’s and I’d like to migrate to yours. Must I reinstall my pool from scratch ? Is there a way to backup mysql and restore to the new one ? What about lmdb data about miners’ history , will I lose them ?

user scripts

Hey , thanks for the top work that you are doing , so now i need a help , i try to use your

ban_user.js but if i try to start it ex : node ban_user.js WALLET , is comming this error :

Please specify user address to ban

so , how i can specific the wallet and reason ?

ty

blockManager.js PPS mode is not functioning

After looking at the database, I think there is a typo in blockManager.js

global.config.payout.pps === true

shouble be substituated with
global.config.pps.enable === true

And this will fix the breaking.

Tube

Whether this pool supports Bittube v2 algo?

RangeError: Maximum call stack size exceeded

Hi

I am trying to setup your fork of the pool for a monero pool and i get the below error. the error appears about a minute after the miner started working.

what could it be?

i have followed all the how to and also checked to have the wallet addresses both pool and fee in the db.

Could you help me please?

7|pool | 2018-05-17 23:59:24:967 +02:00: >>> Trusted=1(4.35%) / Validated=22(95.65%) / Invalid=0(0.00%) / Outdated=0(0.00%) / Throttled=0(0.00%) / Total=23 shares
3|worker | 2018-05-17 23:59:34:362 +02:00: Starting stats collection for 1575017 height
3|worker | 2018-05-17 23:59:34:457 +02:00: Processed 0 workers for 0.096 seconds. Pool hashrate is: 1
3|worker | 2018-05-17 23:59:44:458 +02:00: Starting stats collection for 1575017 height
3|worker | 2018-05-17 23:59:44:517 +02:00: Processed 0 workers for 0.06 seconds. Pool hashrate is: 1
7|pool | 2018-05-17 23:59:51:072 +02:00: RangeError: Maximum call stack size exceeded
7|pool | at v4 (/home/pool/nodejs-pool/node_modules/request/node_modules/uuid/v4.js:4:12)
7|pool | at new Multipart (/home/pool/nodejs-pool/node_modules/request/lib/multipart.js:10:19)
7|pool | at new Request (/home/pool/nodejs-pool/node_modules/request/request.js:124:21)
7|pool | at request (/home/pool/nodejs-pool/node_modules/request/index.js:53:10)
7|pool | at Function.post (/home/pool/nodejs-pool/node_modules/request/index.js:61:12)
7|pool | at /home/pool/nodejs-pool/lib/remote_comms.js:12:25
7|pool | at /home/pool/nodejs-pool/node_modules/async/dist/async.js:2937:44
7|pool | at apply (/home/pool/nodejs-pool/node_modules/async/dist/async.js:21:25)
7|pool | at /home/pool/nodejs-pool/node_modules/async/dist/async.js:56:12
7|pool | at Request._callback (/home/pool/nodejs-pool/lib/remote_comms.js:16:28)
7|pool | at self.callback (/home/pool/nodejs-pool/node_modules/request/request.js:185:22)
7|pool | at emitOne (events.js:116:13)
7|pool | at Request.emit (events.js:211:7)
7|pool | at Request.init (/home/pool/nodejs-pool/node_modules/request/request.js:231:17)
7|pool | at new Request (/home/pool/nodejs-pool/node_modules/request/request.js:127:8)
7|pool | at request (/home/pool/nodejs-pool/node_modules/request/index.js:53:10)
PM2 | App [pool] with id [7] and pid [6546], exited with code [1] via signal [SIGINT]
PM2 | Starting execution sequence in -fork mode- for app name:pool id:7

HashFactor / Algo Options

Working with Bytecoin, which has not yet forked and wondering what the best options would be for the HashFactor, and algo settings. The coin functions on CN1, but I think it is causing issues.

Alternate Coins Implementation in this pool

Hi,
I'm curious to use this pool for 5 of different cryptonote based coins.
which includes:
XDN
Bitsum
Dero
BCN
Karbo

Please give some advice to put them in the pool,
I've successfully deployed this pool on the server for monero but need to know about alternate coins implementation and one more thing , if we can implement them in the pool so should we use all of them coins on parallel basis in a single pool.
Thanks

long runner

Hello

This code don't get oldest locked block. it gets first random locked blocks.
If you have some unlocked block, it can be problem.
I think this need to get all unlocked blocks sort it by "timestamp" then get oldest.

this.getOldestLockedBlock = function(){
this.refreshEnv();
debug("Getting the oldest locked block in the system");
let txn = this.env.beginTxn({readOnly: true});
let cursor = new this.lmdb.Cursor(txn, this.blockDB);
let highestBlock = null;
for (let found = cursor.goToFirst(); found; found = cursor.goToNext()) {
if (highestBlock !== null){
break;
}
cursor.getCurrentBinary(function(key, data){ // jshint ignore:line
let blockData = global.protos.Block.decode(data);
if (blockData.unlocked === false){
highestBlock = blockData;
}
});
}
cursor.close();
txn.commit();
if (highestBlock !== null) {
debug("Got the oldest locked block in the system at height: " + JSON.stringify(highestBlock));
} else {
debug("There are no unlocked blocks in the system. Woohoo!");
}
return highestBlock;
};

I told Snipa22, but he say it isn't promlem
Snipa22#227

Can you write what i offered?
Thanks

dublicate job

Hello i think there is need to add code to prevent send duplicate job.

function newBlockTemplate(template) {
let buffer = new Buffer(template.blocktemplate_blob, 'hex');
let previous_hash = new Buffer(32);
buffer.copy(previous_hash, 0, 7, 39);
console.log(threadName + 'New block to mine at height: ' + template.height + '. Difficulty: ' + template.difficulty);
if (activeBlockTemplate) {
if (activeBlockTemplate.previous_hash.toString('hex') === template.prev_hash ) {
console.log(threadName + "Same job");
return;
}

pastBlockTemplates.enq(activeBlockTemplate);
}
activeBlockTemplate = new BlockTemplate(template);
console.log(threadName + "Update workers");
for (let minerId in activeMiners) {
if (activeMiners.hasOwnProperty(minerId)) {
let miner = activeMiners[minerId];
debug(threadName + "Updating worker " + miner.payout + " With new work at height: " + template.height);
miner.sendNewJob();
}
}
}

example:
1|pool | 2018-01-05 21:18:22 +00:00: (Worker 4 - 63492) New block to mine at height: 42585. Difficulty: 75447651
1|pool | 2018-01-05 21:18:22 +00:00: (Worker 4 - 63492) activeBlockTemplate : 1cd23e23e48d238c57e536a8aac2817220ee6be70fad8b5b3c79279ae8515d09
1|pool | (Worker 4 - 63492) 7062b336bc841d0d0dea6b09e94bf3b3d42371019252dbf1dbd8fdaff5af2140
1|pool | (Worker 4 - 63492) Update workers
1|pool | 2018-01-05 21:18:22 +00:00: (Worker 1 - 63474) New block to mine at height: 42585. Difficulty: 75447651
1|pool | 2018-01-05 21:18:22 +00:00: (Worker 1 - 63474) activeBlockTemplate : 1cd23e23e48d238c57e536a8aac2817220ee6be70fad8b5b3c79279ae8515d09
1|pool | 2018-01-05 21:18:22 +00:00: (Worker 1 - 63474) 7062b336bc841d0d0dea6b09e94bf3b3d42371019252dbf1dbd8fdaff5af2140
1|pool | 2018-01-05 21:18:22 +00:00: (Worker 1 - 63474) Update workers
1|pool | 2018-01-05 21:18:22 +00:00: (Worker 2 - 63480) New block to mine at height: 42585. Difficulty: 75447651
1|pool | (Worker 2 - 63480) activeBlockTemplate : 1cd23e23e48d238c57e536a8aac2817220ee6be70fad8b5b3c79279ae8515d09
1|pool | (Worker 2 - 63480) 7062b336bc841d0d0dea6b09e94bf3b3d42371019252dbf1dbd8fdaff5af2140
1|pool | (Worker 2 - 63480) Update workers
1|pool | 2018-01-05 21:18:22 +00:00: (Worker 3 - 63486) New block to mine at height: 42585. Difficulty: 75447651
1|pool | 2018-01-05 21:18:22 +00:00: (Worker 3 - 63486) activeBlockTemplate : 1cd23e23e48d238c57e536a8aac2817220ee6be70fad8b5b3c79279ae8515d09
1|pool | (Worker 3 - 63486) 7062b336bc841d0d0dea6b09e94bf3b3d42371019252dbf1dbd8fdaff5af2140
1|pool | (Worker 3 - 63486) Update workers
1|pool | 2018-01-05 21:18:22 +00:00: (Master) New block to mine at height: 42585. Difficulty: 75447651
1|pool | 2018-01-05 21:18:22 +00:00: (Master) activeBlockTemplate : 1cd23e23e48d238c57e536a8aac2817220ee6be70fad8b5b3c79279ae8515d09
1|pool | (Master) 7062b336bc841d0d0dea6b09e94bf3b3d42371019252dbf1dbd8fdaff5af2140
1|pool | 2018-01-05 21:18:22 +00:00: (Worker 4 - 63492) New block to mine at height: 42585. Difficulty: 75447651
1|pool | (Worker 4 - 63492) activeBlockTemplate : 7062b336bc841d0d0dea6b09e94bf3b3d42371019252dbf1dbd8fdaff5af2140
1|pool | (Worker 4 - 63492) 7062b336bc841d0d0dea6b09e94bf3b3d42371019252dbf1dbd8fdaff5af2140
1|pool | (Worker 4 - 63492) Same job
1|pool | 2018-01-05 21:18:22 +00:00: (Master) Update workers

Installation error at patching monero daemon

Hi,

I tried to install monoeroocean's nodejs-pool on Ubuntu 16.04.4 several times the past days but it always comes with an error when trying to patch the monero deamon with following code:
curl https://raw.githubusercontent.com/MoneroOcean/nodejs-pool/master/deployment/monero_daemon.patch | sudo git apply -v

The error output is:

Checking patch src/cryptonote_core/tx_pool.cpp...
error: while searching for:
    LockedTXN lock(m_blockchain);
auto sorted_it = m_txs_by_fee_and_receive_time.begin();
while (sorted_it != m_txs_by_fee_and_receive_time.end())
{
  txpool_tx_meta_t meta = m_blockchain.get_txpool_tx_meta(sorted_it->second);
  LOG_PRINT_L2("Considering " << sorted_it->second << ", size " << meta.blob_size << ", current block size " << total_size << "/" << max_total_size << ", current coinbase " << print_money(best_coinbase));
error: patch failed: src/cryptonote_core/tx_pool.cpp:863
error: src/cryptonote_core/tx_pool.cpp: patch does not apply

Annotation: The bin folder of monero under /usr/local/src/monero/build/release/bin is not existing.

Running sudo systemctl status monero shows the daemon is not running:

● monero.service - Monero Daemon
   Loaded: loaded (/lib/systemd/system/monero.service; enabled; vendor preset: enabled)
   Active: inactive (dead) (Result: exit-code) since Mi 2018-05-09 10:50:49 UTC; 43min ago
  Process: 1603 ExecStart=/usr/local/src/monero/build/release/bin/monerod --rpc-bind-ip 127.0.0.1 --detach --restricted-rpc (code=exited, status=203/EXEC)
Mai 09 10:50:48 eu systemd[1]: monero.service: Unit entered failed state.
Mai 09 10:50:48 eu systemd[1]: monero.service: Failed with result 'exit-code'.
Mai 09 10:50:49 eu systemd[1]: monero.service: Service hold-off time over, scheduling restart.
Mai 09 10:50:49 eu systemd[1]: Stopped Monero Daemon.
Mai 09 10:50:49 eu systemd[1]: monero.service: Start request repeated too quickly.
Mai 09 10:50:49 eu systemd[1]: Failed to start Monero Daemon.

Does anyone has any idea? This problem prevents running the pool.

So sad, I can’t follow your codes with multi coins

Hix, it looks complicated now. If possible, can you maintain two repos, one old repo for only one coin, one repo for multiple coins. I love your codes but it becomes too hard for me now :((. Thanks for your great work.

Block template request failed for 18081 port.

When running on testnet (and changing the configurations within MySQL - ports and testnet=true), I seem to get:
Block template request failed for 18081 port.

(I changed daemon RPC port to run on 18081 on testnet)
Also tried 28081 (default testnet daemon port), same error message:
[Pool] Block template request failed for 18081 port.

However, the monero-wallet-cli and monero-wallet-rpc connect to the daemon no problem. It just doesn't seem to be generating a block template?

Add support to change email

Hello
Please add support to change email in settings after login.

app.js

secureRoutes.post('/changeEmail', function (req, res) {
      global.mysql.query("UPDATE users SET email = ? WHERE id = ?", [req.body.email, req.decoded.id]).then(function () {
        return res.json({'msg': 'Email updated, set to: ' + req.body.email});
    });
});

Wallet RPC : Mismatched txids when processing unconfimed txes from pool

I run ETN pool with wallet rpc : /usr/local/src/electroneum/bin/electroneum-wallet-rpc --rpc-bind-port 26969 --password-file ~/wallet_pass --wallet-file xxxxWallet --disable-rpc-login --trusted-daemon
It happens when payments module send ETN to miners.
I got this error . Do you know why ?
wallet etn error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.