You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
merchant: fee precheck stalls minutes on a wedged mint — blocks the payment lane before any timeout applies #525
Found integration-testing #511 (frozen-mint scenario in the cloud-lab).
What
A mint that is wedged or partitioned (accepts nothing / never answers — docker pause reproduces it) stalls the fee precheck for ~5+ minutes per payment, and the request goroutine never reaches anything with a deadline:
Goroutine dumps (SIGQUIT, two payments, 3–4 minutes in flight, both parked at the same call): captured in the #511 verification run.
Why it's minutes, not seconds
The wallet client's per-call timeout is 30 s (client.go:34) but getWithRetry retries up to maxRetries = 4 with exponential backoff — ~5 attempts ≈ 150 s+ per endpoint — and GetMintActiveKeyset chains a second endpoint on total failure (getMintActiveKeysetFallback), doubling the worst case before the error ever returns.
Consequences
The customer's request hangs for minutes; the splash page gives up. The token is not burned (verified: after thawing, the same token paid in 0.1 s), but the lane is frozen for that mint and each attempt stacks a stuck goroutine.
The precheck's intended "fall through and let Receive classify the error" path only works once the calls return — against a wedge they effectively don't.
Bound the precheck: run SwapFeeSats under a short context deadline (a few seconds) and reuse the existing error fall-through — fees are an optimization check, not a gate.
Avoid the network entirely: InputFeePpk for the active keyset is already in the wallet's local DB (bolt, kept warm by loadWalletMints); mintKeysetFees could read the cached keyset instead of GetMintActiveKeyset's fetch. This also makes the precheck offline-capable.
Separate matter, upstream: keyset fetches probably don't want the full 5-attempt retry ladder — they're on the hot payment path.
(2) looks strictly better: no deadline tuning, no extra failure mode.
Activity
fix(tollwallet): bound checkstate against wedged mints
fix(tollwallet): bound checkstate against wedged mints
fix(tollwallet): bound checkstate against wedged mints
fix(merchant): bound the fee precheck against wedged mints (#525)
fix(tollwallet): bound checkstate against wedged mints
fix(merchant): bound the fee precheck against wedged mints (#525)
fix(tollwallet): bound checkstate against wedged mints
fix(merchant): bound the fee precheck against wedged mints (#525)
fix(merchant): bound the fee precheck against wedged mints (#525) (#533)
620: merge main forward — resolve the CHANGELOG conflict (keep both s…