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

An issue about excluding Failed Jobs from Balance Calculation #207

Open
Flouse opened this issue Aug 20, 2024 · 1 comment
Open

An issue about excluding Failed Jobs from Balance Calculation #207

Flouse opened this issue Aug 20, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Flouse
Copy link
Contributor

Flouse commented Aug 20, 2024

Currently, if a job in the queue has been retried a certain number of times, it will be marked as failed. In the getPendingInputCellsByTxid() and getPendingOutputCellsByTxid() methods, if the target job is marked as failed, an empty list [] will be returned. This means that if we're transferring some RGBPP assets and the BTC_TX gets stuck for a while, the job in the queue will be marked as failed and excluded from the balance calculation.

Discussion about Proposed Resolutions

  1. @ShookLyngs: Add an allowFailedJob: boolean = false parameter to the getPendingInputCellsByTxid and getPendingOutputCellsByTxid methods, allowing them to retrieve the input/output cells from the failed jobs.
    This will ensure that failed jobs are included in the balance calculation, even if they have been retried multiple times and marked as failed.

    Originally posted by @ShookLyngs in fix: amount calculation in the rgbpp address balance endpoint #206 (comment)

  2. @Flouse: When someone queries the balance of a BTC address that has failed jobs, the service will automatically retry or activate those failed jobs. This will ensure that the balance reflects all relevant transactions, including those that previously failed.
    This approach not only improves user experience by providing up-to-date balance information but also reduces the need for manual intervention to reactivate failed jobs.

References

@ahonn
Copy link
Collaborator

ahonn commented Aug 20, 2024

When someone queries the balance of a BTC address that has failed jobs, the service will automatically retry or activate those failed jobs. This will ensure that the balance reflects all relevant transactions, including those that previously failed.

What if this transaction cannot be completed? It might be retried numerous times. It could be necessary to impose some restrictions instead of allowing unlimited retries.

Additionally, I believe that the balance calculation should not depend on the job being retried.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants