Repository navigation
Stop hourly fee re-checks for cross-chain setups that never saved a quote - #10
Merged
Merged
Conversation
…uote When quote setup fails before the deposit is persisted, the fee row stays 'reserved' and reconcile() can only fail with 'Quote needs review' before contacting the provider. The worker retried such rows hourly forever (564 failures on mainnet invoice 4f53e474 since 2026-10-24). The worker now selects them only once the invoice is confirmed, when reconcile resolves the direct-ZEC obligation as before. Rows are not modified and still surface as setup_review in payment operations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Sometimes cross-chain quote setup fails before the quote is saved: provider error, validation failure, or a persist failure. When that happens, the attempt is marked
NEEDS_REVIEWand its fee row staysreservedwith no deposit address. The buyer is never shown deposit instructions.reconcile()can't do anything with such a row. With no quote it can only resolve a confirmed invoice as direct. Otherwise it fails at"Quote needs review"before it contacts the provider. The fee worker still picked these rows up and backed off to a 1-hour cap, so it retried them forever. On mainnet, invoice4f53e474…(created 2026-10-24, expired) has 564 failed checks.Change
due_fee_checks(). It now picks up a non-terminal fee row only when its attempt has a saved quote (payload IS NOT NULL) or the invoice is confirmed.reserved, and their failure counts are left as they are.operations::issues()still reports these assetup_review, so/api/healthstaysdegradeduntil someone reviews them manually.resolve_directruns as before.Tests
unquoted_failed_setup_is_not_rechecked_until_invoice_confirms. It checks that:setup_review;cargo test --locked: 137 passed, 3 fixture-only tests ignored.scripts/check-dependency-exposure.pypasses, andcargo auditwith the current ignores passes.Not deployed. This does not resolve
4f53e474…, which still needs a decision after review.