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

Note a more efficient computation of the auth difference. #1119

Merged
merged 7 commits into from
Jun 15, 2022
Merged

Note a more efficient computation of the auth difference. #1119

merged 7 commits into from
Jun 15, 2022

Conversation

DMRobertson
Copy link
Contributor

@DMRobertson DMRobertson commented Jun 13, 2022

Closes #1118; see that issue for rationale.

Preview: https://pr1119--matrix-spec-previews.netlify.app

@DMRobertson DMRobertson marked this pull request as ready for review June 13, 2022 15:07
@DMRobertson DMRobertson requested a review from a team as a code owner June 13, 2022 15:07
@DMRobertson DMRobertson marked this pull request as draft June 13, 2022 16:31
@DMRobertson DMRobertson marked this pull request as ready for review June 13, 2022 17:46
content/rooms/fragments/v2-state-res.md Outdated Show resolved Hide resolved
Comment on lines 54 to 55
chain for each state *S*<sub>*i*</sub>, and then discarding the events
belonging to each full auth chain. In symbols: if *F*(*S*) is the full auth
Copy link
Member

Choose a reason for hiding this comment

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

I think this changes the meaning. "Discarding the events belonging to each full auth chain" would mean we would be left with only the event not in any of the full auth chains.

Possibly we want "taking each event which is missing from one or more full auth chains".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about something completely different:

For each state Si, compute its full auth chain. The auth difference is the set of events which belong to some, but not all, of these full auth chains.

I'm trying to avoid "the auth difference is calculated by doing X" in favour of "the auth difference is Y.

content/rooms/fragments/v2-state-res.md Outdated Show resolved Hide resolved
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
@DMRobertson DMRobertson requested a review from richvdh June 14, 2022 17:35
@turt2live turt2live dismissed their stale review June 14, 2022 17:40

addressed

Copy link
Member

@richvdh richvdh 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!

@richvdh richvdh merged commit a707266 into matrix-org:main Jun 15, 2022
Comment on lines +61 to +63
This can be computed more efficiently as
*F*(*C*) - ∩<sub>*i*</sub> *F*(*S*<sub>*i* - *C*</sub>) ,
where *C* is the conflicted state set.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@erikjohnston and I believe this sentence to be incorrect. The other changes are fine as clarifications however.

turt2live added a commit that referenced this pull request Jun 16, 2022
)" (#1132)

* Revert "Note a more efficient computation of the auth difference. (#1119)"

This reverts commit a707266.

* Changelog

* Delete 1132.misc

Co-authored-by: Travis Ralston <travpc@gmail.com>
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.

Possible optimsation in the definition of auth difference
3 participants