Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

ops: the mint replay window is 60 s and memory-only — CDK_MINTD_CACHE_TTL is never set, and any mint restart wipes the window mid-TTL

Open
#867 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
docker, go, redis

Research direction

Read /root/src/nut19-restore-research/nut19-restore-research.md §4 and inspect Dockerfile.mint to confirm the current cdk-mintd version and build features. Trace how lab and production mint deployments set environment variables, then check whether their configuration supports the requested TTL and Redis backend. Done means the TTL is configured and restart persistence is addressed where required, with the /v1/info nuts.19.ttl value matching the chosen setting.

Written by the indexing model from the issue text.

Description

Finding. Every lab/deployment mint so far runs cdk-mintd's NUT-19 response cache at
defaults: CDK_MINTD_CACHE_BACKEND=memory, TTL 60 s (cdk-axum DEFAULT_TTL_SECS).
Two consequences the crash lane lived with:

  1. The replay window is only as long as the TTL — scenario (e): wallet down 95 s ⇒
    400 {"code":11001,...}, value stuck-but-journaled pending the /restore follow-up.
  2. Any mint restart wipes the window instantly, mid-TTL — verified live 2026-10-11:
    a replay was refused 11001 seconds after a docker restart, well inside the 60 s
    window (in-memory cache dies with the process). The effective window is
    min(TTL, mint uptime), and no TTL value fixes the uptime half.

Knobs (source-verified, cdk v0.17.6 tag + cdk-0.18.1 tree; details in
/root/src/nut19-restore-research/nut19-restore-research.md §4):

  • 0.17.6 (current pin): env CDK_MINTD_CACHE_TTL=<secs> (or legacy
    CDK_MINTD_CACHE_SECONDS) — honored at every startup. Backend:
    CDK_MINTD_CACHE_BACKEND=memory|redis + CDK_MINTD_CACHE_REDIS_URL — redis needs
    the compile feature; our Dockerfile.mint builds --features fakewallet,sqlite
    only
    , so redis currently isn't even buildable in the lab image.
  • 0.18.x: env no longer applied at normal startup (DB-authoritative config) — set
    [info.http_cache] ttl via cdk-mintd config apply.
  • Observability: /v1/info advertises nuts.19.ttl (live-observed {"ttl":60,...}).
  • Reference point: nutshell ships NUT-19 off by default; when enabled it is
    redis-backed with a default TTL of 1 week — cdk's 60 s memory window is the
    conservative outlier, not the norm.

Ask (ranked; none of this needs wallet code):

  1. Set CDK_MINTD_CACHE_TTL=604800 on lab + production mints (0.17.6 env) — cheap,
    buys a week of replay window; only prior 200s are ever replayed (errors are never
    cached, signatures deterministic ⇒ no fund-safety cost). Memory backend caps ~10k
    entries — fine at our volumes.
  2. Add redis to Dockerfile.mint features and point deployments at a redis if the
    replay window must survive mint restarts/replicas — this is precisely the half TTL
    cannot cover.
  3. Monitoring: alert on not recoverable this pass (emitted exactly once per boot per
    stuck OpID — clean signal, lane-verified); reconcile the bbolt pending_swaps bucket
    against wallet balance; watch /v1/info nuts.19.ttl for config regressions.
  4. Note this hardens the window only — restart + TTL expiry are jointly covered solely
    by the NUT-09 /restore fallback tracked in the sibling issue.
Dominant language
Go
Stars
12
Forks
14
Avg merge
1d 5h
Merged PRs (30d)
239

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenTollGate/tollgate-module-basic-go

All issues in OpenTollGate/tollgate-module-basic-go

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.