TS6 server-to-server linking - #2458
Draft
kevinpostal wants to merge 7 commits into
Draft
kevinpostal wants to merge 7 commits into
kevinpostal wants to merge 7 commits into
Conversation
- Implemented TS6 protocol handshake (PASS, CAPAB, SERVER, SVINFO, PING, PONG). - Implemented network state bursting (SID, UID/EUID, SJOIN, BMASK, TB). - Implemented routing, nickname/UID resolution, multi-hop broadcast, and TS collision handling. - Implemented runtime propagation for JOIN, PART, KICK, MODE/TMODE, TOPIC, PRIVMSG/NOTICE, AWAY, and KILL. - Implemented netsplit cleanup and routing graph updates. - Added comprehensive unit and integration test suite in irc/s2s_test.go.
Waveplate's TS6 commits trip the local gofmt -s (struct literal alignment in irc/client.go, trailing blank lines in irc/s2s_link.go, irc/s2s_test.go, irc/server.go). Mechanical formatter output only; no hand edits.
Member
|
Please see #1532 for previous discussion of this issue. The short answer is that TS6 and similar are not a good fit for Ergo, because core Ergo logic (e.g. nickname ownership) needs to be CP rather than AP. At a more immediate level, I do not see how this PR addresses availability of the datastore (in particular the business logic in |
This branch has not been deployed
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.
TS6 server-to-server linking for Ergo, extracted from waveplate/ergo branch
ts6-linking(commits 622bc84, dc5c31e, 41b3f27, 3491c03, 0b05e5e, author @waveplate, cherry-picked verbatim; merge commit cc472a9 skipped). Cherry-picks applied cleanly against current master with no conflicts.Depends on #2456 (stacked; the first commit on this branch is that PR's commit).
What the change contains:
irc/s2s_manager.go— link lifecycle: dial/listen, reconnect, routing graph, netsplit cleanup, multi-hop broadcast.irc/s2s_handlers.go— inbound TS6 command handlers (PASS, CAPAB, SERVER, SVINFO, SID, UID/EUID, SJOIN, TMODE, BMASK, TB/TOPIC, JOIN, PART, KICK, MODE, PRIVMSG/NOTICE, AWAY, KILL, ENCAP, PING/PONG, SQUIT) plus nickname/UID resolution and TS collision handling.irc/s2s_burst.go— outbound network-state burst (servers, users, channels, modes, bans, topics).irc/s2s_link.go,irc/s2s_types.go— connection I/O and shared types; small hooks inchannel.go,client.go,client_lookup_set.go(UID-indexed client lookup),nickname.go,handlers.go,commands.go,help.go,modes.server.sid(this server's 3-character SID) and aserver.linksmap per peer (name,sid,hostname,port,tls,send-password,receive-password,auto-connect) — see the commented examples indefault.yaml/traditional.yamland thedocs/MANUAL.mdsection added by 0b05e5e.distrib/docker-linking/(from 41b3f27) — two-server linked docker deployment (compose.yaml,ircd-a.yaml,ircd-b.yaml,README.md) for manual testing.irc/s2s_test.go— unit + integration suite for handshake, burst, runtime propagation and splits.Reviewer note — inbound handshake password check (
irc/s2s_handlers.go,handlePass, quoted verbatim):i.e. an inbound connection presenting an unknown SID — one with no matching entry in
server.links(matched by SID viaFindLinkConfig) — is accepted without any password check (only TS-version, SID-format and self-collision validation apply). Operators must define alinksentry for every peer they intend to link with; otherwise anyone can introduce a server into the network. Flagging explicitly so reviewers see it.Upstream policy note:
docs/MANUAL.mdcurrently states "Ergo does not currently support server-to-server linking (federation), meaning that all clients must connect to the same instance." This PR is therefore opened as a draft for discussion, not as a merge-ready proposal.Testing:
make testwas run locally but does NOT fully pass on this branch;make irctestwas NOT run (needs the irctest harness). Verbatim failure (go test -tags "i18n mysql postgresql sqlite" ./irc/, full package run reports "170 passed, 1 failed"):(The literal non-ASCII nicks are elided here; they are Hebrew and Cyrillicnick cases gated on
i18n.Enabled.) The failure is a test-isolation interaction, not a product-code regression: the newirc/s2s_test.goboots test servers withcasemapping: ascii, which sets the package-globalglobalCasemappingSetting; sinces2s_test.gosorts beforestrings_test.go", its tests run first and the global is still ASCII whenTestCanonicalizeMaskWildcard's i18n-gated cases execute. Evidence: the test passes on pristine upstream master, and passes on this branch in isolation (go test ./irc/ -run TestCanonicalizeMaskWildcard`). Left unfixed deliberately — fixing it would mean editing the contributed test setup, which is the author's call.Author credit: @waveplate.