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

ref: move storage to its own crate #87

Merged
merged 6 commits into from
Apr 16, 2024
Merged

Conversation

zeapoz
Copy link
Member

@zeapoz zeapoz commented Apr 15, 2024

This is the first step towards being able to create snapshots out of the current merkle tree state. Previously we had two separate databases defined in the main crate, InnerDB & SnapshotDB. This PR moves them into a new one, state-reconstruction-storage, and also renames them as follows:

  • InnerDB -> ReconstructionDatabase
  • SnapshotDB -> SnapshotDatabase

@zeapoz zeapoz requested a review from vbar April 15, 2024 12:45
@zeapoz zeapoz self-assigned this Apr 15, 2024
@zeapoz zeapoz requested a review from vbar April 16, 2024 10:44
state-reconstruct-storage/src/reconstruction.rs Outdated Show resolved Hide resolved
idx_bytes[7],
])
} else {
self.put_cf(metadata, LAST_REPEATED_KEY_INDEX, u64::to_be_bytes(0))?;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I always wondered what this was for?

Copy link
Member Author

Choose a reason for hiding this comment

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

As I understood it, that would just ensure that we put in an entry if we didn't have one before. Though, since we update it after every new initial write anyways I don't think we need that

@vbar vbar self-requested a review April 16, 2024 12:13
@zeapoz zeapoz merged commit 3df0707 into main Apr 16, 2024
4 checks passed
@zeapoz zeapoz deleted the ref/storage-database-crate branch April 16, 2024 12:22
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.

2 participants