Skip to content

feat(evm): make vm.snapshots persistent #5487

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 4 commits into from
Jul 28, 2023

Conversation

Evalir
Copy link
Member

@Evalir Evalir commented Jul 27, 2023

Motivation

Closes #5118

Right now snapshots are not persisted, and snapshots created after the snapshot to be deleted are also deleted.

Solution

Remove this legacy behavior by just persisting snapshots.

We now have a few more clones as a result of this, but it should be OK—this is an infrequent operation.

@Evalir Evalir requested a review from mattsse July 27, 2023 19:36
Comment on lines +117 to +119
let snapshot = { self.snapshots().lock().remove_at(id) };
if let Some(snapshot) = snapshot {
self.snapshots().lock().insert_at(snapshot.clone(), id);
Copy link
Member Author

Choose a reason for hiding this comment

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

Kind of looks like a deadlock from a glance but it's not haha—both guards are dropped on the spot

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vm.snapshot / vm.revertTo non deterministic
2 participants