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

crypto: MemoryStore uses backup versions to track which sessions are backed up #3320

Merged
merged 2 commits into from
May 21, 2024

Conversation

andybalaam
Copy link
Contributor

@andybalaam andybalaam commented Apr 11, 2024

Fixes https://github.com/element-hq/crypto-internal/issues/208

Validate the algorithm described in element-hq/element-web#26892 (comment) by implementing it in in the MemoryStore.

Main outstanding question: InboundGroupSession (in crates/matrix-sdk-crypto/src/olm/group_sessions/inbound.rs) has a backed_up field. Should this be changed (e.g. to backup_up_to) or removed? How is it used?

  • Public API changes documented in changelogs (optional)

@andybalaam andybalaam force-pushed the andybalaam/fast-backup-reset-in-memorystore2 branch from 8c47095 to a7b2bb1 Compare April 11, 2024 10:48
@andybalaam andybalaam marked this pull request as ready for review April 11, 2024 12:14
@andybalaam andybalaam requested a review from a team as a code owner April 11, 2024 12:14
@andybalaam andybalaam requested review from bnjbvr and poljar and removed request for a team and bnjbvr April 11, 2024 12:14
@andybalaam
Copy link
Contributor Author

I switched the reviewer to @poljar since he reviewed the similar one #3306

@andybalaam andybalaam force-pushed the andybalaam/fast-backup-reset-in-memorystore2 branch from a7b2bb1 to 33e8fe1 Compare April 11, 2024 12:15
Copy link

codecov bot commented Apr 11, 2024

Codecov Report

Attention: Patch coverage is 96.77419% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 83.22%. Comparing base (5df53d7) to head (2652b77).

Files Patch % Lines
crates/matrix-sdk-crypto/src/backups/mod.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3320      +/-   ##
==========================================
+ Coverage   83.20%   83.22%   +0.01%     
==========================================
  Files         247      247              
  Lines       25022    25048      +26     
==========================================
+ Hits        20819    20845      +26     
  Misses       4203     4203              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@poljar poljar left a comment

Choose a reason for hiding this comment

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

This is making mostly sense, though there are a couple of show stoppers.

crates/matrix-sdk-crypto/src/store/memorystore.rs Outdated Show resolved Hide resolved
crates/matrix-sdk-crypto/src/store/memorystore.rs Outdated Show resolved Hide resolved
crates/matrix-sdk-crypto/src/store/memorystore.rs Outdated Show resolved Hide resolved
crates/matrix-sdk-crypto/src/store/memorystore.rs Outdated Show resolved Hide resolved
crates/matrix-sdk-crypto/src/store/memorystore.rs Outdated Show resolved Hide resolved
crates/matrix-sdk-crypto/src/store/memorystore.rs Outdated Show resolved Hide resolved
@andybalaam andybalaam requested a review from poljar May 20, 2024 12:32
@andybalaam
Copy link
Contributor Author

OK, better late than never, I've made changes in response to the review. Thanks!

Copy link
Contributor

@poljar poljar left a comment

Choose a reason for hiding this comment

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

Looks good, thanks.

@andybalaam andybalaam force-pushed the andybalaam/fast-backup-reset-in-memorystore2 branch from b122797 to 2652b77 Compare May 21, 2024 08:45
@andybalaam andybalaam enabled auto-merge May 21, 2024 08:45
@andybalaam andybalaam merged commit 7bce12c into main May 21, 2024
36 checks passed
@andybalaam andybalaam deleted the andybalaam/fast-backup-reset-in-memorystore2 branch May 21, 2024 08:57
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