spacemeshos / svm

SVM - Spacemesh Virtual Machine
https://spacemesh.io
MIT License
85 stars 14 forks source link

Initializiting SVM's environment with `GlobalState` and replacing old storage layer logic #370

Closed neysofu closed 3 years ago

neysofu commented 3 years ago

As per title.

This PR requires significant changes to the old storage layer logic (Env), which is now replaced by svm_state::GlobalState. We also want to remove the old default-rocksdb feature flag. At the moment, we're currently using SQLite, which can easily spawn instances in memory, and thus doesn't require mocking. I propose that, if we ever decide to come back to RocksDB for performance reasons, we use temporary file storage rather than mocking, which would unify code paths and likely remove a whole class of bugs due to inconsistent behavior in testing/production.