deviant/wiki
Local Dev 74a15d592e feat(bcmr): Sia-backed primary URL — ADR-0057 step 2 fully shipped
Server-side mirror hook on bns-gateway landed, so the "primary vs mirror"
split from the previous commit collapses: the primary URL is now itself
Sia-backed via the BNS gateway. One URL in the OP_RETURN, zero HTTPS
single-point-of-failure, every genesis's metadata survives a silentmode.st
outage because any bns-gateway (Theseus, Ariadne, self-hosted) resolves
the same bytes from Sia and the on-chain SHA-256 confirms integrity.

Server (deployed to silentmode:/opt/bns-gateway/public-gateway.mjs,
service restarted + active):
- NEW /api/bcmr-upload/<network>/<categoryId>.json handler modelled on
  the existing /api/icon-upload sibling. POST only, 32 KB cap, strict
  path validation (chipnet|mainnet + 64 lowercase hex), parse-and-
  discard JSON validity check, PUT to Sia at
  bns/deviant.x/bcmr/<network>/<categoryId>.json.
- Returns { url, sha256, bytes, path }. No auth: on-chain sha256 is the
  trust root, so a wrong-hash upload is simply ignored by every reader.
- Backup written: public-gateway.mjs.bak-bcmr-<timestamp>.

End-to-end verified (browser → gateway → Sia → gateway → browser):
- POST 200, Sia PUT success, response carries the public URL
- GET from the public URL returns 200, 483 bytes
- Client SHA-256 == response.sha256 == fetched-bytes SHA-256
- Negative paths: wrong network/short/upper-case categoryId → 400,
  GET → 405, invalid JSON → 400 with parser detail

Client (design/potidaea/src/bcmr.ts + genesis.ts):
- bcmrPublicUrl now returns
  https://navigate.st/bns/deviant.x/bcmr/<network>/<categoryId>.json —
  the Sia-backed primary. Replaces the never-working silentmode.st/bcmr
  URL that was 404'ing in production.
- bcmrSiaUrl kept as an alias of bcmrPublicUrl so step 2's earlier
  opt-in callers still compile.
- Genesis emitter: dropped the VITE_BCMR_SIA_MIRROR flag — the primary
  is Sia-backed now, no gating needed. Encoder stays variadic so future
  mirrors (IPFS pin, alternate gateway) can be added without API churn.

ADR-0057 updated: step 2 marked SHIPPED with the gateway + Sia +
end-to-end verification notes.

Potidaea tsc clean.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-10-22 22:21:55 +03:00
..
asm docs(asm): experimental MBA-adjacent covenants catalogue 2026-10-09 00:24:44 +02:00
cross-chain docs(cross-chain): handoff — snapshot 0271 + DGB HTLC primitives landed 2026-09-16 01:25:41 +02:00
fiatm style(docs): migrate sat/sats → bit/bits across wiki + Parameters 2026-08-09 01:09:06 +02:00
games-tote style(docs): migrate sat/sats → bit/bits across wiki + Parameters 2026-08-09 01:09:06 +02:00
governance style(docs): migrate sat/sats → bit/bits across wiki + Parameters 2026-08-09 01:09:06 +02:00
infra feat(mainnet-infra): oracle client + Katalogos deploy script + design doc 2026-10-09 00:21:13 +02:00
integrations style(docs): migrate sat/sats → bit/bits across wiki + Parameters 2026-08-09 01:09:06 +02:00
onramp docs(wiki): restructure into domain branches with a router + per-domain indexes 2026-07-07 00:50:09 +02:00
platform style(docs): migrate sat/sats → bit/bits across wiki + Parameters 2026-08-09 01:09:06 +02:00
wallet style(docs): migrate sat/sats → bit/bits across wiki + Parameters 2026-08-09 01:09:06 +02:00
architecture.md style(docs): migrate sat/sats → bit/bits across wiki + Parameters 2026-08-09 01:09:06 +02:00
asset-landscape.md style(docs): migrate sat/sats → bit/bits across wiki + Parameters 2026-08-09 01:09:06 +02:00
decisions.md feat(bcmr): Sia-backed primary URL — ADR-0057 step 2 fully shipped 2026-10-22 22:21:55 +03:00
glossary.md docs: enforce project-wide "bits" (not "sats") in copy 2026-08-30 18:45:28 +02:00
index.md docs(wiki): restructure into domain branches with a router + per-domain indexes 2026-07-07 00:50:09 +02:00