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

Support for MSC3814 - Dehydrated devices v2 #2349

Merged
merged 4 commits into from
Aug 9, 2023

Conversation

poljar
Copy link
Contributor

@poljar poljar commented Jul 28, 2023

This PR adds initial support for MSC3814. This is best reviewed commit by
commit.

It's best to get an overview of the MSC first, the docs in the
dehydrated_devices submodule attempt to explain dehydrated devices as well.

  • Public API changes documented in changelogs (optional)

This closes: #401.

@poljar poljar requested a review from a team as a code owner July 28, 2023 12:11
@poljar poljar requested review from Hywan and removed request for a team July 28, 2023 12:11
@codecov
Copy link

codecov bot commented Jul 28, 2023

Codecov Report

Patch coverage: 93.18% and project coverage change: -0.09% ⚠️

Comparison is base (80c9464) 77.78% compared to head (37e1d25) 77.69%.

❗ Current head 37e1d25 differs from pull request most recent head 38cdc6a. Consider uploading reports for the commit 38cdc6a to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2349      +/-   ##
==========================================
- Coverage   77.78%   77.69%   -0.09%     
==========================================
  Files         175      176       +1     
  Lines       18619    18655      +36     
==========================================
+ Hits        14482    14494      +12     
- Misses       4137     4161      +24     
Files Changed Coverage Δ
crates/matrix-sdk-crypto/src/gossiping/machine.rs 63.58% <ø> (ø)
crates/matrix-sdk-crypto/src/identities/user.rs 87.42% <ø> (ø)
crates/matrix-sdk-crypto/src/lib.rs 100.00% <ø> (ø)
...atrix-sdk-crypto/src/olm/group_sessions/inbound.rs 82.42% <ø> (ø)
...trix-sdk-crypto/src/olm/group_sessions/outbound.rs 92.47% <ø> (ø)
crates/matrix-sdk-crypto/src/olm/signing/mod.rs 84.31% <ø> (ø)
.../matrix-sdk-crypto/src/session_manager/sessions.rs 86.75% <ø> (ø)
crates/matrix-sdk-crypto/src/store/mod.rs 78.38% <ø> (+0.07%) ⬆️
...ates/matrix-sdk-crypto/src/verification/machine.rs 73.57% <ø> (ø)
crates/matrix-sdk-crypto/src/verification/mod.rs 54.06% <ø> (ø)
... and 8 more

... and 13 files with indirect coverage changes

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

@poljar poljar requested a review from dkasak July 31, 2023 10:07
@poljar poljar self-assigned this Aug 2, 2023
@poljar poljar force-pushed the poljar/device-dehydration-pr branch 2 times, most recently from c1107be to 7131fcf Compare August 4, 2023 14:03
crates/matrix-sdk-crypto/src/machine.rs Outdated Show resolved Hide resolved
crates/matrix-sdk-crypto/src/olm/account.rs Show resolved Hide resolved
crates/matrix-sdk-crypto/src/olm/account.rs Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
crates/matrix-sdk-crypto/src/dehydrated_devices.rs Outdated Show resolved Hide resolved
crates/matrix-sdk-crypto/src/dehydrated_devices.rs Outdated Show resolved Hide resolved
crates/matrix-sdk-crypto/src/dehydrated_devices.rs Outdated Show resolved Hide resolved
crates/matrix-sdk-crypto/src/dehydrated_devices.rs Outdated Show resolved Hide resolved
crates/matrix-sdk-crypto/src/dehydrated_devices.rs Outdated Show resolved Hide resolved
crates/matrix-sdk-crypto/src/dehydrated_devices.rs Outdated Show resolved Hide resolved
@poljar poljar force-pushed the poljar/device-dehydration-pr branch from 72b2a1d to 31c8285 Compare August 9, 2023 09:12
@poljar
Copy link
Contributor Author

poljar commented Aug 9, 2023

Force pushed after a rebase onto main to get the CI going.

crates/matrix-sdk-crypto/CHANGELOG.md Outdated Show resolved Hide resolved
poljar and others added 4 commits August 9, 2023 11:27
This splits the method out so the bigger chunks doesn't persist the
changes in the store.

This will be useful if we need to hijack the changes and persist them in
a different store.
@poljar poljar force-pushed the poljar/device-dehydration-pr branch from 3941c10 to 38cdc6a Compare August 9, 2023 09:28
@poljar poljar merged commit 3d3021e into main Aug 9, 2023
@poljar poljar deleted the poljar/device-dehydration-pr branch August 9, 2023 10:32
Comment on lines +40 to +42
// TODO: Once a device has been rehydrated it might need to download and decrypt
// a lot of to-device events. This process might take some time and we should
// support resuming it.
Copy link
Member

Choose a reason for hiding this comment

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

@poljar Do we have an issue to not forget about this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have, albeit a task/issue on the crypto board and the meta repo.

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.

Device dehydration support
3 participants