Venthos / nodejs-pool

The fork of Snipa22's nodejs-pool that is maintained for BlockHarbor.net
https://blockharbor.net
Other
12 stars 8 forks source link

payment system #6

Closed alexmateescu closed 6 years ago

alexmateescu commented 6 years ago

hi.
i am trying to adapt the pool for my coin and everything works fine except for the payments module. it says unknown error returned from wallet and the fee used to send the coins is very small to the point it says NaN Fee in payments. i'he used the INTS.js for both the coin and wallet and just changed the coin.

can you give me some hints of what to look for?

BKdilse commented 6 years ago

I'm getting similar issue, payments not processing, logs show insufficient balance.

admin.html shows mined amount, but the Wallet section shows NaH ITNS

BKdilse commented 6 years ago

Stopped wallet rpc, started wallet cli, refreshed and full balance came through (was missing some). Started wallet rpc, and pay out worked. Web page is still showing no details for balance.

Venthos commented 6 years ago

@alexmateescu you said you were using a custom coin? If so, it could be a variety of things that depend on the JSON RPC of that coin. NaN Fee in payments to me suggests that it's Bytecoin based but you either are not building off of the Bytecoin based coin files (itns142.js instead of itns.js) and missing the special fee handling that payment system file has, or there's some custom JSON RPC handling for that coin that would require research. Payment logs may show more details.

@BKdilse I know you setup an ITNS 1.44 pool earlier. Is this issue for that pool or some other coin? The wallet balance showing NaN in admin.html I believe is an artifact of the baseline nodejs-pool code. To be honest, I've never used the web admin area and block it off out of security concern. I'll open an issue on that and see about fixing it. It shouldn't be related to payment processing issues, though. Could you paste your payment 'out' and 'error' logs? Feel free to scrub it of identifying data (wallet addresses/etc) if desired.

BKdilse commented 6 years ago

@Venthos Yes this is for the ITNS 1.44 pool with the XMR rebase daemon, wallet etc.

I accept your point on the Nan part.

I'll grab the logs in the evening. I know I saw Something about error accessing wallet.

alexmateescu commented 6 years ago

yes the coin is bytecoin based. if i try to use itns142 this is what i get

3|worker | 2018-03-06 13:42 +00:00: {"error":{"code":-32601,"message":"Method not found"},"id":"0","jsonrpc":"2.0"} 3|worker | 2018-03-06 13:42 +00:00: Unable to get wallet stats: Unable to process balance

with itns it was showing me the balance

regards

On 6 March 2018 at 13:28, Brian Oates notifications@github.com wrote:

@alexmateescu https://github.com/alexmateescu you said you were using a custom coin? If so, it could be a variety of things that depend on the JSON RPC of that coin. NaN Fee in payments to me suggests that it's Bytecoin based but you either are not building off of the Bytecoin based coin files (itns142.js instead of itns.js) and missing the special fee handling that payment system file has, or there's some custom JSON RPC handling for that coin that would require research. Payment logs may show more details.

@BKdilse https://github.com/bkdilse I know you setup an ITNS 1.44 pool earlier. Is this issue for that pool or some other coin? The wallet balance showing NaN in admin.html I believe is an artifact of the baseline nodejs-pool code. To be honest, I've never used the web admin area and block it off out of security concern. I'll open an issue on that and see about fixing it. It shouldn't be related to payment processing issues, though. Could you paste your payment 'out' and 'error' logs? Feel free to scrub it of identifying data (wallet addresses/etc) if desired.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Venthos/nodejs-pool/issues/6#issuecomment-370781045, or mute the thread https://github.com/notifications/unsubscribe-auth/AVoG2u09FnXSr_xXHSAwUNuo6Ghb76Zrks5tbo8OgaJpZM4SeT9u .

alexmateescu commented 6 years ago

and also

7|pool | 2018-03-06 13:45 +00:00: Invalid miner, disconnecting due to: Invalid payment address provided 7|pool | 2018-03-06 13:45 +00:00: Invalid miner, disconnecting due to: Invalid payment address provided

which with itns does not happen

On 6 March 2018 at 13:28, Brian Oates notifications@github.com wrote:

@alexmateescu https://github.com/alexmateescu you said you were using a custom coin? If so, it could be a variety of things that depend on the JSON RPC of that coin. NaN Fee in payments to me suggests that it's Bytecoin based but you either are not building off of the Bytecoin based coin files (itns142.js instead of itns.js) and missing the special fee handling that payment system file has, or there's some custom JSON RPC handling for that coin that would require research. Payment logs may show more details.

@BKdilse https://github.com/bkdilse I know you setup an ITNS 1.44 pool earlier. Is this issue for that pool or some other coin? The wallet balance showing NaN in admin.html I believe is an artifact of the baseline nodejs-pool code. To be honest, I've never used the web admin area and block it off out of security concern. I'll open an issue on that and see about fixing it. It shouldn't be related to payment processing issues, though. Could you paste your payment 'out' and 'error' logs? Feel free to scrub it of identifying data (wallet addresses/etc) if desired.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Venthos/nodejs-pool/issues/6#issuecomment-370781045, or mute the thread https://github.com/notifications/unsubscribe-auth/AVoG2u09FnXSr_xXHSAwUNuo6Ghb76Zrks5tbo8OgaJpZM4SeT9u .

Venthos commented 6 years ago

@alexmateescu Then it sounds like it's neither 100% bytecoin's JSON RPC or 100% monero's JSON RPC and would require custom tweaking/create the coin files to match that specific coin's JSON RPC.

The "Invalid payment address provided" means you have not updated the coin address prefixes in lib/coins/.js to match the coin you're using, so it's rejecting the wallet address because it's not an Intense coin address.

alexmateescu commented 6 years ago

forgot to do that

let me try again

On 6 March 2018 at 13:49, Brian Oates notifications@github.com wrote:

@alexmateescu https://github.com/alexmateescu Then it sounds like it's neither 100% bytecoin's JSON RPC or 100% monero's JSON RPC and would require custom tweaking/create the coin files to match that specific coin's JSON RPC.

The "Invalid payment address provided" means you have not updated the coin address prefixes in lib/coins/.js to match the coin you're using, so it's rejecting the wallet address because it's not an Intense coin address.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Venthos/nodejs-pool/issues/6#issuecomment-370786625, or mute the thread https://github.com/notifications/unsubscribe-auth/AVoG2mBuVBxlnKejdrVMQ74BPhdm8I14ks5tbpPxgaJpZM4SeT9u .

alexmateescu commented 6 years ago

that breaks things and the pool does not work anymore.

i'll stick with what is working and try to mod it to work. is should be just a minor fix. can you point me to the file where the json call is being built. i think that is where the issue is.

On 6 March 2018 at 13:49, Brian Oates notifications@github.com wrote:

@alexmateescu https://github.com/alexmateescu Then it sounds like it's neither 100% bytecoin's JSON RPC or 100% monero's JSON RPC and would require custom tweaking/create the coin files to match that specific coin's JSON RPC.

The "Invalid payment address provided" means you have not updated the coin address prefixes in lib/coins/.js to match the coin you're using, so it's rejecting the wallet address because it's not an Intense coin address.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Venthos/nodejs-pool/issues/6#issuecomment-370786625, or mute the thread https://github.com/notifications/unsubscribe-auth/AVoG2mBuVBxlnKejdrVMQ74BPhdm8I14ks5tbpPxgaJpZM4SeT9u .

alexmateescu commented 6 years ago

my log from the payments when they ran

4|payments | 2018-03-06 07:13 +00:00: Payment made out to multiple people, total fee: NaN XAO 4|payments | 2018-03-06 07:13 +00:00: Payment made to: AANbbVywNWAX2wnJbjiZuHSBL26GZBzQFBQLzg8PaaJVjex71hNF8VUMPvVLAA7TAXfopfHLBRbHGMXHkNUmfwC4RpHWrSG For: 118.947 XAO 4|payments | 2018-03-06 07:13 +00:00: Payment made to: A68M9p2izHAdQNGdLPobhZJ4TMje2tzXECGwducGhFPp7brj9vcVpCeUpdCzyshXZbSpk7XyaxuPp17KjncNypFo5zqQWko For: 1263.719 XAO 4|payments | 2018-03-06 07:13 +00:00: Unknown error from the wallet.

the funny thing is that the payments actually went through and i see the coins in the wallet.

On 6 March 2018 at 13:49, Brian Oates notifications@github.com wrote:

@alexmateescu https://github.com/alexmateescu Then it sounds like it's neither 100% bytecoin's JSON RPC or 100% monero's JSON RPC and would require custom tweaking/create the coin files to match that specific coin's JSON RPC.

The "Invalid payment address provided" means you have not updated the coin address prefixes in lib/coins/.js to match the coin you're using, so it's rejecting the wallet address because it's not an Intense coin address.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Venthos/nodejs-pool/issues/6#issuecomment-370786625, or mute the thread https://github.com/notifications/unsubscribe-auth/AVoG2mBuVBxlnKejdrVMQ74BPhdm8I14ks5tbpPxgaJpZM4SeT9u .

Venthos commented 6 years ago

"Unknown error from the wallet" ultimately means global.support.rpcWallet(transferFunc, paymentDetails, function (body) { returned a non-true result from the resulting callback. Since payment seems to have gone through, this suggests that "body.result" is returning false despite success. You'd have to check into the JSON RPC call for payment and see what it returns on success and adapt the code accordingly in that function I mentioned

alexmateescu commented 6 years ago

thanks. this helps a lot. i am not very much into programming so i kind of need help. i'll have a look

On 6 March 2018 at 15:57, Brian Oates notifications@github.com wrote:

"Unknown error from the wallet" ultimately means global.support.rpcWallet(transferFunc, paymentDetails, function (body) { returned a non-true result from the resulting callback. Since payment seems to have gone through, this suggests that "body.result" is returning false despite success. You'd have to check into the JSON RPC call for payment and see what it returns on success and adapt the code accordingly in that function I mentioned

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Venthos/nodejs-pool/issues/6#issuecomment-370829271, or mute the thread https://github.com/notifications/unsubscribe-auth/AVoG2giNhpVS8u3GzEG1gQu9HhAoEmYhks5tbrHagaJpZM4SeT9u .

BKdilse commented 6 years ago

Guys, as my issue is different, I'll raise a separate thread.

alexmateescu commented 6 years ago

thanks for the help. it was the fee after all. out wallet does not send the fee when replying to the transfer command hence the issue cause the mysql inser was based of fee.

changed that and working perfectly.

On 6 March 2018 at 22:30, Brian Oates notifications@github.com wrote:

Closed #6 https://github.com/Venthos/nodejs-pool/issues/6.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Venthos/nodejs-pool/issues/6#event-1507660071, or mute the thread https://github.com/notifications/unsubscribe-auth/AVoG2re33Pyz_naf-pq7bbiBQHh-e5sMks5tbw4agaJpZM4SeT9u .