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

Additional tests for device list updates #925

Open
babolivier opened this issue Aug 5, 2020 · 1 comment
Open

Additional tests for device list updates #925

babolivier opened this issue Aug 5, 2020 · 1 comment

Comments

@babolivier
Copy link
Contributor

babolivier commented Aug 5, 2020

It is possible for homeservers to miss device list updates. This means the local copy of a device list for a remote user can become stale, or out of sync with their actual device list, because further updates will be deltas with the previously sent ones.

To ensure inbound device list updates are reliably implemented in a HS implementation, we should test that:

  • Upon receiving a new device list updates which prev ID is unknown, the HS queries /_matrix/federation/v1/user/devices/{userId} (spec says otherwise, but see https://github.com/matrix-org/matrix-doc/issues/2710) on the remote HS
  • If the remote HS is down, this request is retried in a timely manner; this is not in the spec because the spec doesn't mention any way of making device list updates reliable, but this is how we do it in Synapse and the simplest way to implement some level of reliability here imho so it might be something we should at least nudge implementations into doing through sytest
  • Cross-signing keys are correctly processed from the response to this request (as per initial spec for cross-signing matrix-spec-proposals#2536)
  • Homeservers can process device list updates that come in out of order (i.e. not sorted on their stream ID in the federation transaction)

The second point is difficult to test, though, because we don't currently have a way to test things like retry schedules.

@richvdh
Copy link
Member

richvdh commented Aug 5, 2020

Upon receiving a new device list updates which prev ID is unknown, the HS queries /_matrix/federation/v1/user/devices/{userId} (spec says otherwise, but see matrix-org/matrix-doc#2710) on the remote HS

Is this much at least not tested by

test "If a device list update goes missing, the server resyncs on the next one",
?

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

No branches or pull requests

2 participants