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

Add a way to migrate a crypto store from Sled to SQLite #26

Open
AndrewFerr opened this issue Aug 2, 2023 · 0 comments
Open

Add a way to migrate a crypto store from Sled to SQLite #26

AndrewFerr opened this issue Aug 2, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@AndrewFerr
Copy link
Member

Is your feature request related to a problem? Please describe.
The Rust SDK crypto crate recently dropped support for the Sled-based crypto store (matrix-org/matrix-rust-sdk@3e2bc3a51). Thus, any release of the Node bindings made since then won't be able to use a Sled crypto store & must use SQLite instead.

As such, anything that uses the bot-sdk with crypto may need to convert an existing Sled crypto store it may have to a SQLite one.

This isn't a problem for bots/appservices that don't need historical access to encrypted events, which can start a new crypto store from scratch (and register brand new crypto-enabled devices). But not all projects that are out there may be as lucky.

Describe the solution you'd like
There should be a utility (like a yarn script) for converting an existing Sled crypto store to a SQLite one.

The FFI crypto bindings provide an example on how to achieve this. From a discussion in #matrix-rust-sdk:matrix.org:

there's a general purpose migrate() method in the crypto-ffi bindings, but that was used to migrate from whatever Element iOS and Element Android use to the SQLite crypto store

so technically you could use that method to migrate from anything to the SQLite store, but there isn't a nice convenience method that achieves that for the sled store

Describe alternatives you've considered
An alternative is to forego all this and hope that no one is relying on a Sled crypto store.

Additional context
The bulk of the work to achieve this may be in the Node bindings, not here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant