feat: let a room's maker add relays for everyone - #194
Open
TheCryptoDonkey wants to merge 3 commits into
Open
TheCryptoDonkey wants to merge 3 commits into
TheCryptoDonkey wants to merge 3 commits into
Conversation
A room's relays were fixed by its link, so nobody could move a whole room onto a more reliable relay. The maker can now share their room relays from relay settings: a `relays` op on the control channel, signed by the authority pinned in the link over the room id, a version and the list. Every member verifies it, keeps only the highest version, and adds the listed relays to their own for the room; nothing is taken away. Anyone holding the record reposts it when the log's copy is 20 days old, so it stays inside the window a newcomer reads. Vectors: new roomRelays group (one positive, three negative). Claude-Session: https://claude.ai/code/session_01CG4pPCsd8pdySNvBpt8fTk
A group link admits newcomers from its kind 1463 invitation alone, so relays the maker adds for everyone must hold it too. Claude-Session: https://claude.ai/code/session_01CG4pPCsd8pdySNvBpt8fTk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 2 of the 27 Sept durable-history plan: a room owns its relay list. The owner asked to add their own, more resilient relay to a room and have everyone use it.
src/room-relays.ts:signRoomRelays/verifyRoomRelaysoverkithmoot/v1/relays:<roomId>:<version>:<JSON canonical list>, authority = inviter pinned in the link. Canonical = normalised, deduplicated, sorted, at most 8. Not epoch-bound;versionorders lists.control.ts:{ op: 'relays', relays, version, sig }on the control channel (stored chat, so late joiners read it). Nohost: anyone may repost, the signature is what counts.roomRelaysgroup (1 positive, 3 negative), additions only.Tests: unit + vectors;
room-relays.spec(new),relay-settings,persistent-groups,channelspass on Chromium and Firefox. Every WebKit test (including untouched specs) timed out locally, which matches the local WebKit/Playwright mismatch; CI is the WebKit check.Not in this PR: Android support (kithmoot-android needs to read the op), keeper-signed records.
🤖 Generated with Claude Code
https://claude.ai/code/session_01CG4pPCsd8pdySNvBpt8fTk