Add an alternative storage back-end implementation using redb#1914
Closed
pingu-73 wants to merge 3 commits intobitcoindevkit:masterfrom
Closed
Add an alternative storage back-end implementation using redb#1914pingu-73 wants to merge 3 commits intobitcoindevkit:masterfrom
pingu-73 wants to merge 3 commits intobitcoindevkit:masterfrom
Conversation
Signed-off-by: Dikshant <dikshant.073@gmail.com>
Signed-off-by: Dikshant <dikshant.073@gmail.com>
Signed-off-by: Dikshant <dikshant.073@gmail.com>
Author
|
@evanlinjin can you please approve workflow to run on this draft |
Author
|
@evanlinjin i'm failing test_reorg_is_detected_in_electrsd during |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a new storage backend implementation for BDK wallet using redb, a pure-Rust key-value store. This implementation provides an alternative to the existing SQLite and file_store backends, giving users more flexibility in how they store their wallet data.
The implementation includes:
bdk_redbcrate with an implementation of theWalletPersistertraitRelated to issue: bitcoindevkit/bdk_wallet#420, #691, bitcoindevkit/bdk_wallet#34
Notes to the reviewers
The implementation follows a similar pattern to the existing file_store backend. I chose to implement the redb backend in a separate crate to avoid adding direct dependencies to the wallet crate and to maintain separation of concerns.
The redb implementation stores each component of the ChangeSet separately, which allows for efficient updates and retrieval. I've added basic tests to verify the implementation works correctly, but would appreciate feedback on edge cases that should be tested.
Changelog notice
uses unsafe rust !! [compulsory because redb v0.8.0 had marked some functions unsafe they are not unsafe in latest version of redb]
Checklists
All Submissions:
cargo fmtandcargo clippybefore committingNew Features:
Todo: