Skip to content

feat(v32)!: Update vm2 - #4912

Open
deniallugo-ml wants to merge 5 commits into
mainfrom
deniallugo-update-vm2
Open

feat(v32)!: Update vm2#4912
deniallugo-ml wants to merge 5 commits into
mainfrom
deniallugo-update-vm2

Conversation

@deniallugo-ml

Copy link
Copy Markdown
Contributor

What ❔

Why ❔

Is this a breaking change?

  • Yes
  • No

Operational changes

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted via zkstack dev fmt and zkstack dev lint.

Signed-off-by: Danil Lugovskoi <dl@matterlabs.dev>
@deniallugo-ml
deniallugo-ml force-pushed the deniallugo-update-vm2 branch from 3d21a9d to 254a13f Compare July 20, 2026 10:26
The verifier repo's crates/ were copied from core/lib and accumulated
fixes that were never merged back. This ports the three logical ones:

- vm_fast: compute `deduplicated_storage_logs` via
`sort_storage_access_queries` over raw storage log queries, matching
vm_latest, instead of `get_storage_changes()` which drops
write-then-restore slots. Includes a field-by-field LogQuery bridge
because vm2's `zk_evm_abstractions` (git branch) is a different crate
instance than circuit_sequencer_api's (crates.io) at the same version.
- types: fail loudly on >u16::MAX initial writes and >u24 compressed
length in state-diff compression instead of silently truncating pubdata.
- vm_interface: reject revert-reason words exceeding usize::MAX with a
parse error instead of panicking in `U256::as_usize`; overflow-safe
length bound.

Also fixes the vm_fast test helper broken by the vm2 update
(`get_storage_state()` now returns `StorageWriteEntry`) and documents
the bytecode-cache safety invariant in `world.rs`.

## What ❔

<!-- What are the changes this PR brings about? -->
<!-- Example: This PR adds a PR template to the repo. -->
<!-- (For bigger PRs adding more context is appreciated) -->

## Why ❔

<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- The `Why` has to be clear to non-Matter Labs entities running their
own ZK Chain -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->

## Is this a breaking change?
- [ ] Yes
- [ ] No

## Operational changes
<!-- Any config changes? Any new flags? Any changes to any scripts? -->
<!-- Please add anything that non-Matter Labs entities running their own
ZK Chain may need to know -->

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [ ] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [ ] Code has been formatted via `zkstack dev fmt` and `zkstack dev
lint`.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@deniallugo-ml deniallugo-ml changed the title Update vm2 feat(v32)!: Update vm2 Jul 20, 2026
deniallugo-ml and others added 3 commits July 21, 2026 14:49
zksync-protocol and zksync-crypto-gpu are no longer published to crates.io
(protocol has a git-only airbender-crypto dependency), so pin their crates by
git. Protocol crates -> tag v0.153.13; crypto-gpu -> rev (TODO: swap to release
tag once cut); vm2 rev bumped to the tag-pinned commit so protocol unifies on a
single source. zksync-crypto and historical zk_evm versions stay on crates.io.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
vm2 and zksync-crypto-gpu are now released with their zksync-protocol git-tag
pins, so replace the interim rev pins with the release tags. Protocol stays on
tag v0.153.13. Lockfiles regenerated; both workspaces resolve to a single
unified protocol source.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Danil Lugovskoi <dl@matterlabs.dev>
@deniallugo-ml
deniallugo-ml force-pushed the deniallugo-update-vm2 branch from f3903e0 to 7596713 Compare July 21, 2026 16:11
@deniallugo-ml
deniallugo-ml requested a review from vladbochok July 23, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants