diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c2dae47f6..a6f9fc991 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,7 +95,7 @@ jobs: - uses: actions/checkout@v4 with: repository: matter-labs/era-evm-tester - ref: zk-ee-with-blockchain-tests + ref: zk-ee-with-blockchain-tests-renamed path: era-evm-tester - name: Use local ZKsync OS version working-directory: ./era-evm-tester/evm_tester @@ -135,8 +135,8 @@ jobs: path: zksync-os - uses: actions/checkout@v4 with: - repository: matter-labs/era-evm-tester - ref: zk-ee + repository: matter-labs/era-evm-tester + ref: zk-ee-renamed path: era-evm-tester - name: Use local ZKsync OS version working-directory: ./era-evm-tester/evm_tester diff --git a/Cargo.toml b/Cargo.toml index fa11d1d69..438cb29c0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -68,6 +68,21 @@ prover_examples = { git = "https://github.com/matter-labs/zksync-airbender", tag execution_utils = { git = "https://github.com/matter-labs/zksync-airbender", tag = "v0.4.3"} prover = { git = "https://github.com/matter-labs/zksync-airbender", tag = "v0.4.3" } +forward_system = { package = "zksync_os_forward_system", path = "forward_system"} +oracle_provider = { package = "zksync_os_oracle_provider", path = "oracle_provider" } +callable_oracles = { package = "zksync_os_callable_oracles", path = "callable_oracles" } +zksync_os_runner = { path = "zksync_os_runner"} +zk_ee = { package = "zksync_os_ee", path = "zk_ee", default-features = false } +crypto = { package = "zksync_os_crypto", path = "crypto", default-features = false } +basic_system = { package = "zksync_os_basic_system", path = "basic_system", default-features = false } +basic_bootloader = { package = "zksync_os_basic_bootloader", path = "basic_bootloader", default-features = false } +evm_interpreter = { package = "zksync_os_evm_interpreter", path = "evm_interpreter", default-features = false } +cycle_marker = { package = "zksync_os_cycle_marker", path = "cycle_marker" } +storage_models = { package = "zksync_os_storage_models", path = "storage_models", default-features = false } +system_hooks = { package = "zksync_os_system_hooks", path = "system_hooks", default-features = false } +zksync_os_api = { path = "api" } +modexp = { package = "zksync_os_modexp", path = "supporting_crates/modexp" } + # [profile.dev] # opt-level = 0 # lto = false diff --git a/README.md b/README.md index 3b2f57bd1..ecbc2c4a0 100644 --- a/README.md +++ b/README.md @@ -14,13 +14,13 @@ The most recent documentation can be found here: The project contains the following crates (the list is not complete): -* [zk_ee](./zk_ee/) - execution environment +* [zksync_os_ee](./zk_ee/) - execution environment * [zksync_os](./zksync_os/) - operating system - that can handle multiple execution environments. Compiled into RISC-V. * [zksync_os_runner](./zksync_os_runner/) - allows running programs on zksync_os using RISC-V simulator. -* [basic_system](./basic_system/) - basic implementation of zk_ee::system and system functions -* [basic_bootloader](./basic_bootloader/) - implementation of bootloader and main execution loop -* [evm_interpreter](./evm_interpreter/) - EVM execution environment -* [forward_system](./forward_system/) - implementation for "forward" running (sequencing) +* [zksync_os_basic_system](./basic_system/) - basic implementation of zk_ee::system and system functions +* [zksync_os_basic_bootloader](./basic_bootloader/) - implementation of bootloader and main execution loop +* [zksync_os_evm_interpreter](./evm_interpreter/) - EVM execution environment +* [zksync_os_forward_system](./forward_system/) - implementation for "forward" running (sequencing) ## How to build diff --git a/api/Cargo.toml b/api/Cargo.toml index 107923de0..07bbbfaad 100644 --- a/api/Cargo.toml +++ b/api/Cargo.toml @@ -11,15 +11,15 @@ categories.workspace = true [dependencies] -forward_system = { path = "../forward_system"} -oracle_provider = { path = "../oracle_provider" } -callable_oracles = { path = "../callable_oracles/" } -zksync_os_runner = { path = "../zksync_os_runner"} +forward_system = { workspace = true} +oracle_provider = { workspace = true } +callable_oracles = { workspace = true } +zksync_os_runner = { workspace = true} risc_v_simulator = { workspace = true } -zk_ee = { path = "../zk_ee" } -crypto = { path = "../crypto" } -basic_system = { path = "../basic_system" } -evm_interpreter = { path = "../evm_interpreter" } +zk_ee = { workspace = true } +crypto = { workspace = true } +basic_system = { workspace = true } +evm_interpreter = { workspace = true } ruint = { version = "1.12.3", default-features = false, features = ["alloc"] } alloy = { version = "=1", default-features = false, features = ["eip712", "consensus", "rpc-types", "signer-local", "dyn-abi", "network"] } diff --git a/basic_bootloader/Cargo.toml b/basic_bootloader/Cargo.toml index 12479611f..cc7b9e774 100644 --- a/basic_bootloader/Cargo.toml +++ b/basic_bootloader/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "basic_bootloader" +name = "zksync_os_basic_bootloader" version.workspace = true edition.workspace = true authors.workspace = true @@ -10,13 +10,13 @@ keywords.workspace = true categories.workspace = true [dependencies] -zk_ee = { path = "../zk_ee", default-features = false } -cycle_marker = { path = "../cycle_marker" } -evm_interpreter = { path = "../evm_interpreter", default-features = false } -system_hooks = { path = "../system_hooks", default-features = false } -basic_system = { path = "../basic_system", default-features = false } +zk_ee = { workspace = true, default-features = false } +cycle_marker = { workspace = true } +evm_interpreter = { workspace = true, default-features = false } +system_hooks = { workspace = true, default-features = false } +basic_system = { workspace = true, default-features = false } ruint = { version = "1.12.3", default-features = false, features = ["alloc"] } -crypto = { path = "../crypto", default-features = false } +crypto = { workspace = true, default-features = false } hex = {version = "*", optional = true} arrayvec = { version = "0.7.4", default-features = false } strum_macros = "0.27.1" diff --git a/basic_system/Cargo.toml b/basic_system/Cargo.toml index 03018d24a..e2d02c4a9 100644 --- a/basic_system/Cargo.toml +++ b/basic_system/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "basic_system" +name = "zksync_os_basic_system" version.workspace = true edition.workspace = true authors.workspace = true @@ -10,15 +10,15 @@ keywords.workspace = true categories.workspace = true [dependencies] -zk_ee = { path = "../zk_ee", default-features = false } -evm_interpreter = { path = "../evm_interpreter" } +zk_ee = { workspace = true, default-features = false } +evm_interpreter = { workspace = true } ruint = { version = "1.12.3", default-features = false, features = ["alloc"] } -crypto = { path = "../crypto", default-features = false, features = ["secp256k1-static-context"]} +crypto = { workspace = true, default-features = false, features = ["secp256k1-static-context"]} arrayvec = { version = "0.7.4", default-features = false } either = { version = "*", default-features = false } -storage_models = { path = "../storage_models", default-features = false } -modexp = { path = "../supporting_crates/modexp" } -cycle_marker = { path = "../cycle_marker" } +storage_models = { workspace = true, default-features = false } +modexp = { workspace = true } +cycle_marker = { workspace = true } cfg-if = "1.0.0" const_for = "0.1.5" @@ -43,7 +43,7 @@ multiblock-batch = [] [dev-dependencies] hex = {version = "0.4.3"} proptest = "1.6.0" -crypto = { path = "../crypto", default-features = false, features = ["secp256k1-static-context", "testing"]} +crypto = { workspace = true, default-features = false, features = ["secp256k1-static-context", "testing"]} num-bigint = "*" num-traits = "*" arbitrary = { version = "1", features = ["derive"] } diff --git a/callable_oracles/Cargo.toml b/callable_oracles/Cargo.toml index d6c640893..30008605f 100644 --- a/callable_oracles/Cargo.toml +++ b/callable_oracles/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "callable_oracles" +name = "zksync_os_callable_oracles" version.workspace = true edition.workspace = true authors.workspace = true @@ -10,10 +10,10 @@ keywords.workspace = true categories.workspace = true [dependencies] -zk_ee = { path = "../zk_ee", default-features = false } +zk_ee = { workspace = true, default-features = false } ruint = { version = "1.12.3", default-features = false, features = ["alloc"] } -crypto = { path = "../crypto", default-features = false } -oracle_provider = { path = "../oracle_provider" } +crypto = { workspace = true, default-features = false } +oracle_provider = { workspace = true } risc_v_simulator = { workspace = true, optional = true } num-bigint = { version = "*", optional = true } diff --git a/crypto/Cargo.toml b/crypto/Cargo.toml index 6f7178074..cc91772cd 100644 --- a/crypto/Cargo.toml +++ b/crypto/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "crypto" +name = "zksync_os_crypto" version.workspace = true edition.workspace = true authors.workspace = true diff --git a/crypto/src/blake2s/test_program/Cargo.toml b/crypto/src/blake2s/test_program/Cargo.toml index ddca4695f..a0bc5bba1 100644 --- a/crypto/src/blake2s/test_program/Cargo.toml +++ b/crypto/src/blake2s/test_program/Cargo.toml @@ -11,7 +11,7 @@ categories = ["cryptography"] [dependencies] riscv_common = {git = "https://github.com/matter-labs/zksync-airbender", tag = "v0.4.3"} -crypto = { path = "../../../", features = ["blake2s_tests"]} +crypto = { package = "zksync_os_crypto", path = "../../../", features = ["blake2s_tests"]} [workspace] diff --git a/crypto/tests/secp256k1.rs b/crypto/tests/secp256k1.rs index a6601c661..d62aa359a 100644 --- a/crypto/tests/secp256k1.rs +++ b/crypto/tests/secp256k1.rs @@ -1,5 +1,5 @@ -use crypto::secp256k1::recover; -use crypto::{ +use zksync_os_crypto::secp256k1::recover; +use zksync_os_crypto::{ k256::elliptic_curve::{ops::Reduce, rand_core::OsRng}, k256::{ ecdsa::{hazmat::bits2field, SigningKey}, @@ -61,8 +61,8 @@ fn selftest() { let public_key = private_key.verifying_key().as_affine(); let (signature, recovery_id) = private_key.sign_prehash_recoverable(&digest).unwrap(); - let msg = >::reduce_bytes( - &bits2field::(&digest) + let msg = >::reduce_bytes( + &bits2field::(&digest) .map_err(|_| ()) .unwrap(), ); diff --git a/crypto/tests/secp256r1.rs b/crypto/tests/secp256r1.rs index 90d58ee91..3ddef7ddf 100644 --- a/crypto/tests/secp256r1.rs +++ b/crypto/tests/secp256r1.rs @@ -1,4 +1,5 @@ -use crypto::{ +use proptest::prelude::*; +use zksync_os_crypto::{ p256::{ ecdsa::{ signature::hazmat::{PrehashSigner, PrehashVerifier}, @@ -9,7 +10,6 @@ use crypto::{ secp256r1::verify, sha3::{Digest, Keccak256}, }; -use proptest::prelude::*; fn split_signature(sig: &Signature) -> ([u8; 32], [u8; 32]) { let r_bytes = sig.r().to_bytes(); diff --git a/cycle_marker/Cargo.toml b/cycle_marker/Cargo.toml index ad6557581..e7e583018 100644 --- a/cycle_marker/Cargo.toml +++ b/cycle_marker/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "cycle_marker" +name = "zksync_os_cycle_marker" edition = "2024" authors.workspace = true homepage.workspace = true diff --git a/evm_interpreter/Cargo.toml b/evm_interpreter/Cargo.toml index 3df5ffea2..84623cdae 100644 --- a/evm_interpreter/Cargo.toml +++ b/evm_interpreter/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "evm_interpreter" +name = "zksync_os_evm_interpreter" version.workspace = true edition.workspace = true authors.workspace = true @@ -13,11 +13,11 @@ categories.workspace = true [dependencies] ruint = { version = "1.12.3", default-features = false, features = ["alloc"] } -zk_ee = { path = "../zk_ee", default-features = false } -crypto = { path = "../crypto", default-features = false } +zk_ee = { workspace = true, default-features = false } +crypto = { workspace = true, default-features = false } arrayvec = { version = "0.7.4", default-features = false } either = { version = "*", default-features = false } -cycle_marker = { path = "../cycle_marker" } +cycle_marker = { workspace = true } strum_macros = "0.27.1" paste = "1.0.15" diff --git a/forward_system/Cargo.toml b/forward_system/Cargo.toml index 488224bd3..b36dda26a 100644 --- a/forward_system/Cargo.toml +++ b/forward_system/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "forward_system" +name = "zksync_os_forward_system" version.workspace = true edition.workspace = true authors.workspace = true @@ -13,13 +13,13 @@ categories.workspace = true [dependencies] # temporary for witgen -zksync_os_runner = {path = "../zksync_os_runner"} -oracle_provider = { path = "../oracle_provider" } -callable_oracles = { path = "../callable_oracles" } -zk_ee = { path = "../zk_ee", default-features = false } -evm_interpreter = { path = "../evm_interpreter", default-features = false } -basic_system = { path = "../basic_system", default-features = false } -basic_bootloader = { path = "../basic_bootloader", default-features = false } +zksync_os_runner = { workspace = true } +oracle_provider = { workspace = true } +callable_oracles = { workspace = true } +zk_ee = { workspace = true, default-features = false } +evm_interpreter = { workspace = true, default-features = false } +basic_system = { workspace = true, default-features = false } +basic_bootloader = { workspace = true, default-features = false } zksync_os_interface = { workspace = true, default-features = false } ruint = { version = "1.12.3", default-features = false, features = ["alloc"] } diff --git a/oracle_provider/Cargo.toml b/oracle_provider/Cargo.toml index b953dc2f9..7aa3878e5 100644 --- a/oracle_provider/Cargo.toml +++ b/oracle_provider/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "oracle_provider" +name = "zksync_os_oracle_provider" version.workspace = true edition.workspace = true authors.workspace = true @@ -10,5 +10,5 @@ keywords.workspace = true categories.workspace = true [dependencies] -zk_ee = { path = "../zk_ee", default-features = false } +zk_ee = { workspace = true, default-features = false } risc_v_simulator = { workspace = true } diff --git a/proof_running_system/Cargo.toml b/proof_running_system/Cargo.toml index e25be6b29..9ad74a71d 100644 --- a/proof_running_system/Cargo.toml +++ b/proof_running_system/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "proof_running_system" +name = "zksync_os_proof_running_system" version.workspace = true edition.workspace = true authors.workspace = true @@ -12,13 +12,13 @@ categories.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -zk_ee = { path = "../zk_ee", default-features = false } -evm_interpreter = { path = "../evm_interpreter", default-features = false } -basic_system = { path = "../basic_system", default-features = false } -system_hooks = { path = "../system_hooks", default-features = false } -basic_bootloader = { path = "../basic_bootloader", default-features = false } +zk_ee = { workspace = true, default-features = false } +evm_interpreter = { workspace = true, default-features = false } +basic_system = { workspace = true, default-features = false } +system_hooks = { workspace = true, default-features = false } +basic_bootloader = { workspace = true, default-features = false } ruint = { version = "1.12.3", default-features = false, features = ["alloc"] } -crypto = { path = "../crypto", default-features = false } +crypto = { workspace = true, default-features = false } arrayvec = { version = "0.7.4", default-features = false } cfg-if = "*" cc-traits = { version = "*", default-features = false } diff --git a/storage_models/Cargo.toml b/storage_models/Cargo.toml index 96d444c52..0256fccda 100644 --- a/storage_models/Cargo.toml +++ b/storage_models/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "storage_models" +name = "zksync_os_storage_models" version.workspace = true edition.workspace = true authors.workspace = true @@ -10,8 +10,8 @@ keywords.workspace = true categories.workspace = true [dependencies] -zk_ee = { path = "../zk_ee", default-features = false } -crypto = { path = "../crypto", default-features = false } +zk_ee = { workspace = true, default-features = false } +crypto = { workspace = true, default-features = false } [features] testing = ["zk_ee/testing"] diff --git a/supporting_crates/modexp/Cargo.toml b/supporting_crates/modexp/Cargo.toml index ce5adb3d4..2b7deb357 100644 --- a/supporting_crates/modexp/Cargo.toml +++ b/supporting_crates/modexp/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "modexp" +name = "zksync_os_modexp" version.workspace = true edition.workspace = true authors.workspace = true diff --git a/system_hooks/Cargo.toml b/system_hooks/Cargo.toml index c89e9db80..021d8416c 100644 --- a/system_hooks/Cargo.toml +++ b/system_hooks/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "system_hooks" +name = "zksync_os_system_hooks" version.workspace = true edition.workspace = true authors.workspace = true @@ -10,10 +10,10 @@ keywords.workspace = true categories.workspace = true [dependencies] -zk_ee = { path = "../zk_ee", default-features = false } +zk_ee = { workspace = true, default-features = false } ruint = { version = "1.12.3", default-features = false, features = ["alloc"] } -evm_interpreter = { path = "../evm_interpreter", default-features = false } -cycle_marker = { path = "../cycle_marker" } +evm_interpreter = { workspace = true, default-features = false } +cycle_marker = { workspace = true } arrayvec = { version = "0.7.4", default-features = false } strum_macros = "0.27.1" diff --git a/tests/fuzzer/fuzz/Cargo.toml b/tests/fuzzer/fuzz/Cargo.toml index 0a8bfbae4..c59d2ee16 100644 --- a/tests/fuzzer/fuzz/Cargo.toml +++ b/tests/fuzzer/fuzz/Cargo.toml @@ -13,17 +13,17 @@ default-features = false features = ["http-rustls-tls", "test", "signing"] [dependencies] -evm_interpreter = { path = "../../../evm_interpreter" } +evm_interpreter = { package = "zksync_os_evm_interpreter", path = "../../../evm_interpreter" } iwasm_ee = { path = "../../../iwasm_ee" } -forward_system = { path = "../../../forward_system", features = ["no_print"] } -basic_system = { path = "../../../basic_system" } -basic_bootloader = { path = "../../../basic_bootloader" } -system_hooks = { path = "../../../system_hooks" } -zk_ee = { path = "../../../zk_ee" } +forward_system = { package = "zksync_os_forward_system", path = "../../../forward_system", features = ["no_print"] } +basic_system = { package = "zksync_os_basic_system", path = "../../../basic_system" } +basic_bootloader = { package = "zksync_os_basic_bootloader", path = "../../../basic_bootloader" } +system_hooks = { package = "zksync_os_system_hooks", path = "../../../system_hooks" } +zk_ee = { package = "zksync_os_ee", path = "../../../zk_ee" } alloy = { version = "1", features = ["full", "eip712"]} fuzzer = { path = "../../fuzzer"} rig = { path = "../../rig", features = ["p256_precompile"] } -crypto = { path = "../../../crypto"} +crypto = { package = "zksync_os_crypto", path = "../../../crypto"} libfuzzer-sys = "0.4" hex = "*" sha2 = "0.10.8" diff --git a/tests/instances/eth_runner/Cargo.toml b/tests/instances/eth_runner/Cargo.toml index 3c4dc2a92..28e666f1d 100644 --- a/tests/instances/eth_runner/Cargo.toml +++ b/tests/instances/eth_runner/Cargo.toml @@ -15,9 +15,9 @@ alloy-rpc-types-eth = { version = "*", features = ["serde"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" rig = { path = "../../rig" } -zk_ee = { path = "../../../zk_ee" } -basic_system = { path = "../../../basic_system" } -system_hooks = {path = "../../../system_hooks" } +zk_ee = { workspace = true } +basic_system = { workspace = true } +system_hooks = { workspace = true } clap = { version = "4.4", features = ["derive"] } anyhow = "=1.0.89" ruint = { version = "1.12.3", default-features = false, features = ["alloc"] } diff --git a/tests/instances/forge_tests/Cargo.toml b/tests/instances/forge_tests/Cargo.toml index ee3146122..28a6e8f16 100644 --- a/tests/instances/forge_tests/Cargo.toml +++ b/tests/instances/forge_tests/Cargo.toml @@ -11,5 +11,5 @@ categories.workspace = true [dependencies] rig = { path = "../../rig" } -zk_ee = { path = "../../../zk_ee" } +zk_ee = { workspace = true } hex = "*" diff --git a/tests/instances/header/Cargo.toml b/tests/instances/header/Cargo.toml index e6493909d..d8ef05a2a 100644 --- a/tests/instances/header/Cargo.toml +++ b/tests/instances/header/Cargo.toml @@ -12,7 +12,7 @@ categories.workspace = true [dependencies] rig = { path = "../../rig" } hex = "*" -basic_bootloader = { path = "../../../basic_bootloader" } +basic_bootloader = { workspace = true } [features] e2e_proving = ["rig/e2e_proving"] diff --git a/tests/instances/precompiles/Cargo.toml b/tests/instances/precompiles/Cargo.toml index 88c03736d..025ac0191 100644 --- a/tests/instances/precompiles/Cargo.toml +++ b/tests/instances/precompiles/Cargo.toml @@ -13,7 +13,7 @@ categories.workspace = true rig = { path = "../../rig", features = ["p256_precompile"] } hex = "*" bytes = "1.9.0" -cycle_marker = { path = "../../../cycle_marker" } +cycle_marker = { workspace = true } [features] cycle_marker = ["rig/cycle_marker"] diff --git a/tests/rig/Cargo.toml b/tests/rig/Cargo.toml index 79ecddff5..06181dc5f 100644 --- a/tests/rig/Cargo.toml +++ b/tests/rig/Cargo.toml @@ -10,19 +10,19 @@ keywords.workspace = true categories.workspace = true [dependencies] -basic_bootloader = { path = "../../basic_bootloader" } +basic_bootloader = { workspace = true } risc_v_simulator = { workspace = true , features = ["delegation"] } -basic_system = { path = "../../basic_system" } -evm_interpreter = { path = "../../evm_interpreter" } -forward_system = { path = "../../forward_system" } -oracle_provider = { path = "../../oracle_provider" } -callable_oracles = { path = "../../callable_oracles/" } -zk_ee = { path = "../../zk_ee" } -zksync_os_runner = { path = "../../zksync_os_runner"} -system_hooks = { path = "../../system_hooks"} -crypto = { path = "../../crypto" } -cycle_marker = { path = "../../cycle_marker", optional = true } -zksync_os_api = { path = "../../api" } +basic_system = { workspace = true } +evm_interpreter = { workspace = true } +forward_system = { workspace = true } +oracle_provider = { workspace = true } +callable_oracles = { workspace = true } +zk_ee = { workspace = true } +zksync_os_runner = { workspace = true} +system_hooks = { workspace = true} +crypto = { workspace = true } +cycle_marker = { workspace = true, optional = true } +zksync_os_api = { workspace = true } zksync_os_interface = { workspace = true, default-features = false } prover_examples = { workspace = true, optional=true} diff --git a/zk_ee/Cargo.toml b/zk_ee/Cargo.toml index fcd1dd253..1ca2c5854 100644 --- a/zk_ee/Cargo.toml +++ b/zk_ee/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "zk_ee" +name = "zksync_os_ee" version.workspace = true edition.workspace = true authors.workspace = true @@ -14,11 +14,11 @@ categories.workspace = true [dependencies] ruint = { version = "1.12.3", default-features = false, features = ["alloc"] } cfg-if = "*" -crypto = { path = "../crypto", default-features = false } +crypto = { workspace = true, default-features = false } arrayvec = { version = "0.7.4", default-features = false } bitflags = { version = "2.6.0", default-features = false } serde = { version = "1.0", default-features = false, features = ["derive", "alloc"], optional = true } -cycle_marker = { path = "../cycle_marker" } +cycle_marker = { workspace = true } strum_macros = "0.27.1" paste = "1.0.15" diff --git a/zksync_os/Cargo.lock b/zksync_os/Cargo.lock index 2e8acc76e..55d372e8f 100644 --- a/zksync_os/Cargo.lock +++ b/zksync_os/Cargo.lock @@ -174,41 +174,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" -[[package]] -name = "basic_bootloader" -version = "0.1.0" -dependencies = [ - "arrayvec", - "basic_system", - "crypto", - "cycle_marker", - "evm_interpreter", - "paste", - "ruint", - "strum_macros", - "system_hooks", - "zk_ee", -] - -[[package]] -name = "basic_system" -version = "0.1.0" -dependencies = [ - "arrayvec", - "cfg-if", - "const_for", - "crypto", - "cycle_marker", - "either", - "evm_interpreter", - "modexp", - "paste", - "ruint", - "storage_models", - "strum_macros", - "zk_ee", -] - [[package]] name = "bitflags" version = "2.9.1" @@ -227,7 +192,7 @@ dependencies = [ [[package]] name = "blake2s_u32" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-airbender?tag=v0.4.1#68953933e3a0846d2155ed0ee024437fc405558a" +source = "git+https://github.com/matter-labs/zksync-airbender.git?tag=v0.4.3#c23fd0085ee87872e25ff83f780d2d0ee102a166" dependencies = [ "unroll", ] @@ -286,32 +251,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" -[[package]] -name = "crypto" -version = "0.1.0" -dependencies = [ - "ark-bls12-381", - "ark-bn254", - "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", - "blake2", - "blake2s_u32", - "cfg-if", - "const_for", - "educe", - "itertools 0.14.0", - "k256", - "num-bigint", - "num-traits", - "p256", - "ripemd", - "sha2", - "sha3", - "zeroize", -] - [[package]] name = "crypto-bigint" version = "0.5.5" @@ -334,10 +273,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "cycle_marker" -version = "0.0.0" - [[package]] name = "der" version = "0.7.10" @@ -435,20 +370,6 @@ dependencies = [ "syn 2.0.104", ] -[[package]] -name = "evm_interpreter" -version = "0.1.0" -dependencies = [ - "arrayvec", - "crypto", - "cycle_marker", - "either", - "paste", - "ruint", - "strum_macros", - "zk_ee", -] - [[package]] name = "ff" version = "0.13.1" @@ -591,10 +512,6 @@ dependencies = [ "scopeguard", ] -[[package]] -name = "modexp" -version = "0.1.0" - [[package]] name = "num-bigint" version = "0.4.6" @@ -675,25 +592,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "proof_running_system" -version = "0.1.0" -dependencies = [ - "arrayvec", - "basic_bootloader", - "basic_system", - "cc-traits", - "cfg-if", - "crypto", - "evm_interpreter", - "lock_api", - "ruint", - "seq-macro", - "system_hooks", - "talc", - "zk_ee", -] - [[package]] name = "proptest" version = "1.7.0" @@ -815,7 +713,7 @@ dependencies = [ [[package]] name = "riscv_common" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-airbender.git?tag=v0.3.1#44a1721e4597af363c1da7dfc9d01c2f6b9b61c1" +source = "git+https://github.com/matter-labs/zksync-airbender.git?tag=v0.4.3#c23fd0085ee87872e25ff83f780d2d0ee102a166" [[package]] name = "ruint" @@ -920,14 +818,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" -[[package]] -name = "storage_models" -version = "0.1.0" -dependencies = [ - "crypto", - "zk_ee", -] - [[package]] name = "strum_macros" version = "0.27.2" @@ -968,19 +858,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "system_hooks" -version = "0.1.0" -dependencies = [ - "arrayvec", - "cycle_marker", - "evm_interpreter", - "paste", - "ruint", - "strum_macros", - "zk_ee", -] - [[package]] name = "talc" version = "4.4.3" @@ -1071,27 +948,151 @@ dependencies = [ ] [[package]] -name = "zk_ee" +name = "zksync_os" +version = "0.1.0" +dependencies = [ + "heapless", + "r0", + "riscv", + "riscv_common", + "zksync_os_crypto", + "zksync_os_proof_running_system", +] + +[[package]] +name = "zksync_os_basic_bootloader" +version = "0.1.0" +dependencies = [ + "arrayvec", + "paste", + "ruint", + "strum_macros", + "zksync_os_basic_system", + "zksync_os_crypto", + "zksync_os_cycle_marker", + "zksync_os_ee", + "zksync_os_evm_interpreter", + "zksync_os_system_hooks", +] + +[[package]] +name = "zksync_os_basic_system" +version = "0.1.0" +dependencies = [ + "arrayvec", + "cfg-if", + "const_for", + "either", + "paste", + "ruint", + "strum_macros", + "zksync_os_crypto", + "zksync_os_cycle_marker", + "zksync_os_ee", + "zksync_os_evm_interpreter", + "zksync_os_modexp", + "zksync_os_storage_models", +] + +[[package]] +name = "zksync_os_crypto" +version = "0.1.0" +dependencies = [ + "ark-bls12-381", + "ark-bn254", + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "blake2", + "blake2s_u32", + "cfg-if", + "const_for", + "educe", + "itertools 0.14.0", + "k256", + "num-bigint", + "num-traits", + "p256", + "ripemd", + "ruint", + "sha2", + "sha3", + "zeroize", +] + +[[package]] +name = "zksync_os_cycle_marker" +version = "0.0.0" + +[[package]] +name = "zksync_os_ee" version = "0.1.0" dependencies = [ "arrayvec", "bitflags", "cfg-if", - "crypto", - "cycle_marker", "paste", "ruint", "strum_macros", + "zksync_os_crypto", + "zksync_os_cycle_marker", ] [[package]] -name = "zksync_os" +name = "zksync_os_evm_interpreter" version = "0.1.0" dependencies = [ - "crypto", - "heapless", - "proof_running_system", - "r0", - "riscv", - "riscv_common", + "arrayvec", + "either", + "paste", + "ruint", + "strum_macros", + "zksync_os_crypto", + "zksync_os_cycle_marker", + "zksync_os_ee", +] + +[[package]] +name = "zksync_os_modexp" +version = "0.1.0" + +[[package]] +name = "zksync_os_proof_running_system" +version = "0.1.0" +dependencies = [ + "arrayvec", + "cc-traits", + "cfg-if", + "lock_api", + "ruint", + "seq-macro", + "talc", + "zksync_os_basic_bootloader", + "zksync_os_basic_system", + "zksync_os_crypto", + "zksync_os_ee", + "zksync_os_evm_interpreter", + "zksync_os_system_hooks", +] + +[[package]] +name = "zksync_os_storage_models" +version = "0.1.0" +dependencies = [ + "zksync_os_crypto", + "zksync_os_ee", +] + +[[package]] +name = "zksync_os_system_hooks" +version = "0.1.0" +dependencies = [ + "arrayvec", + "paste", + "ruint", + "strum_macros", + "zksync_os_cycle_marker", + "zksync_os_ee", + "zksync_os_evm_interpreter", ] diff --git a/zksync_os/Cargo.toml b/zksync_os/Cargo.toml index f23df5c5b..c6f43cf4f 100644 --- a/zksync_os/Cargo.toml +++ b/zksync_os/Cargo.toml @@ -15,8 +15,8 @@ categories = ["cryptography"] r0 = "1.0.0" riscv = "0.11" heapless = { version = "*", default-features = false } -proof_running_system = { path = "../proof_running_system", default-features = false} -crypto = { path = "../crypto", optional = true } +proof_running_system = { package = "zksync_os_proof_running_system", path = "../proof_running_system", default-features = false} +crypto = { package = "zksync_os_crypto", path = "../crypto", optional = true } riscv_common = {git = "https://github.com/matter-labs/zksync-airbender.git", tag = "v0.4.3", features = ["custom_panic", "custom_allocator"]} #riscv_common = {path = "../../zksync-airbender/riscv_common" , features = ["custom_panic", "custom_allocator"]} diff --git a/zksync_os/app.bin b/zksync_os/app.bin index b122f5cd7..d540084e8 100755 Binary files a/zksync_os/app.bin and b/zksync_os/app.bin differ diff --git a/zksync_os/evm_replay.bin b/zksync_os/evm_replay.bin index 0ef4253c5..2d89e054c 100755 Binary files a/zksync_os/evm_replay.bin and b/zksync_os/evm_replay.bin differ diff --git a/zksync_os/multiblock_batch.bin b/zksync_os/multiblock_batch.bin index 69efa0adc..443558514 100755 Binary files a/zksync_os/multiblock_batch.bin and b/zksync_os/multiblock_batch.bin differ diff --git a/zksync_os/multiblock_batch_logging_enabled.bin b/zksync_os/multiblock_batch_logging_enabled.bin index 1eb949715..5c52a5b32 100755 Binary files a/zksync_os/multiblock_batch_logging_enabled.bin and b/zksync_os/multiblock_batch_logging_enabled.bin differ diff --git a/zksync_os/server_app.bin b/zksync_os/server_app.bin index 6be64ddd0..290f30a6b 100755 Binary files a/zksync_os/server_app.bin and b/zksync_os/server_app.bin differ diff --git a/zksync_os/server_app_logging_enabled.bin b/zksync_os/server_app_logging_enabled.bin index 1ffc67aa7..2523aa259 100755 Binary files a/zksync_os/server_app_logging_enabled.bin and b/zksync_os/server_app_logging_enabled.bin differ diff --git a/zksync_os_runner/Cargo.toml b/zksync_os_runner/Cargo.toml index 1fc9b0747..e1bf35143 100644 --- a/zksync_os_runner/Cargo.toml +++ b/zksync_os_runner/Cargo.toml @@ -13,7 +13,7 @@ categories.workspace = true risc_v_simulator = { workspace = true, features = ["delegation"] } execution_utils = { workspace = true } prover_examples = { workspace = true } -cycle_marker = { path = "../cycle_marker" } +cycle_marker = { workspace = true } [features] opcode_stats = ["risc_v_simulator/opcode_stats"]