Skip to content

refactor: unify execution/proving versions and introduce protocol-versions.toml#1093

Open
tomg10-claude wants to merge 1 commit intomatter-labs:mainfrom
tomg10-claude:refactor/versions-registry-v3
Open

refactor: unify execution/proving versions and introduce protocol-versions.toml#1093
tomg10-claude wants to merge 1 commit intomatter-labs:mainfrom
tomg10-claude:refactor/versions-registry-v3

Conversation

@tomg10-claude
Copy link
Copy Markdown
Contributor

Summary

This PR does two things:

1. Merge execution version and proving version into forward system version

ExecutionVersion and ProvingVersion were separate enums representing different aspects of the same thing: a forward_system crate release. This PR unifies them into a single ForwardSystemVersion enum and renames execution_version()forward_system_version() across the codebase. The external BlockContext.execution_version field (from zksync_os_interface) is unchanged.

2. Introduce protocol-versions.toml as the single source of truth

All protocol version metadata — forward system version, VK hash, verifier version, crate references, and app binary tags — is now declared in a single TOML file at the workspace root. Two build scripts consume it:

  • lib/types/build.rs generates the ForwardSystemVersion enum, lookup functions (forward_system_version(), vk_hash(), app_bin_tag(), supported_versions()), and validates that crate/tag pairs in the TOML match Cargo.toml at compile time.
  • lib/multivm/build.rs generates app_bin_bytes(tag, variant) for in-memory app binary loading.

Adding a new protocol version is now a TOML-only change — no Rust code modifications needed.

Other changes

  • Rename Cargo dependency aliases to version-based names (zk_os_forward_system_v3, _v4) with the two latest kept as zk_os_forward_system and zk_os_forward_system_dev
  • Delete hand-maintained execution_version.rs and proving_version.rs
  • Delete tools/check-versions-toml.sh — replaced by compile-time validation in lib/types/build.rs
  • Bump tar 0.4.44 → 0.4.45 (RUSTSEC-2026-0068)

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features --workspace -- -D warnings
  • Unit tests pass
  • Integration tests pass

No new tests added — the build itself validates the TOML structure, and existing unit tests cover the generated lookup functions.

🤖 Generated with Claude Code

…sions.toml

- Merge ExecutionVersion and ProvingVersion into a single ForwardSystemVersion
  enum, rename execution_version() → forward_system_version() across codebase
- Add protocol-versions.toml as the single source of truth for all protocol
  version artifacts (forward system version, VK hash, crate refs, app binary tags)
- Generate ForwardSystemVersion enum and lookup functions at build time
  (lib/types/build.rs), validate TOML ↔ Cargo.toml consistency at compile time
- Generate app binary includes and lookup from TOML (lib/multivm/build.rs)
- Rename Cargo dependency aliases to version-based names (zk_os_forward_system_v3,
  _v4, etc.) with latest two kept as zk_os_forward_system / _dev
- Delete hand-maintained execution_version.rs, proving_version.rs, and
  tools/check-versions-toml.sh
- Bump tar 0.4.44 → 0.4.45 (RUSTSEC-2026-0068)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tomg10-claude tomg10-claude force-pushed the refactor/versions-registry-v3 branch from 4cd3349 to 3c62917 Compare March 26, 2026 12:18
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.

1 participant