fix(mint): resolve pending proofs hang from internal settlement failure#967
Open
a1denvalu3 wants to merge 9 commits into
Open
fix(mint): resolve pending proofs hang from internal settlement failure#967a1denvalu3 wants to merge 9 commits into
a1denvalu3 wants to merge 9 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #967 +/- ##
==========================================
+ Coverage 75.14% 75.16% +0.01%
==========================================
Files 99 99
Lines 11714 11725 +11
==========================================
+ Hits 8803 8813 +10
- Misses 2911 2912 +1 ☔ View full report in Codecov by Sentry. |
bfa2645 to
b192e2c
Compare
…ages, and failed internal settlements # Conflicts: # tests/mint/test_mint_conditions.py
… path fallback in SIG_ALL # Conflicts: # cashu/mint/conditions.py
b192e2c to
288ed1d
Compare
Reverts the background reset logic for stuck pending internal melt quotes in `get_melt_quote`. As noted by the maintainer, it is the mint operator's prerogative to handle stuck pending quotes, and automating this introduces a race condition vulnerability.
…preimage is valid
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.
Summary
Resolves an issue where proofs could become permanently locked in a
PENDINGstate during a failed internal settlement.This fixes two connected bugs:
try/exceptblock inmelt()aroundmelt_mint_settle_internallyto ensure pending proofs and quotes are reset toUNPAIDif the internal settlement throws an error (e.g., quote already issued).get_melt_quote()so that periodic cleanup correctly handles stuck internal melt quotes by un-setting their pending proofs if the corresponding mint quote is no longer unpaid, instead of unconditionally ignoring them.