bitcoindevkit / bitcoindevkit/bdk_wallet
Turso implementation for `WalletPersister`
- Dominant language
- Rust
- Stars
- 59
- Forks
- 105
- Avg merge
- 10d 9h
- Merged PRs (30d)
- 1
Description
**Description**
Turso is an in-process SQL database, compatible with SQLite. Besides being implemented natively in Rust it also provides on-disk/at-rest data encryption. It would be useful to add `turso` as a `WalletPersister` implementation that also includes an option to enable on-disk encryption.
**Expected Outcomes**
* Create a new `bdk_turso` crate similar to the `bdk_redb` crate.
* Add an implementation of the [WalletPersister](https://docs.rs/bdk_wallet/latest/bdk_wallet/trait.WalletPersister.html) trait for the new `bdk_turso` data store.
* In the `bdk_turso` crate include a feature to enable on-disk encryption. It should also include helper function to securely generate a 256 bit encryption key, re-key an existing database with a new key and add encryption to an unencrypted database.
* Add tests in `bdk_turso` to confirm data is accurately stored and retrieved with and without encryption enabled.
* Create an example similar to [SQLite Database](https://bookofbdk.com/cookbook/persistence/sqlite/) that demonstrates using `bdk_turso` instead of `sqlite`, with and without encryption enabled.
**Resources**
- [bdk_wallet](https://github.com/bitcoindevkit/bdk/tree/master/crates/wallet)
- [turso](https://github.com/tursodatabase/turso)
- [WalletPersister Trait](https://docs.rs/bdk_wallet/latest/bdk_wallet/trait.WalletPersister.html#foreign-impls)
- [bdk_redb](https://github.com/110CodingP/bdk_redb)
**Skills Required**
- Experience with git. [Guide](https://git-scm.com/book/en/v2)
- Experience with rust. [First seven chapters of the book](https://doc.rust-lang.org/book/)
- Able to setup a local core node in regtest and testnet mode.
- Familiarity with database technologies like SQL and SQLite.
**Mentor(s)**
@notmandatory
**Difficulty**
Hard
**Competency Test**
* Install rust, compile and run all bdk examples and tests.
* Setup a local Bitcoin Core node daemon in regtest mode.
* Make a wallet with `bitcoind_rpc` example wallet and receive and send regtest bitcoin.
Contributor guide
Assessment
This issue has not been assessed yet.