clone

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

docs: dumps, per-member limits and members inviting members

Dami committed 16544fe
commit
16544feaf216f52102148ad5b5ef8537d3641092
parent
eef0303d3d831e9baac6d4ef76ade210c8ab5ced
author
Dami <dami.etoile@gmail.com>
4 files changed, +18 -1
Mdocs/00-getting-started.md4++++
Mdocs/01-relay-configuration.md5+++++
Mdocs/02-understanding-fuel.md4++++
Mdocs/10-architecture.md6+++++-
M docs/00-getting-started.md +4 -0
M docs/01-relay-configuration.md +5 -0
@@ -20,6 +20,8 @@ Three things read that table: the write rule, the signed roster your relay publi
2020 - **Ban** a pubkey. Their events are refused and their open connections are closed.2121 - **Block an address.** An IP address, v4 or v6, gets no socket and no write or read door; its open connections are closed. The page, the relay information and management stay reachable, so you can undo a block on your own address. Addresses churn, so blocks are not part of the exported configuration.2222 - **Reports** filed against people or events arrive here. Resolve each one by dismissing it, deleting the event or banning the author.23+- **Limits**, two small inputs per member, for the owner only. *Keep for* is a keep-for rule in days for that person's events, on top of the kind rules: older events are refused on arrival and swept once a day, never profiles, contact lists or the relay's own records. *Cap* is the most that person may have stored, in KB; the event that would cross it is refused. Neither applies to the owner.24+- **Members invite members**, the small form under the invites. *Hops deep* is how far from you the tree may reach: 1 means only people you added or invited may invite, 2 lets their invitees invite too. *Each* is how many live invites one member may hold. Zero hops turns it off, which is the default. The member list is drawn as that tree, with who invited whom, and removing or banning someone with invitees asks whether to remove everyone under them as well. Moderators, and everyone under a moderator, stay.2325 - **Role** is *member* or *moderator*, set from the selector next to the pubkey. A moderator can add and remove members, ban, delete events, mint invites and resolve reports, here or from a group-aware client. They cannot touch the owner, other moderators, rules, identity, storage or fuel.2426 2527 Removing a member ends their live subscriptions when reads are members-only.
@@ -80,6 +82,9 @@ What is taking space and what to do about it.
8082 - Kinds marked **required** are never expired or purged: profiles, contact lists, relay lists, zap receipts and the roster. The relay depends on them.8183 - **Files** lists uploads with sizes and a delete button.8284 - **Jobs** is work the relay does on its own, one round at a time, so it survives the relay sleeping. The table lists each job with its relays, filter, schedule and last result, with run-now and remove. Three forms add jobs. **Pull** copies what another relay has and this one lacks, by NIP-77 sync; running it again fetches only what is new, files come along from relays on this host, and with an interval it is a standing mirror. **Fetch my history** pulls the owner's own events from the relays in their kind 10002 stored here, or from a given list. **Rebroadcast** forwards events matching kinds and a day window to a list of relays, walking the store with a cursor so a standing rebroadcast forwards only what arrived since. Bans and kind rules apply to what arrives; the write rule does not. The other relay has to let anyone read, or write. Events that only their author may publish are never rebroadcast, and a members-only relay never rebroadcasts private kinds. Standing jobs run every hour, six hours or day, five at most. Jobs spend awake time, which fuel counts.85+86+- **Dumps** writes every event as one JSONL file to storage, daily or weekly, and keeps the newest few (seven by default). **Dump now** writes one on the spot. Each file lists its event count and size, with download and delete. Downloading is a signed request; the files are never public. Dumps count as files for fuel.87+- **Pull from a relay** copies what another relay has and this one lacks, by NIP-77 sync. It runs in the background and the line under it follows along. Running it again fetches only what is new. Files come along from relays on this host. Bans and kind rules apply to what arrives; the write rule does not. The other relay has to let anyone read.8388 - **Browse recent events** at the bottom shows the feed with delete and ban actions.8489 8590 ## Health
M docs/02-understanding-fuel.md +4 -0
M docs/10-architecture.md +5 -1
@@ -45,7 +45,9 @@ Blobs live in R2 under `<name>/<sha256>`. Their descriptors live in the relay's
4545 4646 ## Alarm4747 48-One alarm per object, at most a day out, sooner if a NIP-40 expiry is due or a lease expires. It flushes usage counters, charges storage, applies retention rules and sweeps expired events. A lease past its expiry is torn down whole, which returns the name to unclaimed.48+One alarm per object, at most a day out, sooner if a NIP-40 expiry is due or a lease expires. It flushes usage counters, charges storage, applies retention rules (the kind rules, then each member's own keep-for), sweeps expired events and, when the owner turned dumps on, writes a JSONL of every event to R2 (`dumps.ts`): streamed by sequence into a multipart upload, recorded in the `dumps` table, counted as media, the newest `dumpsKeep` kept. A lease past its expiry is torn down whole, which returns the name to unclaimed.49+50+Per-member caps are checked on the write path from a per-author byte count the store caches; anything that deletes clears the cache.4951 5052 NIP-46 traffic (kind 24133) is ephemeral, never stored and encrypted end to end, so it passes the ownership and write gates, and a subscription to it alone passes the read gate. That lets the relay carry a remote signer's session for the console, including for someone about to claim it. Bans and the per-connection rate limit still apply.5153
@@ -96,6 +98,8 @@ Moderators cannot act on the owner or on each other; only the owner appoints or
9698 9799 `src/presets.ts` holds the rule bundles (`applypreset`, `listpresets` over NIP-86), applied through the same Settings methods the console uses one at a time. The owner's own replaceable kinds pass the kind rules, so a relay can always hold its owner's lists. Wiring the relay into those lists happens in the console: it fetches the newest copy from this relay over the NIP-98 bridge and from a few indexers over websockets, merges, signs once, and publishes to every relay the list names.98100 101+Members inviting members is `invited_by` on the member row, set from the invite's minter on both join doors, and a `memberInvites` rule in policy. `Settings.inviteDepth` walks the chain to the owner; `Settings.subtree` collects a member and everyone under them, stopping at moderators; `removesubtree` removes them all and publishes membership once.102+99103 ## Protocol surface100104 101105 NIP-01, 09, 11, 13, 17/59 private kinds, 29, 40, 42, 45 with HLL, 50, 56, 62, 67, 70, 77, 86, 98, plus NIP-05, NIP-43, NIP-57, NIP-96 with NIP-94, and Blossom BUD-01/02/04/06/08/09. `test/conformance` is a black-box suite that runs against any relay URL.