Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payment trouble. #145

Open
AndreyNag opened this Issue Oct 18, 2018 · 13 comments

Comments

Projects
None yet
2 participants
@AndreyNag
Copy link

AndreyNag commented Oct 18, 2018

0-18T06:52:15.048Z] [info] [digitalcoin sha256] [PaymentProcessor] : Payments to miners: {"D***":"4734.79693792832778862686937","D***":"15.12445526167221137313063"}
0-18T06:52:15.048Z] [info] [digitalcoin sha256] [PaymentProcessor] : Ok, going to pay from "default" address with final amounts: {"D***":4734.79693792,"D***":15.12445526}
[warn] [digitalcoin sha256] [CoinDaemon] : Daemon returned unexpected return code 500, data = "{\"result\":null,\"error\":{\"code\":-6,\"message\":\"Transaction too large\"},\"id\":1539845535056}\n"

What i have to do to normalize payment sequences?

@leshacat

This comment has been minimized.

Copy link

leshacat commented Oct 24, 2018

The transaction has gotten too large, this is a bug in the payment processor it looks like... Problems with batch transaction processing I think. I read about it somewhere and forgot about it.

Not much you can do but wait for me, or find someone else to make a fix - I suggest adding the issue to GitCoin, it is very helpful :)

I am busy with other things, but payment processor is part on my list :)

clone my fork here leshacat/BootNOMP

@leshacat

This comment has been minimized.

Copy link

leshacat commented Oct 24, 2018

Issue is cause of same problem "batch processing" here #106

@leshacat

This comment has been minimized.

Copy link

leshacat commented Oct 25, 2018

I am going to make a branch and start working on this issue specifically because it is a rather serious issue. Watch this ticket and my repo leshacat/BootNOMP/tree/payment-processor-patch-1 for a fix :)

@leshacat

This comment has been minimized.

Copy link

leshacat commented Oct 25, 2018

Personal Note: This issue is related to batch processing of payments where one address is invalid. Fix is to validate addresses prior to payment RPC call.

leshacat added a commit to EasyX-Community/EasyNOMP-dev that referenced this issue Oct 26, 2018

@leshacat

This comment has been minimized.

Copy link

leshacat commented Oct 27, 2018

@AndreyNag or someone with stuck payments (if any) please try this patch / branch: https://github.com/leshacat/EasyNOMP/tree/paymentprocessor-patch-1

!~ WARNING ~! This is untested as of yet...!

If you have it installed already, just run git pull ; git checkout payment-processor-patch-1 ; git pull ;

If you have node-open-mining-portal or BootNOMP installed, they are compatible, so you can just copy the config files, run through install instructions, and you should be good to go

Please let me know if you are testing this and if it works...

Otherwise we must wait for my pool to find a RVN block which may be a long time

@leshacat

This comment has been minimized.

Copy link

leshacat commented Oct 27, 2018

@everyone:

This problem is caused when you have "validateWorkerUsername": false, in your config.json. Once the invalid worker is in the database, there is no way to remove it.

Therefore I propose the solution to be to harden the payments module by not pay out invalid addresses for now, and track how much of the balance was mined to an invalid address so pool owner can take it for donations :)

Still working on a fix :) previous one won't work.

@leshacat

This comment has been minimized.

Copy link

leshacat commented Oct 27, 2018

I was looking at the code, as it turns out the original developers were about to add in address validation to the payment module. They left a comment inside the payment module:

//todo validate by daemon

This means they must have been planning to add this just before they dropped the project!

Now I know where to add it, and roughly what to add I will have a fix shortly.

I will be able to test this shortly on my pool because my brother miners left me :-/

@leshacat

This comment has been minimized.

Copy link

leshacat commented Oct 28, 2018

@lukepighetti @everyone:

I may have fixed the invalid address issue. Now the payment processor validates the addresses with the coin daemon prior to paying out.

To test it out, clone EasyNOMP then run:
git checkout paymentprocessor-patch-1
git pull
npm install
npm audit fix

WARNING: This code affects payments and is currently untested!

For those with stuck payments, this should "unstuck" them and send them off to your miners. If you come accross a "redis FLUSHALL" command in the install instructions, DO NOT run it, it will wipe your payments data!

I will be able to test this shortly on my pool because my brother miners left me :-/

If you have tested this please post as much of your log as possible, and let me know if it works so I can merge it to master, thank you

@leshacat

This comment has been minimized.

Copy link

leshacat commented Oct 30, 2018

Hold off on testing... I was able to add address validation, but I have found bugs in the "fixes" now I've been able to test them.

I have a plan to fix it, as described here I will merge the z-nomp payment processor into the EasyNOMP payment processor. This will fix these bugs, while adding PPLNTS payout method.

I will be working on this over the next week or so. Should not be long for a fix.

leshacat added a commit to EasyX-Community/EasyNOMP-dev that referenced this issue Oct 31, 2018

Payment Processor Fix - Validation
Payment processor patch for issue foxer666#145
RE: Validation of payout addresses

leshacat added a commit to leshacat/node-open-mining-portal that referenced this issue Oct 31, 2018

Update paymentProcessor.js
Fix for issuehttps://github.com/foxer666/node-open-mining-portal/issues/145

You will need to test this, as your code is different from BootNOMP and I had to adjust the validation procedure.
@leshacat

This comment has been minimized.

Copy link

leshacat commented Oct 31, 2018

FIX FOR #106 unable to post on that issue!

zone117x/node-open-mining-portal#639

Testing will be needed as I had to modify the validation code due to different codebase.

@leshacat

This comment has been minimized.

Copy link

leshacat commented Oct 31, 2018

Shoot wrong repo lol... Your welcome zone117x 📦

I have a problem, I went to fork your project and I cant.

I cannot fork it because I already have. EasyNOMP is a fork of BootNOMP which is a fork of foxer666/node-open-mining-portal

You may have to wait until I make the changes in EasyNOMP and learn how to cherry pick commits before I can merge up to BootNOMP to be merged up to you...

Alternatively just rip the code changes from the PR and add them in

Pardon me while I learn git...

@leshacat

This comment has been minimized.

Copy link

leshacat commented Oct 31, 2018

I got this issue mixed up with the other one...

This issue is the transaction being too large for the batch.

@AndreyNag

This comment has been minimized.

Copy link
Author

AndreyNag commented Oct 31, 2018

Hey. I've been away for a while.
I found another solution for myself. Stopped the pool, made payments to miners manually. Cleaned the redis database of records with the keys redis-cli keys" digitalcoin sha256:* " | xargs-L1-I '$' echo '" $ "| xargs redis-cli del and launched the pool again.
The problem with incorrect accruals, preventing payments in the regular way, remains. You have to fill the default wallet with a certain number of coins manually. Now, when the default wallet is not empty, payments will be made automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.