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

[Feat] Introduce a test storage mode #12

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ljedrz
Copy link
Collaborator

@ljedrz ljedrz commented Jan 14, 2025

This PR proposes a new StorageMode::Test variant which may contain a TempDir (with feature = "rocks" in snarkOS/VM tests). It is intended to replace all current uses of impl From<Option<u16>> for StorageMode, which returns StorageMode::Production even in tests (which, without additional setup, would cause the dev's production database to be overwritten), which complicates their setup.

With these changes, we could simplify and unify the test storage setup in snarkOS, reducing the LoC related to storage by over 200.

@ljedrz
Copy link
Collaborator Author

ljedrz commented Jan 14, 2025

Note: semver-wise, the new aleo-std version should be at least 0.2, but I've followed the convention followed by this crate thus far. Happy to adjust it if we want to be compliant.

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.

1 participant