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: vm2 tracers can access storage #3114

Merged
merged 4 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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 @@ -229,7 +229,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 = "df5bec3d04d64d434f9b0ccb285ba4681008f7b3" }

# Consensus dependencies.
zksync_concurrency = "=0.5.0"
Expand Down
4 changes: 2 additions & 2 deletions core/lib/multivm/src/versions/vm_fast/circuits_tracer.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use circuit_sequencer_api_1_5_0::{geometry_config::get_geometry_config, toolset::GeometryConfig};
use zksync_vm2::interface::{CycleStats, Opcode, OpcodeType, StateInterface, Tracer};
use zksync_vm2::interface::{CycleStats, GlobalStateInterface, Opcode, OpcodeType, Tracer};
use zksync_vm_interface::CircuitStatistic;

use crate::vm_latest::tracers::circuits_capacity::*;
Expand All @@ -24,7 +24,7 @@ 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: GlobalStateInterface>(&mut self, _: &mut S) {
self.main_vm_cycles += 1;

match OP::VALUE {
Expand Down
2 changes: 1 addition & 1 deletion core/tests/vm-benchmark/src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ impl<Tr: vm_fast::Tracer + Default + 'static> BenchmarkingVmFactory for Fast<Tr>
impl vm_fast::Tracer for InstructionCount {
fn before_instruction<
OP: zksync_vm2::interface::OpcodeType,
S: zksync_vm2::interface::StateInterface,
S: zksync_vm2::interface::GlobalStateInterface,
>(
&mut self,
_: &mut S,
Expand Down
4 changes: 2 additions & 2 deletions prover/Cargo.lock

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

Loading