NIP-05 verification via Namecoin (.bit)#2349
Conversation
|
For anyone watching from Nostr rather than GitHub, this PR has been cross-posted as a NIP-23 long-form note (same
Normative review should still happen here on GitHub — the Nostr note is a discoverability surface, not a parallel review track. |
Specifies how Nostr clients verify, and publishers publish, a NIP-05 identifier whose right-hand side is anchored in the Namecoin blockchain rather than DNS + HTTPS. Complement to NIP-05, not a replacement. Adds no new top-level Namecoin record keys; all Nostr-relevant data lives inside a new 'nostr' item in the existing ifa-0001 Domain Name Object, which existing ifa-0001 consumers ignore by spec. Companion drafts (relay discovery, TLSA pinning, service attestations) are out of scope for this PR and tracked separately in https://github.com/mstrofnone/nips per the form-preference question in nostr-protocol#2330. Eight wire-compatible reference implementations across six platforms have shipped this NIP against the live Namecoin chain with byte-for-byte agreement on the same on-chain records (Amethyst, Nostur, nostr-tools, dart-nostr, Jumble, noStrudel, strfry sidecar, nostrlib drop-in).
…mpls Refreshes the draft with three concrete implementation notes surfaced by the spread of shipped reader-side implementations and the first shipped signer-side enforcement: - Opcode handling (new subsection under Wire format): scriptPubKey parsers MUST match both OP_NAME_FIRSTUPDATE (0x52) and OP_NAME_UPDATE (0x53). FIRSTUPDATE carries an extra 8-byte rand salt push between the name and the value. Several early implementations matched only 0x53 and silently returned no value for never-renewed names; this section documents the requirement and the stack shape. - Bidirectional JSON-RPC (new subsection under Lookup transport): ElectrumX is bidirectional. The server is permitted to initiate its own RPC calls (server.banner, blockchain.headers.subscribe, blockchain.relayfee, blockchain.estimatefee) interleaved with the client's outstanding responses. Clients MUST id-match incoming frames against outstanding requests; a naive 'first frame back is my response' handler silently returns null. - Signer-side enforcement (new section): documents the pre-sign verification pattern shipped in Aegis as an OPTIONAL complement to reader-side verification, with explicit fail-open guidance on network errors. - Reference implementations: replaces the flat list with three grouped tables (reader-side / signer-side / server-side) spanning six runtimes (Kotlin, Swift, Dart, TypeScript, vanilla JavaScript, Haskell) and 16 PRs / repos. The reader-side table now lists nos (Swift), 0xchat / nostrmo / dart-nostr (Dart), nostter / lumilumi / nosotros / ants (TypeScript), alphaama (vanilla JS), and futr (Haskell) alongside the existing Amethyst / Nostur / nostr-tools / noStrudel / Jumble entries. Signer-side adds Aegis. The live reference deployment paragraph now explicitly calls out mstrofnone@testls.bit as the canonical end-to-end FIRSTUPDATE test target. No normative changes to identifier grammar, record container, import, subdomain walking, expiry, caching, race-condition guidance, Tor, or publishing.
8a2cb13 to
f5d0a26
Compare
|
Refreshed the draft with three new sections informed by the spread of shipped implementations and a few wire-format bugs that surfaced during cross-implementation testing. New: §"Opcode handling" (under Wire format)Resolvers that parse the scriptPubKey directly must match both name-operation opcodes:
FIRSTUPDATE carries an extra 8-byte New: §"Bidirectional JSON-RPC" (under Lookup transport)ElectrumX is a bidirectional JSON-RPC transport. The server is permitted to initiate its own method calls ( This is independent of transport (TCP+TLS, WebSocket-plaintext, WebSocket-TLS) and has been observed in the wild against multiple public ElectrumX-NMC servers. New: §"Signer-side enforcement (optional)"Documents the pre-sign verification pattern shipped in Aegis as an optional complement to reader-side verification. The signer checks a Refreshed: §"Reference implementations"The flat list is replaced with three grouped tables: reader-side, signer-side, server-side. The reader-side table now spans six runtimes:
Signer-side adds Aegis.
No normative changesIdentifier grammar, record container, Diff: +148 / −24 lines, head |
NIP-05 verification via Namecoin (
.bit)Adds a new NIP specifying how clients verify, and publishers publish, a
NIP-05
identifier whose right-hand side is anchored in the Namecoin blockchain
rather than DNS + HTTPS. Strict complement to NIP-05; both can coexist
on the same identity.
This is the narrowest possible slice of the broader RFC track in
#2330 — NIP-05
verification only. Relay discovery via Namecoin, TLSA pinning of
.bitrelay WebSockets, and service-attestation kinds are deliberately
out of scope and tracked separately (see §"Out of scope" at the
bottom of the spec).
Why this NIP
.bitis a top-level name that can't be taken down by a registrar, aDNS root authority, or a public CA compromise. The wire format inside
the existing ifa-0001 Domain Name Object adds zero new top-level
Namecoin record keys — everything lives inside a new
nostrobjectthat ifa-0001 consumers ignore. Adoption is therefore drop-in for any
client that already implements NIP-05: same
kind:0field, samelocal-part / pubkey shape; only the right-hand-side resolver changes.
Implementation evidence
Eight wire-compatible reference implementations across six platforms
have shipped this NIP against the live Namecoin chain, with
byte-for-byte agreement on the same on-chain records:
nostron pub.dev)wss://ElectrumX)nostrlib)Live reference deployment at
testls.bit/relay.testls.bitisexercised by the test suites of every implementation above.
Scope discipline
Per the explicit "form preference" question in the
RFC issue, this
PR follows the one-NIP-per-PR option, starting with NIP-05 verification
because it has the deepest deployment evidence. The N0 ("Namecoin
record container") draft has been folded directly into this document
as a §"Namecoin record container" section, since a standalone
container NIP isn't useful without a consuming NIP.
The companion drafts (relay discovery / TLSA / service attestations)
live at https://github.com/mstrofnone/nips and are intentionally not
proposed here. Happy to open separate PRs for each, after this one
lands, if maintainers want to upstream them.
Notes for review
nostrkey inside the ifa-0001 Domain Name Object is currentlyunallocated; ifa-0001 §"Item Suppression Rules" requires existing
consumers to ignore unknown keys, so there is no upgrade hazard for
the Namecoin ecosystem either.
XX.mdslot;happy to rename to whatever the maintainer prefers.
CC: none — opening cold so the broadest set of reviewers can chime in.
For Nostr-side discoverability, this PR is also cross-posted as a NIP-23
long-form note (
kind:30023):npub1gvv9ahktvavf9qjtrgm62le7gplmmchd5usp5wpfhr85hf79kncqj8xchs(mstrofnone)da7c9e2399391d8062b98d29999c7b183797328154f8128cef0388021665888bd-tag:nips-namecoin-nip05-pr-2349The note links back to the original track long-form (#2330 announce
note)
for the broader Namecoin-track context and routes normative review back
to this PR thread, not the Nostr replies.
Currently propagated to:
wss://nostr.wine · wss://relay.damus.io · wss://nos.lol · wss://relay.primal.net
· wss://nostr.mom · wss://relay.nostr.net · wss://nostr-pub.wellorder.net
· wss://offchain.pub · wss://relay.testls.bit.
NIP-22 replies / Nostr-side comments are welcome and will be folded back
into the discussion here.