Skip to content

Commit

Permalink
feat: vm2 tracers can access storage
Browse files Browse the repository at this point in the history
  • Loading branch information
joonazan committed Oct 16, 2024
1 parent 525ba9f commit 4fd710c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ zk_evm_1_4_1 = { package = "zk_evm", version = "0.141" }
zk_evm_1_5_0 = { package = "zk_evm", version = "=0.150.5" }

# New VM; pinned to a specific commit because of instability
zksync_vm2 = { git = "https://github.com/matter-labs/vm2.git", rev = "a233d44bbe61dc6a758a754c3b78fe4f83e56699" }
zksync_vm2 = { git = "https://github.com/matter-labs/vm2.git", rev = "f27d9ff086032ab9c382e0baa7244bd247d10e49" }

# Consensus dependencies.
zksync_concurrency = "=0.5.0"
Expand Down
6 changes: 5 additions & 1 deletion core/lib/multivm/src/versions/vm_fast/circuits_tracer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ pub struct CircuitsTracer {
}

impl Tracer for CircuitsTracer {
fn after_instruction<OP: OpcodeType, S: StateInterface>(&mut self, _state: &mut S) {
fn after_instruction<OP: OpcodeType, S: StateInterface>(
&mut self,
_: &mut S,
_: &mut S::StorageInterface,
) {
self.main_vm_cycles += 1;

match OP::VALUE {
Expand Down
1 change: 1 addition & 0 deletions core/tests/vm-benchmark/src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ impl<Tr: vm_fast::Tracer + Default + 'static> BenchmarkingVmFactory for Fast<Tr>
>(
&mut self,
_: &mut S,
_: &mut S::StorageInterface,
) {
self.0 += 1;
}
Expand Down

0 comments on commit 4fd710c

Please sign in to comment.