โ† All docs  ยท  Home

ADR 0002 โ€” Content-addressed dedup id via RFC 8785 JCS

Context

The same annotation will arrive at the collection server from multiple feedback servers, be re-POSTed by retrying clients, and be reconciled by the advanced client's local store. We need a stable, content-derived identifier so duplicates collapse to one row and idempotent writes are free. Nostr's NIP-01 solves the same problem with sha256 of a serialized event, but its own issue #354 flags that "JSON itself does not specify a canonical way to serialize strings and numbers" โ€” the scheme is ambiguous.

Decision

dedup_id = lowercase_hex( SHA-256( JCS( annotation \ {id, signature} ) ) )

The same canonical bytes are the input to both the dedup id and the detached ES256 signature, guaranteeing a verifier hashes exactly what the signer signed.

Why not alternatives

Consequences