clone

nostr relays on demand at <name>.bind.ws: claim one with your key, pay in zaps past the free allowance

docs: data and names

Dami committed 16bedb8
commit
16bedb8f15fd7ec333ef0cd995e2f148d0fdb0ec
parent
ec85c31aed913e254bad672c10a309ea00c8fea8
author
Dami <dami.etoile@gmail.com>
1 file changed, +71 -0
Adocs/04-data-and-names.md71++++++++++++++++++++++++++++++
A docs/04-data-and-names.md +71 -0
@@ -0,0 +1,71 @@
1+---2+title: Data and names3+audience: user4+---5+6+# Data and names7+8+What your relay holds, how it moves and how a name can do one job.9+10+## What is stored11+12+The Data tab shows bytes by kind, the files people uploaded and a keep-for rule per kind. Kinds the relay depends on, such as profiles, contact lists, relay lists, zap receipts and the roster, are never expired or purged. The controls are in [Relay configuration](01-relay-configuration.md#data).13+14+## Jobs15+16+A job is work the relay does on its own, one small round at a time, so it keeps going while the relay sleeps between rounds. The **Jobs** table on the Data tab lists each job with its relays, filter, schedule and last result, with run-now and remove. A job that fails three rounds in a row stops and says why.17+18+A job runs once, or every hour, six hours or day. Up to five standing jobs and 20 jobs in all per relay. Your bans and kind rules apply to what arrives. Your write rule does not: you asked for these events.19+20+**Pull** copies what another relay has and yours lacks, by sync (NIP-77). Run it again and only new events come over. Files come along when the other relay is on bind.ws and the pull has no filter. With an interval, a pull is a standing mirror that keeps your name in step with the other relay. The other relay has to let anyone read.21+22+**Fetch my history** pulls your own events from every relay in your relay list, if a client has published that list here. Or give it relays to fetch from, separated by commas.23+24+**Rebroadcast** sends what your relay holds to other relays. Choose kinds and a window in days, or leave both blank for everything. As a standing job it forwards only what arrived since the last run. A target that refuses five events in a row is left alone for that round. Events that only their author may publish are never sent, and a members-only relay never sends private messages.25+26+## Dumps27+28+Under **Dumps**, choose daily or weekly and how many to keep, seven by default. The relay writes every event as one JSONL file and keeps the newest few. **Dump now** writes one on the spot. Each file lists its event count and size, with download and delete. Downloading takes your signature; the files are never a public link.29+30+## Presets and one name per job31+32+Names are cheap, so a relay does not have to do everything. On the Rules tab, **Presets** sets writes, reads, the directory, the kind rules and the keep-for rules in one click. Limits, identity, people and bans stay. Your own profile and lists always land, whatever the kind rules say.33+34+| Preset | Writes | Reads | Keeps |35+|---|---|---|---|36+| default | anyone | anyone | every kind, forever |37+| outbox | only you | anyone | public notes and articles, forever; private kinds refused |38+| inbox | anyone | anyone | notes, replies, reactions, comments, reports and zaps, 90 days |39+| private | only you | members | every kind, forever; directory hidden |40+| chat | members | members | private messages and the group's chat, forever; directory hidden |41+| media | members upload files | anyone | profiles and Blossom server lists only |42+| search | only you | anyone | a copy of another relay's searchable kinds, refreshed every six hours |43+| articles | only you | anyone | long-form articles and profiles; mirrored daily from a source if you give one |44+| dm | anyone | members | private messages only; directory hidden |45+46+The search and articles presets take a source relay URL in the field next to the buttons. Applying one adds a standing pull of its kinds from that source. Applying any preset again replaces that pull rather than adding another, and applying one with no source removes it. The pull appears in the Jobs table.47+48+## Fork this relay49+50+Under **Fork this relay** on the Data tab, a fork leases a new name, copies this relay into it and reserves the claim for a key.51+52+- **Name**: choose one, or leave it blank for a memorable one.53+- **Who claims it**: you by default, or an npub or hex key to hand a community its own relay with its history.54+- **What to copy**: everything, only your events or a list of kinds.55+- **Copy the people**: bring the plain members along. Moderators and bans stay here.56+57+The result is the new console URL to hand over. The new name is temporary until it is claimed, like any lease. One fork an hour.58+59+## Leave60+61+Your data is yours. Any relay that speaks sync can pull everything from yours:62+63+```64+nak sync -a <your-pubkey> wss://<name>.bind.ws wss://<other-relay>65+```66+67+Or download a dump.68+69+## What it spends70+71+Jobs wake the relay, so they spend awake time on every run. Pulled events count as events stored and rows written. Dumps count as files stored. See [Understanding fuel](02-understanding-fuel.md).