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

Clarification for /event_auth #3583

Merged
merged 1 commit into from Jan 4, 2022
Merged

Clarification for /event_auth #3583

merged 1 commit into from Jan 4, 2022

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Dec 22, 2021

The current text on this reads:

The full set of authorization events that make up the state of the room, and their authorization events, recursively. Note that events have a different format depending on the room version - check the room version specification for precise event formats.

This is misleading at best, as it implies it should return the auth chains for the full state of the room. Rather, it returns the auth chain for the event specified in the request: this is a much smaller set of data. (Consider a large room with many members: as worded, we should return the auth chain for every single m.room.member event in the state; in practice, Synapse only returns the auth chain for the requested event.)

For reference, the Synapse implementation of this method can be seen at https://github.com/matrix-org/synapse/blob/v1.49.2/synapse/handlers/federation.py#L420-L425 (which calls get_auth_chain). The code has been optimised over the years, but in principle it has changed little since Synapse 0.6.0 (https://github.com/matrix-org/synapse/blob/v0.6.0/synapse/handlers/federation.py#L291-L304, https://github.com/matrix-org/synapse/blob/v0.6.0/synapse/storage/event_federation.py#L35-L71).

This text was introduced into the spec in matrix-doc#1475, so correction does not require an MSC - it's simply a bug in the spec.

Preview: https://pr3583--matrix-org-previews.netlify.app

The description on this endpoint implied it returned the auth chain for the
full state of the room, which is incorrect.
@richvdh richvdh requested a review from a team December 22, 2021 14:12
Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

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

Thanks!

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.

None yet

2 participants