docs(quartz/store): note the NIP-01 tiebreaker, NIP-09 created_at window, and author-check on deletion in both store READMEs

https://claude.ai/code/session_01X163Nr31vGkvAXoJ3JgMov
This commit is contained in:
Claude
2026-04-25 14:30:59 +00:00
parent 819322bbf9
commit 75bcd77914
2 changed files with 7 additions and 4 deletions
@@ -14,11 +14,13 @@ consistency can be sacrificed, but a database that will never crash and never go
- Forces unique constraint by kind, pubkey
- Old versions are removed when newer versions arrive.
- Old versions are blocked if newer versions exist.
- Same `created_at`: NIP-01 lexical-id tiebreaker (lowest id wins).
- **Addressable Events**:
- Forces unique constraint by kind, pubkey, d-tag
- Old versions are removed when newer versions arrive.
- Old versions are blocked if newer versions exist.
- Same `created_at`: NIP-01 lexical-id tiebreaker (lowest id wins).
- **Ephemeral Events**
- Ephemeral events never stored.
@@ -29,8 +31,9 @@ consistency can be sacrificed, but a database that will never crash and never go
- **NIP-09 Deletion Events**
- Deletes by event id
- Deletes by address until the `created_at`
- Deletes by address up to and including the deletion's `created_at` (newer versions are kept).
- Blocks deleted events from being re-inserted.
- Only the original author's deletions take effect; cross-author kind-5s are stored but inert.
- GiftWraps are deleted by p-tag
- **NIP-62 Right to Vanish**
@@ -35,10 +35,10 @@ Everything documented in [`../sqlite/README.md`](../sqlite/README.md):
| SQLite feature | This store |
|---|---|
| Insert + retrieve by Nostr filter | ✓ |
| Replaceable events (kinds 0, 3, 10000-19999) — newer wins, older blocked | ✓ via `replaceable/<kind>/<pubkey>.json` slot |
| Addressable events (kinds 30000-39999) — `(kind,pubkey,d)` uniqueness | ✓ via `addressable/<kind>/<pubkey>/<sha256(d)>.json` slot |
| Replaceable events (kinds 0, 3, 10000-19999) — newer wins, older blocked, NIP-01 lexical-id tiebreaker on equal `created_at` | ✓ via `replaceable/<kind>/<pubkey>.json` slot |
| Addressable events (kinds 30000-39999) — `(kind,pubkey,d)` uniqueness, same NIP-01 tiebreaker | ✓ via `addressable/<kind>/<pubkey>/<sha256(d)>.json` slot |
| Ephemeral events never stored | ✓ rejected pre-write |
| NIP-09 deletions — by id, by address, gift-wrap by `p`-tag, blocks re-insert | ✓ via `tombstones/id/` and `tombstones/addr/` (each tombstone is a hardlink to the kind-5 event) |
| NIP-09 deletions — by id, by address (up to deletion's `created_at`), gift-wrap by `p`-tag, only the original author's deletions take effect | ✓ via `tombstones/id/` and `tombstones/addr/` (each tombstone is a hardlink to the kind-5 event) |
| NIP-40 expirations — reject expired-on-insert, periodic sweep | ✓ via `idx/expires_at/` index + `deleteExpiredEvents()` |
| NIP-45 counts | ✓ same planner, just count results |
| NIP-50 full-text search — content tokenisation, AND of tokens | ✓ via `idx/fts/<token>/` |