MASQ-Project / MASQ-Node-issues

This repo contains the issues that are used for planning MASQ Node product work. It has no code in it, only GitHub issue tickets
https://masq.ai/
31 stars 12 forks source link

Improve error handling in PENDING_PAYABLE #663

Open dnwiebe opened 1 year ago

dnwiebe commented 1 year ago

There are several problems mentioned below. Do enough research to be able to write cards to deal with each of them. If you don't have time to do enough research for a particular card, make a more-specific Spike card for that problem.

Problems:

pending-payables scanning should be able to address the above with the right design

This card used to be solely about the PROCESS_ERROR column of PENDING_PAYABLE; if one of the cards that springs from this Spike is about fixing that, you might want to use this text in it:

Modify all the code that deals with PROCESS_ERROR to use timestamps instead.

This will require that you increment the CURRENT_SCHEMA constant and write a new database migration to modify old databases with PROCESS_ERROR to the new schema with the timestamp. (If the old PENDING_PAYABLE table contains records with PROCESS_ERROR set, replace the 'ERROR' value with timestamp of 0.)

bertllll commented 8 months ago

While now, when the checks to be done by the PaymentAdjuster are not yet in place, it is not a necessarily rare event because error stamp can occur with any time when the user’s wallet dries out from funds, I believe this is the kind of error that we can expect most of times, perhaps in the vast majority of situations and therefore this is being a genuine concern now. However, the PaymentAdjuster will work towards mitigating this stale-mate threat as it will never permit to go so far that payments with unrealistic parameters would be requested Fromm the blockchain service and therefore also no error from missing means for transaction or service fees could come to exist.

I think it’s much possible that the users now get some accounts blocked from their by-us-owed balances being paid. Which must inevitably leads to persistent bans from these touched Nodes. I think it’s a serious problem affecting us a lot. @kauri-hero

Solving this by either of the two ways (while both should be implemented eventually) is going to shift us to meet only so-considered corner case errors happening remarkably infrequently. This consists of, first, preventing these errors by the PaymentAdjuster, second, allowing the database stamps disappear eventually under well defined conditions and reranking these accounts back among those to be inspected with the upcoming scan for payables.