-
Notifications
You must be signed in to change notification settings - Fork 416
Description
Summer of Bitcoin Project Proposal
Description
Wallets built with the bdk_wallet library currently have two implementations of the WalletPersister trait: sqlite and file_store. It would be useful to add an alternative storage back-end implementation using redb, a pure-Rust key-value store.
Expected Outcomes
- Create a new
bdk_redbcrate similar to thebdk_file_storecrate. - Add an implementation of the WalletPersister trait for the new
bdk_redbdata store. - Add tests in
bdk_redbandbdk_walletto confirm data is accurately stored and retrieved. - Add a new
bdk_walletfeature calledredbthat enables the thebdk_redbimplementation ofWalletPersister. - Create an example similar to
example_wallet_esplora_blockingthat demonstrates usingbdk_redbinstead offile_store.
Resources
- bdk_wallet
- bdk_file_store
- rusqlite_impl.rs
- redb
- WalletPersister Trait
- example_wallet_esplora_blocking
- mempool.space version of electrs
Skills Required
- Experience with git. Guide
- Experience with rust. First seven chapters of the 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.
- Setup a local regtest esplora API server using the mempool.space version of
electrs. - Make a wallet with
example_wallet_esplora_blockingexample wallet and receive and send regtest bitcoin.
Original Description
Discussed in #691
Originally posted by casey July 30, 2022
redb is a pure-Rust key-value store, and would be a good candidate for an alternative back-end. It is secure against data loss in some cases which sled probably isn't. It is still alpha quality, and the on-disk format has not been finalized, so it might not be quite ready yet, but could be good to watch for the future.
I mention this because I had issues building a binary on a Linux box due to the SQLite backend, and I don't personally believe that sled is mature enough to be used for production workloads, so another option would be nice.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status