refactor: unify execution/proving versions and introduce protocol-versions.toml#1093
Open
tomg10-claude wants to merge 1 commit intomatter-labs:mainfrom
Open
refactor: unify execution/proving versions and introduce protocol-versions.toml#1093tomg10-claude wants to merge 1 commit intomatter-labs:mainfrom
tomg10-claude wants to merge 1 commit intomatter-labs:mainfrom
Conversation
…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>
4cd3349 to
3c62917
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR does two things:
1. Merge execution version and proving version into forward system version
ExecutionVersionandProvingVersionwere separate enums representing different aspects of the same thing: aforward_systemcrate release. This PR unifies them into a singleForwardSystemVersionenum and renamesexecution_version()→forward_system_version()across the codebase. The externalBlockContext.execution_versionfield (fromzksync_os_interface) is unchanged.2. Introduce
protocol-versions.tomlas the single source of truthAll 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.rsgenerates theForwardSystemVersionenum, lookup functions (forward_system_version(),vk_hash(),app_bin_tag(),supported_versions()), and validates that crate/tag pairs in the TOML matchCargo.tomlat compile time.lib/multivm/build.rsgeneratesapp_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
zk_os_forward_system_v3,_v4) with the two latest kept aszk_os_forward_systemandzk_os_forward_system_devexecution_version.rsandproving_version.rstools/check-versions-toml.sh— replaced by compile-time validation inlib/types/build.rstar0.4.44 → 0.4.45 (RUSTSEC-2026-0068)Test plan
cargo fmt --all -- --checkcargo clippy --all-targets --all-features --workspace -- -D warningsNo new tests added — the build itself validates the TOML structure, and existing unit tests cover the generated lookup functions.
🤖 Generated with Claude Code