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

db: refactor the crate #32

Merged
merged 2 commits into from
Apr 2, 2024
Merged

db: refactor the crate #32

merged 2 commits into from
Apr 2, 2024

Conversation

cchudant
Copy link
Member

Pull Request type

  • Refactoring

Resolves: #NA

What is the new behavior?

Got rid of kvdb and kvdb-rocksdb.

Does this introduce a breaking change?

N/A

Other information

All locks are removed, accesses to bonsai storages are mediated through the BonsaiStorageAccess wrapper, which you can use to do read accesses, or get a owned BonsaiStorage to make writes.
PersistentBonsaiDatabase is now implemented properly
All Backend db accesses are now using rocksdb directly

@cchudant cchudant marked this pull request as ready for review March 29, 2024 19:19
@cchudant
Copy link
Member Author

How should we proceed with #28 and this one? @Trantorian1

@cchudant cchudant requested review from Trantorian1 and antiyro March 29, 2024 19:28
Copy link
Member

@antiyro antiyro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I 100% approve those changes, great work!

@Trantorian1
Copy link
Collaborator

The idea would be be to merge #32 first. I can then go over it and migrate most of our Substrate storage into the new db. I'll be integrating that as part of #28 @cchudant

Copy link
Collaborator

@Trantorian1 Trantorian1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All seems good to me. Please just fix the state root and check the comments below. I'm wondering if errors in the state root might not have to do with how our writable Bonsai dbs are handled vs read-only ones.

crates/client/db/src/bonsai_db.rs Show resolved Hide resolved
crates/client/db/src/lib.rs Show resolved Hide resolved
crates/client/db/src/lib.rs Show resolved Hide resolved
crates/client/db/src/mapping_db.rs Show resolved Hide resolved
@Trantorian1 Trantorian1 self-requested a review April 2, 2024 09:15
@antiyro antiyro merged commit 2bfae6b into madara-alliance:main Apr 2, 2024
6 checks passed
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.

3 participants