Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use stable identifiers for faster joins #583

Merged
merged 12 commits into from
Jan 13, 2023
Merged

Conversation

DMRobertson
Copy link
Contributor

@DMRobertson DMRobertson commented Jan 12, 2023

No attempt to maintain backwards compatibility here.

Synapse issue: matrix-org/synapse#14828
Synapse PR: matrix-org/synapse#14832
Complement PR: #583
GMSL PR: matrix-org/gomatrixserverlib#350
MSC: matrix-org/matrix-spec-proposals#3706
Spec diff: matrix-org/matrix-spec#1393

TODO: once GMSL gets merged, update go.mod to point at main branch of GMSL

David Robertson added 2 commits January 12, 2023 19:22
```
$ go get -u github.com/matrix-org/gomatrixserverlib@dmr/msc-3706-stable-identifiers
go: downloading github.com/matrix-org/gomatrixserverlib v0.0.0-20230112185427-4f65e88d2a5b
go: downloading golang.org/x/crypto v0.5.0
go: downloading github.com/matrix-org/gomatrix v0.0.0-20220926102614-ceba4d9f7530
go: downloading github.com/matrix-org/util v0.0.0-20221111132719-399730281e66
go: downloading github.com/tidwall/gjson v1.14.4
go: downloading golang.org/x/sys v0.4.0
go: downloading github.com/tidwall/pretty v1.2.1
go: downloading golang.org/x/text v0.6.0
go: downloading golang.org/x/net v0.5.0
go: downloading golang.org/x/tools v0.1.12
go: downloading github.com/miekg/dns v1.1.50
go: downloading gopkg.in/h2non/gock.v1 v1.1.2
go: downloading github.com/stretchr/testify v1.8.0
go: upgraded github.com/matrix-org/gomatrix v0.0.0-20210324163249-be2af5ef2e16 => v0.0.0-20220926102614-ceba4d9f7530
go: upgraded github.com/matrix-org/gomatrixserverlib v0.0.0-20220830164018-c71e518537a2 => v0.0.0-20230112185427-4f65e88d2a5b
go: upgraded github.com/matrix-org/util v0.0.0-20200807132607-55161520e1d4 => v0.0.0-20221111132719-399730281e66
go: upgraded github.com/tidwall/gjson v1.14.3 => v1.14.4
go: upgraded github.com/tidwall/pretty v1.2.0 => v1.2.1
go: upgraded golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 => v0.5.0
go: upgraded golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 => v0.5.0
go: upgraded golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 => v0.4.0
go: upgraded golang.org/x/tools v0.1.9 => v0.1.12
go: upgraded gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b =>
v3.0.1
```
@DMRobertson
Copy link
Contributor Author

Ah. Looks like I need to update to changes in GMSL?

David Robertson added 2 commits January 13, 2023 12:19
See matrix-org/gomatrixserverlib#344

AFAICS passing nil means that the server isn't going to accept any
vhosting shenanigans.
@DMRobertson DMRobertson marked this pull request as ready for review January 13, 2023 12:54
@DMRobertson DMRobertson requested review from a team and kegsay as code owners January 13, 2023 12:54
David Robertson added 6 commits January 13, 2023 13:17
there's probably a neater way to not write
`gomatrixserverlib.ServerName` but idk what the best thing to do is here.
missed this one because struct fields are optional(?)
DMRobertson added a commit to matrix-org/gomatrixserverlib that referenced this pull request Jan 13, 2023
I haven't made any effort to maintain backwards compatibility (unlike in
matrix-org/synapse#14832). I'm happy to do so if
needed, but might need some guidance.

Synapse issue: matrix-org/synapse#14828
Synapse PR: matrix-org/synapse#14832
Complement PR: matrix-org/complement#583
GMSL PR: #350
MSC: matrix-org/matrix-spec-proposals#3706
Spec diff: matrix-org/matrix-spec#1393

### Pull Request Checklist

* [x] Pull request includes a [sign
off](https://github.com/matrix-org/dendrite/blob/master/docs/CONTRIBUTING.md#sign-off)

Signed-off-by: `David Robertson <davidr@element.io>`
Copy link
Contributor

@squahtx squahtx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.
Thanks for dealing with the gomatrixserverlib update. It looks like a right pain.

Comment on lines 502 to 506
if !sendJoinResp.PartialState {
t.Skip("Server does not support partial_state")
if !sendJoinResp.MembersOmitted {
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what's going on here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is poor git-hygiene, will fix

@DMRobertson DMRobertson merged commit 343f4f0 into main Jan 13, 2023
@DMRobertson DMRobertson deleted the dmr/faster-joins-renames branch January 13, 2023 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants