Open a site without its DNS name: site reference v0, discovery hint, open-site resolver (#7) #12
No reviewers
Labels
No labels
feature request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rhelwig/DecentSite!12
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/no-dns-test-site"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First increment for #7: open a published site by Dash identity + contract + site key, without looking up its hostname. No browser extension yet; this is the groundwork it will reuse. No Platform writes, no Dash spend.
What's in it
packages/core/src/site-ref.ts: provisional site reference v0 (decentsite:?v=0&net=…&contract=…&layout=…&owner=…&site=…[&release=…][&path=…][&name=…][&host=…], JSON also accepted).nameandhostare hints only; lookup uses network/contract/owner/site(/release).GET /.well-known/decentsite.jsondiscovery hint (CORS-open, 60 s cache) andsiteReferencein/health. Built from Stub config only, never from the requestHostheader. OptionalDECENT_SITE_OWNER_NAME.scripts/open-site.mjs(npm run open-site -- …):resolve [--verify](Platform read + SHA-256 check of every blob),serve(local Stub for a reference on 127.0.0.1),discover <https-url>,ref. Read-only: no keys, no writes, no fees.scripts/no-dns-test-site.mts: dry-runtest-ronhelwig-comsite (host hinttest.ronhelwig.com) in a separate local data dir with the local backend. It refuses to use the real Admin data dir.docs/NO-DNS-SITE-REFERENCES.md: design, resolution steps, gaps, a mainnet publish plan that needs approval, and LibreWolf/Brave/Chromium/Firefox/Safari notes.Verified
npm test: 180/180 pass (4 new intests/site-ref.test.ts); typecheck is clean.release_5424b47e…, 18/18 blobs hash-verified in about 10 s, andserverendered it on 127.0.0.1:8792 with Recent posts and Markdown.test.ronhelwig.comhas no DNS record.Gaps found (in the doc)
publicBaseUrl: null, so there is no owner-signed hostname claim yet. Proposal: put ahostnameslist in the site record JSON (no schema change).ipfs.ronhelwig.com, which goes down with the domain if it's blocked. Add a source on an unrelated domain.web+decentsite:(browsers only allowweb+/ext+custom schemes).serveand DPNS-name lookup are still to do.Deploying this Stub change to the VPS is not part of this PR.
Second increment pushed (
3759e10), following Ron's direction for the test site.Test site is now small, original and self-explaining (not a copy of ronhelwig.com, so it can't be dismissed as a passthrough):
acceptance/no-dns-test-site/: three short Markdown templates, "No Address Needed": home (what this is, names DecentSite, links this repo),/verify/"Check it yourself", and one post/posts/why-no-dns/(a name is a label; extension plans for LibreWolf + Brave first).--markerto publish that exact text.rhelwig7.dash, contractHm7T6…, site keytest-ronhelwig-com, host hinttest.ronhelwig.com, no DNS), so it can be published without edits.Manual verification page walks a reader through, with only
dig/curl/sha256sum(optionalipfs) and the independent Platform Explorer:digshows no DNS record; 2. explorersitedocument bysiteKey→ owner +activeReleaseId; 3.releasedocument → the full list of version ids; 4.contentVersion→bodyStorageId(CID) +bodyHash(SHA-256); 5. fetch from IPFS andsha256sum=bodyHash; 6. forbafkrei…CIDs,ipfs cid format -b base16showsf01551220<sha256>, so the CID itself is the signed hash; 7. compare with the page / View Markdown (the.mdroute is byte-identical to the blob). Plus what this proves and doesn't. All steps checked by hand against ronhelwig.com's live records.Tooling
scripts/no-dns-test-site.mts: fills the templates, separate data dir, local backend only;--fresh,--marker,--export <dir>(filled Markdown for pasting into Admin); drops stale dry-run pages.scripts/open-site.mjs proof '<ref>': read-only evidence chain (site → release → per-blob CID + SHA-256, CID-embedded hash check, explorer/gateway URLs, fetch + hash). ronhelwig.com: 18/18 blobs pass; 17 raw CIDs carry the signed hash, 1 chunked JPEG checked by fetch.docs/NO-DNS-SITE-REFERENCES.mdupdated (test-site rules, manual steps, publish plan).New gap found (gap 0):
ipfs.ioanddweb.linknow return a "switching to a service worker gateway" notice page (HTTP 200) instead of file bytes. The hash check rejects it correctly, but our default fallback gateway (https://ipfs.io) is effectively dead. Options listed in the doc (trustless raw-block fetch, another default, pinning service, local node); needs a decision.Verified: dry run builds and serves 3 pages on 127.0.0.1:8793,
test.ronhelwig.comhas no DNS,npm test180/180.Not done (waits for Ron): mainnet publish of
test-ronhelwig-com, VPS Stub update, merge. No Platform writes, no IPFS uploads, no Dash spent.Third increment pushed (
4b46a8d): verify content without the owner's gateway.ipfs.io/dweb.linkretired programmatic service on 2026-09-21 (429 + "switching to a service worker gateway");trustless-gateway.linktimed out / 525. Working on 2026-10-10:https://ipfs.filebase.io(fast) andhttps://gateway.pinata.cloud(slower, rate-limited) — both plain,?format=rawand?format=car.packages/storage/src/trustless.ts(no deps): raw CIDs fetched as?format=rawblocks and checked against the CID; chunked files fetched as?format=car, every block checked, file reassembled locally. Plain file only as fallback (DECENT_IPFS_TRUSTLESS=prefer|only|off). Wrong bytes / notice pages move on to the next gateway instead of failing.DEFAULT_PUBLIC_GATEWAYS) are now Filebase + Pinata instead of ipfs.io; Stub setup, example config, DEPLOY, SPECS reader algorithm and Auth's Stub-config/review defaults updated (Auth ships with the next APK; protocol tests pass).open-site.mjs:--gateways,--local-ipfs,--no-preferred;proofshowsfetchedFromand anindependentCheckcurl per blob. ronhelwig.com verified 18/18 with--no-preferred(17 raw blocks + the 2.5 MB JPEG via CAR, all from Filebase, never touching ipfs.ronhelwig.com).ipfs.ronhelwig.com+ipfs.filebase.io; "Check it yourself" uses the independent gateway.no-dns-test-site.mts --adminadds it to the real Admin as drafts (backs up platform.json; no upload/publish).Remaining (not code): availability still depends on some node providing the CIDs (today Ron's Kubo) — pin with a second provider.
npm test186/186, typecheck clean.