Skip to content

Commit

Permalink
feat(vm): Extract batch executor to separate crate (#2702)
Browse files Browse the repository at this point in the history
## What ❔

- Extracts batch executor from `zksync_state_keeper` into a separate
crate, `zksync_vm_executor`. Places batch executor interfaces in
`zksync_vm_interface`.
- Moves `zksync_vm_utils` remains to this crate, too.
- Removes dependency on the `zksync_state_keeper` in the VM runner.

## Why ❔

Improves encapsulation and versatility (e.g., when using custom VMs).

## Checklist

- [x] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [x] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [x] Code has been formatted via `zk fmt` and `zk lint`.
  • Loading branch information
slowli authored Sep 3, 2024
1 parent 8773ee1 commit b82dfa4
Show file tree
Hide file tree
Showing 56 changed files with 1,051 additions and 1,035 deletions.
41 changes: 23 additions & 18 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ members = [
"core/lib/vlog",
"core/lib/multivm",
"core/lib/vm_interface",
"core/lib/vm_utils",
"core/lib/vm_executor",
"core/lib/web3_decl",
"core/lib/snapshots_applier",
"core/lib/crypto_primitives",
Expand Down Expand Up @@ -236,7 +236,7 @@ zksync_multivm = { version = "0.1.0", path = "core/lib/multivm" }
zksync_prover_dal = { version = "0.1.0", path = "prover/crates/lib/prover_dal" }
zksync_vlog = { version = "0.1.0", path = "core/lib/vlog" }
zksync_vm_interface = { version = "0.1.0", path = "core/lib/vm_interface" }
zksync_vm_utils = { version = "0.1.0", path = "core/lib/vm_utils" }
zksync_vm_executor = { version = "0.1.0", path = "core/lib/vm_executor" }
zksync_basic_types = { version = "0.1.0", path = "core/lib/basic_types" }
zksync_circuit_breaker = { version = "0.1.0", path = "core/lib/circuit_breaker" }
zksync_config = { version = "0.1.0", path = "core/lib/config" }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "zksync_vm_utils"
description = "ZKsync VM utilities"
name = "zksync_vm_executor"
description = "Implementations of ZKsync VM executors"
version.workspace = true
edition.workspace = true
authors.workspace = true
Expand All @@ -14,8 +14,11 @@ categories.workspace = true
zksync_contracts.workspace = true
zksync_dal.workspace = true
zksync_types.workspace = true
zksync_vm_interface.workspace = true
zksync_multivm.workspace = true

async-trait.workspace = true
once_cell.workspace = true
tokio.workspace = true
anyhow.workspace = true
tracing.workspace = true
vise.workspace = true
Loading

0 comments on commit b82dfa4

Please sign in to comment.