Skip to content

fix(nip05): cool down unreachable domains without invalidating their names - #17

Open
flox1an wants to merge 2 commits into
ContextVM:masterfrom
flox1an:upstream/nip05-domain-cooldown
Open

flox1an wants to merge 2 commits into
ContextVM:masterfrom
flox1an:upstream/nip05-domain-cooldown

Conversation

@flox1an

@flox1an flox1an commented Oct 12, 2026 •

Copy link
Copy Markdown

Why

A temporary NIP-05 server outage does not invalidate a user's identifier. Caching it as a negative answer can reject valid users long after recovery.

Change

Persist domain cooldowns for network/TLS errors, timeouts, 429 and 5xx. Include connection failures while reading the response body. Keep definitive negatives, including malformed JSON, cached normally.

Verification

  • Lint/build pass; full suite: 211 pass, 5 skip, 0 fail.
  • Regression verifies recovery without a poisoned identifier cache.
  • Real truncated HTTP responses exercise both capability and refresh paths; malformed JSON remains a negative answer.

Bun 1.3.14/macOS; temporary test SERVER_SECRET_KEY. Existing manager and duplicate-DuckDB type errors remain. Independent PR; does not address separate NIP-05 plugin errors.

Related: #15, #16, #18, #19. All branches are independent; combined suite: 221 pass, 5 skip, 0 fail.

Florian added 2 commits October 12, 2026 09:29
…as invalid

Implement the documented NIP05_DOMAIN_COOLDOWN_SECONDS. The resolver now
distinguishes a definitive negative answer (unknown name, non-retryable
HTTP status, malformed document) from a transport failure (network, TLS,
timeout, 429, 5xx). Transport failures put the domain on hold in the
persistent NIP-05 cache store, and the refresh stage skips the remaining
names of a domain on hold instead of waiting for each lookup to time out.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant