Skip to content

Conversation

@poljar
Copy link
Collaborator

@poljar poljar commented Nov 30, 2022

No description provided.

@poljar poljar requested a review from dkasak November 30, 2022 12:31
@codecov
Copy link

codecov bot commented Nov 30, 2022

Codecov Report

Base: 87.58% // Head: 88.16% // Increases project coverage by +0.58% 🎉

Coverage data is based on head (b5dab00) compared to base (5ece305).
Patch coverage: 87.84% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #95      +/-   ##
==========================================
+ Coverage   87.58%   88.16%   +0.58%     
==========================================
  Files          32       32              
  Lines        1603     1724     +121     
==========================================
+ Hits         1404     1520     +116     
- Misses        199      204       +5     
Impacted Files Coverage Δ
src/lib.rs 86.66% <ø> (-13.34%) ⬇️
src/olm/session_keys.rs 0.00% <ø> (ø)
src/sas.rs 94.64% <ø> (ø)
src/utilities/mod.rs 98.00% <ø> (ø)
src/olm/session/chain_key.rs 92.30% <25.00%> (-1.98%) ⬇️
src/olm/session/ratchet.rs 81.48% <25.00%> (-1.13%) ⬇️
src/olm/session/root_key.rs 96.42% <50.00%> (-3.58%) ⬇️
src/olm/account/mod.rs 90.25% <82.85%> (-2.18%) ⬇️
src/olm/session/mod.rs 90.24% <88.88%> (+6.11%) ⬆️
src/megolm/group_session.rs 95.83% <100.00%> (+0.48%) ⬆️
... and 12 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@poljar poljar force-pushed the poljar/libolm-pickle-encode-support branch from e22170d to cbae68b Compare November 30, 2022 14:28
@dkasak
Copy link
Member

dkasak commented Dec 28, 2022

We also need to update the README to remove the notice that libolm pickle support is "read-only".

@nico-famedly
Copy link

Is there anything blocking this or something I could help to push this forward? I would like to support both libolm and vodozemac for a while in our SDK and if it was possible to switch between both, that would make a few things easier until we migrate away from libolm entirely.

@poljar
Copy link
Collaborator Author

poljar commented Feb 13, 2023

Is there anything blocking this or something I could help to push this forward? I would like to support both libolm and vodozemac for a while in our SDK and if it was possible to switch between both, that would make a few things easier until we migrate away from libolm entirel

I think it's just a lack of time due to a FOSDEM crunch.

Beware that the transition from libolm to vodozemac is losless, but vodozemac has larger buffers for one-time keys and some other objects.

This makes the transition from vodozemac back to libolm lossy.

@nico-famedly
Copy link

Beware that the transition from libolm to vodozemac is losless, but vodozemac has larger buffers for one-time keys and some other objects.

Yes, I am aware and partially documented it already internally. We generally wouldn't want to transition back, but we want to somewhat gracefully handle the cases where someone might start an older version of the app and similar for a while.

I think it's just a lack of time due to a FOSDEM crunch.

Okay, that sounds absolutely fair. I was mostly just thinking this would be useful for me during the migration and wanted to make sure it couldn't use some help. Thank you for the reply!

@tulir
Copy link
Member

tulir commented Sep 13, 2025

Any chance of merging this? I'm thinking of switching mautrix-python to use vodozemac, but the database needs to remain compatible with mautrix-go, which uses libolm or goolm. Longer term goolm could get vodozemac pickling support, but probably won't happen in the near future

@poljar
Copy link
Collaborator Author

poljar commented Sep 15, 2025

Let's see if I can resurrect this PR.

@poljar poljar force-pushed the poljar/libolm-pickle-encode-support branch from b477b9f to 1f7b126 Compare September 15, 2025 12:34
@codecov-commenter
Copy link

codecov-commenter commented Sep 15, 2025

Codecov Report

❌ Patch coverage is 83.91304% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.03%. Comparing base (7d36b9c) to head (470ab7d).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/olm/session/mod.rs 75.00% 22 Missing and 4 partials ⚠️
src/megolm/mod.rs 83.87% 3 Missing and 2 partials ⚠️
src/olm/session/ratchet.rs 70.00% 3 Missing ⚠️
src/megolm/group_session.rs 92.85% 1 Missing ⚠️
src/megolm/inbound_group_session.rs 92.85% 1 Missing ⚠️
src/olm/session_keys.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #95      +/-   ##
==========================================
+ Coverage   90.64%   91.03%   +0.38%     
==========================================
  Files          34       34              
  Lines        4940     5154     +214     
  Branches     4940     5154     +214     
==========================================
+ Hits         4478     4692     +214     
+ Misses        297      292       -5     
- Partials      165      170       +5     

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

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 15, 2025

CodSpeed Performance Report

Merging #95 will not alter performance

Comparing poljar/libolm-pickle-encode-support (470ab7d) with main (99aebd6)

Summary

✅ 6 untouched

@poljar poljar force-pushed the poljar/libolm-pickle-encode-support branch 2 times, most recently from 66723c2 to 591d691 Compare September 24, 2025 18:15
@poljar poljar force-pushed the poljar/libolm-pickle-encode-support branch from 591d691 to 470ab7d Compare September 24, 2025 18:17
@poljar poljar requested a review from dkasak September 25, 2025 06:39
@poljar
Copy link
Collaborator Author

poljar commented Sep 25, 2025

Alright, the PR is ready for review, that being said:

I'm thinking of switching mautrix-python to use vodozemac, but the database needs to remain compatible with mautrix-go, which uses libolm or goolm.

This isn't a particularly great idea, since the conversion to a libolm pickle will always be a lossy operation. One of the reasons for this is because vodozemac can store much more one-time keys compared to libolm.

@tulir
Copy link
Member

tulir commented Sep 25, 2025

I assume it'll throw away the same keys that libolm would've thrown away at generation time? (as in the behavior is exactly the same either way)

I shouldn't have any need for more than 100 one-time keys nor more than 2 billion messages in an olm session

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.

5 participants