Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 8 additions & 8 deletions api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }

Expand Down
14 changes: 7 additions & 7 deletions basic_bootloader/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "basic_bootloader"
name = "zksync_os_basic_bootloader"
version.workspace = true
edition.workspace = true
authors.workspace = true
Expand All @@ -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"
Expand Down
16 changes: 8 additions & 8 deletions basic_system/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "basic_system"
name = "zksync_os_basic_system"
version.workspace = true
edition.workspace = true
authors.workspace = true
Expand All @@ -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"
Expand All @@ -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"] }
Expand Down
8 changes: 4 additions & 4 deletions callable_oracles/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "callable_oracles"
name = "zksync_os_callable_oracles"
version.workspace = true
edition.workspace = true
authors.workspace = true
Expand All @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion crypto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "crypto"
name = "zksync_os_crypto"
version.workspace = true
edition.workspace = true
authors.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crypto/src/blake2s/test_program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
8 changes: 4 additions & 4 deletions crypto/tests/secp256k1.rs
Original file line number Diff line number Diff line change
@@ -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},
Expand Down Expand Up @@ -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 = <Scalar as Reduce<crypto::k256::U256>>::reduce_bytes(
&bits2field::<crypto::k256::Secp256k1>(&digest)
let msg = <Scalar as Reduce<zksync_os_crypto::k256::U256>>::reduce_bytes(
&bits2field::<zksync_os_crypto::k256::Secp256k1>(&digest)
.map_err(|_| ())
.unwrap(),
);
Expand Down
4 changes: 2 additions & 2 deletions crypto/tests/secp256r1.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crypto::{
use proptest::prelude::*;
use zksync_os_crypto::{
p256::{
ecdsa::{
signature::hazmat::{PrehashSigner, PrehashVerifier},
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion cycle_marker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "cycle_marker"
name = "zksync_os_cycle_marker"
edition = "2024"
authors.workspace = true
homepage.workspace = true
Expand Down
8 changes: 4 additions & 4 deletions evm_interpreter/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "evm_interpreter"
name = "zksync_os_evm_interpreter"
version.workspace = true
edition.workspace = true
authors.workspace = true
Expand All @@ -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"

Expand Down
16 changes: 8 additions & 8 deletions forward_system/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "forward_system"
name = "zksync_os_forward_system"
version.workspace = true
edition.workspace = true
authors.workspace = true
Expand All @@ -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"] }
Expand Down
4 changes: 2 additions & 2 deletions oracle_provider/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "oracle_provider"
name = "zksync_os_oracle_provider"
version.workspace = true
edition.workspace = true
authors.workspace = true
Expand All @@ -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 }
14 changes: 7 additions & 7 deletions proof_running_system/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "proof_running_system"
name = "zksync_os_proof_running_system"
version.workspace = true
edition.workspace = true
authors.workspace = true
Expand All @@ -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 }
Expand Down
6 changes: 3 additions & 3 deletions storage_models/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "storage_models"
name = "zksync_os_storage_models"
version.workspace = true
edition.workspace = true
authors.workspace = true
Expand All @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion supporting_crates/modexp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "modexp"
name = "zksync_os_modexp"
version.workspace = true
edition.workspace = true
authors.workspace = true
Expand Down
8 changes: 4 additions & 4 deletions system_hooks/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "system_hooks"
name = "zksync_os_system_hooks"
version.workspace = true
edition.workspace = true
authors.workspace = true
Expand All @@ -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"
Expand Down
14 changes: 7 additions & 7 deletions tests/fuzzer/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading
Loading