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

Server-Server API does not specify that sending servers need to be able to give prev_events for the events that they send #1228

Open
reivilibre opened this issue Sep 6, 2022 · 2 comments
Labels
clarification An area where the expected behaviour is understood, but the spec could do with being more explicit

Comments

@reivilibre
Copy link
Contributor

reivilibre commented Sep 6, 2022

Link to problem area: https://spec.matrix.org/v1.3/server-server-api/#checks-performed-on-receipt-of-a-pdu

Link to relevant Synapse code: https://github.com/matrix-org/synapse/blob/0bf180cbb43f6e3d489ddaa5d66226b6daeea027/synapse/handlers/federation_event.py#L307-L315

Issue

Synapse requires that a remote homeserver which is sending an event is able to produce, on demand, the prev_events for that event via /get_missing_events. This does not appear to be made clear in the specification, which I think could be troublesome for interoperability.
It also just seems like something that is worth noting; particularly when looking to implement faster room joins, this is something that has come up.

@reivilibre reivilibre added the clarification An area where the expected behaviour is understood, but the spec could do with being more explicit label Sep 6, 2022
@turt2live
Copy link
Member

Is this actually a requirement, or is Synapse just doing it "wrong"?

@reivilibre
Copy link
Contributor Author

reivilibre commented Sep 29, 2022

When talking to @richvdh, he said that it's somewhat a fundamental tenet of Matrix but he doubts it's written down.

It's not entirely clear to me whether this is an absolutely hard requirement or it's just a side effect of the way Synapse tracks state. Suspect thinking this through is going to need more context than I have on me at the moment.

Since Synapse depends on it and it seems reasonable to expect a server to be able to access the prev_events of the events that it's generating, would this requirement be accepted as a spec clarification?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification An area where the expected behaviour is understood, but the spec could do with being more explicit
Projects
None yet
Development

No branches or pull requests

2 participants