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(vm): Do not panic on VM divergence #2705

Merged
merged 33 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
bf09d5b
Sketch customizable error reporting
slowli Aug 21, 2024
1abd71f
Sketch VM state dumping
slowli Aug 21, 2024
a07eddc
Fix contract hashes diff
slowli Aug 21, 2024
f42faaf
Set VM dumps dir in VM playground
slowli Aug 21, 2024
743353c
Add other storage data to VM dump
slowli Aug 21, 2024
47e31cc
Sketch GCS-based dump handler
slowli Aug 22, 2024
b0ecc34
Generalize shadowing
slowli Aug 22, 2024
1eef7e2
Sketch shadowing tests
slowli Aug 22, 2024
ca7a0b9
Fix dumping state at middle of batch execution
slowli Aug 22, 2024
3cfd126
Move `ContractToDeploy` to test utils
slowli Aug 22, 2024
0e0671e
Brush up shadow VM tests
slowli Aug 22, 2024
d8418a4
Implement VM dump playback
slowli Aug 22, 2024
dba1a30
Update from upstream
slowli Aug 22, 2024
ab4adc5
Document `VmStorageDump` contents
slowli Aug 22, 2024
950bc84
Sketch `DumpingVm`
slowli Aug 27, 2024
ad0b88d
Fix decommitted bytecodes computation
slowli Aug 27, 2024
b32ef56
Wrap dump handler in newtype
slowli Aug 27, 2024
82133c9
Generalize main VM in `ShadowVm` (again)
slowli Aug 27, 2024
810fa2c
Update from upstream
slowli Aug 27, 2024
82eee6a
Replace dump handler with divergence handler
slowli Aug 28, 2024
1b2cf54
Remove `ShadowLenient` VM mode
slowli Aug 28, 2024
b518709
Update from upstream
slowli Aug 28, 2024
a950e18
Update from upstream
slowli Sep 2, 2024
b3c84cb
Use `StorageSnapshot` in VM dumps
slowli Sep 2, 2024
e5e3830
Update from upstream
slowli Sep 3, 2024
ec76fd4
Move `DumpingVm` and `ShadowVm` to interface crate
slowli Sep 3, 2024
2de0050
Fix formatting
slowli Sep 4, 2024
78d5aae
Update from upstream
slowli Sep 4, 2024
c657d23
Update from upstream
slowli Sep 5, 2024
f1c0f4b
Update from upstream
slowli Sep 17, 2024
acb11a3
Remove obsolete module
slowli Sep 20, 2024
25de844
Update from upstream
slowli Sep 20, 2024
097b885
Fix formatting
slowli Sep 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion core/lib/basic_types/src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ pub enum FastVmMode {
/// Run only the old VM.
#[default]
Old,
/// Run only the new Vm.
/// Run only the new VM.
New,
/// Run both the new and old VM and compare their outputs for each transaction execution.
/// The VM will panic on divergence.
Shadow,
}
2 changes: 1 addition & 1 deletion core/lib/multivm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ anyhow.workspace = true
hex.workspace = true
itertools.workspace = true
once_cell.workspace = true
pretty_assertions.workspace = true
thiserror.workspace = true
tracing.workspace = true
vise.workspace = true

[dev-dependencies]
assert_matches.workspace = true
pretty_assertions.workspace = true
tokio = { workspace = true, features = ["time"] }
zksync_test_account.workspace = true
ethabi.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion core/lib/multivm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ pub use crate::{
mod glue;
pub mod tracers;
pub mod utils;
pub mod versions;
mod versions;
mod vm_instance;
5 changes: 4 additions & 1 deletion core/lib/multivm/src/versions/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
pub mod shadow;
mod shared;
#[cfg(test)]
mod testonly;
#[cfg(test)]
mod tests;
pub mod vm_1_3_2;
pub mod vm_1_4_1;
pub mod vm_1_4_2;
Expand Down
305 changes: 0 additions & 305 deletions core/lib/multivm/src/versions/shadow.rs

This file was deleted.

Loading
Loading