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

In-memory prototype of MARF replace (SOAR-DB!) #213

Merged
merged 7 commits into from
Feb 20, 2023
Merged

Conversation

kantai
Copy link
Contributor

@kantai kantai commented Feb 13, 2023

Description

This PR implements an in-memory optimistic fork-aware data store, for replacing the MARF. The general idea with the datastore is to store the current data view as a normal key-value store and track the history of operations on the storage. When a fork occurs, the data state is unwound and then replayed.

This first PR just implements and tests a simple in-memory version of the data store, which unblocks work on integrating the db with the rest of the subnet node (that work is ongoing in the feat/soar-db branch.

Copy link
Member

@jbencin jbencin left a comment

Choose a reason for hiding this comment

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

Overall very nice code! I've only got a couple minor comments:

  • It seems like a lot of dependencies are declared in Cargo.toml but not used
  • I'd recommend putting //! comments at the top of each file, it makes navigating documentation easier

@codecov-commenter
Copy link

codecov-commenter commented Feb 20, 2023

Codecov Report

Merging #213 (4712f42) into master (54c653c) will increase coverage by 0.85%.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master     #213      +/-   ##
==========================================
+ Coverage   91.19%   92.04%   +0.85%     
==========================================
  Files           6        6              
  Lines         284      327      +43     
==========================================
+ Hits          259      301      +42     
- Misses         25       26       +1     
Impacted Files Coverage Δ
core-contracts/contracts/helper/simple-ft.clar 76.47% <ø> (ø)
...contracts/contracts/helper/simple-nft-no-mint.clar 66.66% <ø> (ø)
core-contracts/contracts/helper/simple-nft.clar 73.33% <ø> (ø)
core-contracts/contracts/multi-miner.clar 97.05% <ø> (ø)
core-contracts/contracts/subnet.clar 94.75% <ø> (+0.61%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@kantai
Copy link
Contributor Author

kantai commented Feb 20, 2023

Thanks for the review! I eliminated the unused dependencies (which aren't getting used in a subsequent PR) and also added rustdoc inline (//!) comments to the files.

@kantai kantai merged commit 31967bb into master Feb 20, 2023
@kantai kantai deleted the feat/soardb-initial branch February 20, 2023 18:36
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