Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Mint-health transitions are 5-min-poll driven with escalating backoff — repeated mint outages make recovery exceed any test budget

Aperta
#747 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Amperstrand ci sta già lavorando.

Dal 8/10/2026.

  • #777 di @Amperstrand — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go

Direzione di ricerca

Start with the failing tests/api/test_merchant_provider.py and trace how mint probe and swap results reach wallet state and discovery health; the issue does not identify the relevant implementation files. Reproduce a mint block/unblock and restart in the local virtual lab, checking whether probe success refreshes wallet state and resets per-mint backoff. Done means discovery transitions promptly between degraded and full and repeated recovery cycles complete within the test window.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Migrated from Amperstrand/tollgate-module-basic-go#87 as part of the fork retirement — OpenTollGate/tollgate-module-basic-go is the single source of truth; the fork issue carries the original discussion and any lab evidence. Retirement plan: see the tracking issue linked in the migration comment there.]

Evidence (local virtual lab, 2026-09-04, cdk-mintd 0.18.0 fakewallet)

Live probes during a failing tests/api/test_merchant_provider.py run:

  1. Wallet state vs prober disagree. After the mint work-dir is wiped and restarted (same mnemonic → same keysets), discovery served kind 21023 no-reachable-mints while:

    • proactive prober: mint probe: url=http://10.99.99.2:8383/v1/info status=200 ok=true (twice, 5 min apart)
    • curl http://10.99.99.2:8383/v1/info from the router: 200
    • tollgate status reported wallet_ok=true while discovery said degraded
      Only /etc/init.d/tollgate-wrt restart flipped discovery to kind 10021 (~10s). The wallet's cached mint state (wallet.db) is not re-validated on prober success.
  2. Health transitions ride the 300s proactive poll. iptables-blocking all mints does not flip discovery to degraded until the next probe cycle (up to 5 min); same for unblock→full. Test budgets of 180s expired before the first probe fired. (Worked around test-side: HEALTH_POLL_TIMEOUT 420, module timeout 900 — prta fix/local-lab-green 90bf9c6.)

  3. Recovery after repeated block/unblock cycles exceeds any test budget. In one file run: cycle 1 recovered well within 420s; cycles 2–4 did not recover within 420s (Service did not recover, swap-test stop reason test window ended, recovered=False). Escalating backoff on the mint URL after repeated failures is the likely mechanism; it does not reset on unblock.

Impact

  • Degraded/recovery tests are timing-flaky against any mint that restarts (mints DO restart — new deployments, CDK upgrades).
  • Discovery can serve no-reachable-mints while the mint is healthy, for up to the next probe cycle + wallet re-validation delay (currently: forever, absent a backend restart).

Suggested direction

  • Event-driven health transition: flip degraded/full immediately on swap/probe failure+recovery (probe success already detected per-cycle — propagate it to the wallet/discovery state).
  • Reset per-mint backoff when a probe or swap succeeds.
  • Re-validate cached wallet mint state when the prober reports ok=true but the wallet considers the mint down.
Lingua principale
Go
Stelle
12
Fork
14
Merge medio
1g 5h
PR unite (30g)
227

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenTollGate/tollgate-module-basic-go

Tutte le issue di OpenTollGate/tollgate-module-basic-go

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.