diff options
| author | Adam Soltys <[email protected]> | 2026-09-09 23:06:35 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-09-09 23:06:35 -0700 |
| commit | 839ab937afbd0c68d1a4366e10145274b6f62d31 (patch) | |
| tree | 5802fb44898db984840a7eee238a4ecc5007dcd2 /blossom/compose-blossom.yml | |
| parent | 95cd3fa81097e288e4920bb5029cfd23f7cae98f (diff) | |
| download | coinosv3-839ab937afbd0c68d1a4366e10145274b6f62d31.tar.gz coinosv3-839ab937afbd0c68d1a4366e10145274b6f62d31.zip | |
Sync: oversized domains ride Blossom blobs — plus a coinos-hosted server.
A wallet with deep Ark coins had a 633KB ark sync domain against the relay's
40KB budget: the publish silently failed forever, the slot stayed stale,
and every boot retried. Relays can't carry it (64KB event cap) and neither
can NIP-44 (64KB plaintext), so a domain over budget now goes to Blossom
(nostr blob storage, BUD-01/02/06/11/12): sealed into an envelope
("CSB1" + xchacha20poly1305 under an HKDF of the wallet's NIP-44 self-key),
uploaded to the configured servers, and the kind-30078 event carries only
{ blob: { sha256, size, servers } }. Readers resolve pointers from their own
outbox copy first, else from the pointer's servers plus the configured
list, hash-verified. Small domains are unchanged.
The outbox uploads before it publishes (upload/delete authorizations are
kind-24242 events signed at enqueue time, so delivery after logout still
holds no key), keeps a local copy for recovery, and deletes superseded
blobs once the replacement is acknowledged.
Servers: Settings → Nostr → Sync storage (any Blossom server; a typed list
is kept), else the user's BUD-03 list (kind 10063) with the coinos server
as mirror, else blossom.coinos.io.
blossom/server.js is that default: a Bun Blossom server that stores ONLY
these envelopes (magic check → 415 for anything else), serves every blob as
an octet-stream attachment with nosniff, requires signed auth for
upload/list/delete, and enforces per-blob size, per-key quota (oldest
evicted), rate limits, a disk cap and unused-blob expiry — it cannot serve
as a file host. tools/sync-blob-test.js spawns it and covers the policy,
the outbox flow and a fresh device resolving a pointer.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Nw1Dijik1tLVKRM1WkU7xE
Diffstat (limited to 'blossom/compose-blossom.yml')
| -rw-r--r-- | blossom/compose-blossom.yml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/blossom/compose-blossom.yml b/blossom/compose-blossom.yml new file mode 100644 index 0000000..28acbad --- /dev/null +++ b/blossom/compose-blossom.yml @@ -0,0 +1,23 @@ +# blossom.coinos.io — Blossom blob server for oversized wallet-sync domains. +# Stores nothing but the wallet's encrypted sync envelopes (see server.js). +# Lives beside the names registrar: ~/arkswap is a coinosv3 checkout on cs. +services: + blossom: + image: oven/bun:1 + container_name: blossom + working_dir: /app + command: bun blossom/server.js + environment: + BLOSSOM_DATA: /data + BLOSSOM_PORT: "8796" + BLOSSOM_HOST: blossom.coinos.io + volumes: + - /home/adam/arkswap:/app + - /home/adam/arkswap/data-blossom:/data + ports: + - 127.0.0.1:8796:8796 + networks: [net] + restart: unless-stopped +networks: + net: + external: true |
