Skip to content

chore: upgrade openvm to 1.2.1 #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
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
927 changes: 479 additions & 448 deletions Cargo.lock

Large diffs are not rendered by default.

48 changes: 26 additions & 22 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,36 @@ version = "0.4.0"

[workspace.dependencies]
# openvm guest libs
openvm = { git = "https://github.com/openvm-org/openvm.git", rev = "a0ae88f", default-features = false }
openvm-algebra-complex-macros = { git = "https://github.com/openvm-org/openvm.git", rev = "a0ae88f", default-features = false }
openvm-custom-insn = { git = "https://github.com/openvm-org/openvm.git", rev = "a0ae88f", default-features = false }
openvm-sha256-guest = { git = "https://github.com/openvm-org/openvm.git", rev = "a0ae88f", default-features = false }
openvm-keccak256-guest = { git = "https://github.com/openvm-org/openvm.git", rev = "a0ae88f", default-features = false }
openvm-algebra-guest = { git = "https://github.com/openvm-org/openvm.git", rev = "a0ae88f", default-features = false }
openvm-ecc-guest = { git = "https://github.com/openvm-org/openvm.git", rev = "a0ae88f", default-features = false }
openvm-bigint-guest = { git = "https://github.com/openvm-org/openvm.git", rev = "a0ae88f", default-features = false }
openvm-pairing-guest = { git = "https://github.com/openvm-org/openvm.git", rev = "a0ae88f", default-features = false }
openvm-rv32im-guest = { git = "https://github.com/openvm-org/openvm.git", rev = "a0ae88f", default-features = false }
openvm = { git = "https://github.com/openvm-org/openvm.git", rev = "2c35253" }
openvm-algebra-complex-macros = { git = "https://github.com/openvm-org/openvm.git", rev = "2c35253", default-features = false }
openvm-custom-insn = { git = "https://github.com/openvm-org/openvm.git", rev = "2c35253", default-features = false }
openvm-sha2 = { git = "https://github.com/openvm-org/openvm.git", rev = "2c35253" }
openvm-sha256-guest = { git = "https://github.com/openvm-org/openvm.git", rev = "2c35253", default-features = false }
openvm-p256 = { git = "https://github.com/openvm-org/openvm.git", package = "p256", rev = "2c35253", features = ["std"] }
openvm-k256 = { git = "https://github.com/openvm-org/openvm.git", package = "k256", rev = "2c35253", features = ["std"] }
openvm-pairing = { git = "https://github.com/openvm-org/openvm.git", rev = "2c35253" }
openvm-keccak256-guest = { git = "https://github.com/openvm-org/openvm.git", rev = "2c35253", default-features = false }
openvm-algebra-guest = { git = "https://github.com/openvm-org/openvm.git", rev = "2c35253", default-features = false }
openvm-ecc-guest = { git = "https://github.com/openvm-org/openvm.git", rev = "2c35253", default-features = false }
openvm-bigint-guest = { git = "https://github.com/openvm-org/openvm.git", rev = "2c35253", default-features = false }
openvm-pairing-guest = { git = "https://github.com/openvm-org/openvm.git", rev = "2c35253", default-features = false }
openvm-rv32im-guest = { git = "https://github.com/openvm-org/openvm.git", rev = "2c35253", default-features = false }

# openvm guest libs
openvm-build = { git = "https://github.com/openvm-org/openvm.git", rev = "bdb4831", default-features = false }
openvm-circuit = { git = "https://github.com/openvm-org/openvm.git", rev = "bdb4831", default-features = false }
openvm-continuations = { git = "https://github.com/openvm-org/openvm.git", rev = "bdb4831", default-features = false }
openvm-instructions ={ git = "https://github.com/openvm-org/openvm.git", rev = "bdb4831", default-features = false }
openvm-native-circuit = { git = "https://github.com/openvm-org/openvm.git", rev = "bdb4831", default-features = false }
openvm-native-compiler = { git = "https://github.com/openvm-org/openvm.git", rev = "bdb4831", default-features = false }
openvm-native-recursion = { git = "https://github.com/openvm-org/openvm.git", rev = "bdb4831", default-features = false }
openvm-native-transpiler = { git = "https://github.com/openvm-org/openvm.git", rev = "bdb4831", default-features = false }
openvm-rv32im-transpiler = { git = "https://github.com/openvm-org/openvm.git", rev = "bdb4831", default-features = false }
openvm-sdk = { git = "https://github.com/openvm-org/openvm.git", rev = "bdb4831", default-features = false, features = ["parallel", "bench-metrics", "evm-prove"] }
openvm-transpiler = { git = "https://github.com/openvm-org/openvm.git", rev = "bdb4831", default-features = false }
openvm-build = { git = "https://github.com/openvm-org/openvm.git", rev = "2c35253", default-features = false }
openvm-circuit = { git = "https://github.com/openvm-org/openvm.git", rev = "2c35253", default-features = false }
openvm-continuations = { git = "https://github.com/openvm-org/openvm.git", rev = "2c35253", default-features = false }
openvm-instructions ={ git = "https://github.com/openvm-org/openvm.git", rev = "2c35253", default-features = false }
openvm-native-circuit = { git = "https://github.com/openvm-org/openvm.git", rev = "2c35253", default-features = false }
openvm-native-compiler = { git = "https://github.com/openvm-org/openvm.git", rev = "2c35253", default-features = false }
openvm-native-recursion = { git = "https://github.com/openvm-org/openvm.git", rev = "2c35253", default-features = false }
openvm-native-transpiler = { git = "https://github.com/openvm-org/openvm.git", rev = "2c35253", default-features = false }
openvm-rv32im-transpiler = { git = "https://github.com/openvm-org/openvm.git", rev = "2c35253", default-features = false }
openvm-sdk = { git = "https://github.com/openvm-org/openvm.git", rev = "2c35253", default-features = false, features = ["parallel", "bench-metrics", "evm-prove"] }
openvm-transpiler = { git = "https://github.com/openvm-org/openvm.git", rev = "2c35253", default-features = false }

# more openvm related libs
openvm-stark-sdk = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v1.1.0" }
openvm-stark-sdk = { git = "https://github.com/openvm-org/stark-backend.git", rev = "f48090c9febd021f8ee0349bc929a775fb1fa3ad" }
p3-field = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" }

sbv-core = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "zkvm/euclid-upgrade", features = ["scroll"] }
Expand Down
149 changes: 149 additions & 0 deletions Cargo.toml.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
[workspace]
members = [
"crates/circuits/chunk-circuit",
"crates/circuits/batch-circuit",
"crates/circuits/bundle-circuit",
"crates/circuits/types",
"crates/prover",
"crates/verifier",
"crates/integration",
"crates/build-guest",
]
resolver = "2"

[workspace.package]
authors = ["Scroll developers"]
edition = "2021"
homepage = "https://github.com/scroll-tech/zkvm-prover"
readme = "README.md"
repository = "https://github.com/scroll-tech/zkvm-prover"
version = "0.4.0"

[workspace.dependencies]
openvm = { git = "ssh://[email protected]/axiom-crypto/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-algebra-complex-macros = { git = "ssh://[email protected]/axiom-crypto/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-algebra-guest = { git = "ssh://[email protected]/axiom-crypto/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-bigint-guest = { git = "ssh://[email protected]/axiom-crypto/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-build = { git = "ssh://[email protected]/axiom-crypto/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-circuit = { git = "ssh://[email protected]/axiom-crypto/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-custom-insn = { git = "ssh://[email protected]/axiom-crypto/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-continuations = { git = "ssh://[email protected]/axiom-crypto/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-ecc-guest = { git = "ssh://[email protected]/axiom-crypto/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-instructions ={ git = "ssh://[email protected]/axiom-crypto/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-keccak256-guest = { git = "ssh://[email protected]/axiom-crypto/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-native-circuit = { git = "ssh://[email protected]/axiom-crypto/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-native-compiler = { git = "ssh://[email protected]/axiom-crypto/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-native-recursion = { git = "ssh://[email protected]/axiom-crypto/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-native-transpiler = { git = "ssh://[email protected]/axiom-crypto/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-pairing-guest = { git = "ssh://[email protected]/axiom-crypto/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-rv32im-guest = { git = "ssh://[email protected]/axiom-crypto/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-rv32im-transpiler = { git = "ssh://[email protected]/axiom-crypto/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-sdk = { git = "ssh://[email protected]/axiom-crypto/openvm-private.git", branch = "patch-v1.2.0", default-features = false, features = ["parallel", "bench-metrics", "evm-prove"] }
openvm-sha256-guest = { git = "ssh://[email protected]/axiom-crypto/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-transpiler = { git = "ssh://[email protected]/axiom-crypto/openvm-private.git", branch = "patch-v1.2.0", default-features = false }

openvm-stark-sdk = { git = "ssh://[email protected]/axiom-crypto/stark-backend-private.git", branch = "patch-v1.1.0" }

sbv-core = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "zkvm/euclid-upgrade", features = ["scroll"] }
sbv-primitives = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "zkvm/euclid-upgrade", features = ["scroll"] }
sbv-kv = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "zkvm/euclid-upgrade" }
sbv-trie = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "zkvm/euclid-upgrade" }

alloy-primitives = { version = "0.8", default-features = false }
alloy-serde = { version = "0.8", default-features = false }
bitcode = { version = "0.6.5", default-features = false, features = ["serde", "derive"] }
bincode_v1 = { version = "1.3", package = "bincode"}
derivative = "2.2.0"
eyre = "0.6"
halo2curves-axiom = { version = "0.5.3" }
itertools = "0.14"
hex-literal = { version = "0.4.1", default-features = false }
metrics = "0.23.0"
metrics-util = "0.17"
metrics-tracing-context = "0.16.0"
p3-field = { git = "ssh://[email protected]/axiom-crypto/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" }
rayon = "1.10"
rkyv = "0.8"
serde = { version = "1", default-features = false, features = ["derive"] }
serde_json = { version = "1.0" }
serde_with = "3.11.0"
snark-verifier-sdk = { version = "0.2.0", default-features = false, features = [
"loader_halo2",
"halo2-axiom",
"display",
] }
tiny-keccak = "2.0"
tracing = "0.1"
vm-zstd = { git = "https://github.com/scroll-tech/rust-zstd-decompressor.git", tag = "v0.1.1" }
toml = "0.8.14"
tracing-subscriber = "0.3"

scroll-zkvm-circuit-input-types = { path = "crates/circuits/types" }
scroll-zkvm-integration = { path = "crates/integration" }
scroll-zkvm-prover = { path = "crates/prover" }
scroll-zkvm-verifier = { path = "crates/verifier" }

[patch.crates-io]
alloy-primitives = { git = "https://github.com/scroll-tech/alloy-core", branch = "v0.8.18-euclid-upgrade" }
ruint = { git = "https://github.com/scroll-tech/uint.git", branch = "v1.12.3" }
tiny-keccak = { git = "https://github.com/scroll-tech/tiny-keccak", branch = "scroll-patch-v2.0.2-euclid-upgrade" }

[profile.maxperf]
inherits = "release"
lto = "fat"
codegen-units = 1


[patch."ssh://[email protected]/axiom-crypto/openvm-private.git"]
openvm = { git = "ssh://[email protected]/scroll-tech/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-algebra-complex-macros = { git = "ssh://[email protected]/scroll-tech/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-algebra-guest = { git = "ssh://[email protected]/scroll-tech/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-bigint-guest = { git = "ssh://[email protected]/scroll-tech/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-build = { git = "ssh://[email protected]/scroll-tech/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-circuit = { git = "ssh://[email protected]/scroll-tech/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-custom-insn = { git = "ssh://[email protected]/scroll-tech/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-continuations = { git = "ssh://[email protected]/scroll-tech/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-ecc-guest = { git = "ssh://[email protected]/scroll-tech/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-instructions ={ git = "ssh://[email protected]/scroll-tech/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-keccak256-guest = { git = "ssh://[email protected]/scroll-tech/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-native-circuit = { git = "ssh://[email protected]/scroll-tech/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-native-compiler = { git = "ssh://[email protected]/scroll-tech/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-native-recursion = { git = "ssh://[email protected]/scroll-tech/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-native-transpiler = { git = "ssh://[email protected]/scroll-tech/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-pairing-guest = { git = "ssh://[email protected]/scroll-tech/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-rv32im-guest = { git = "ssh://[email protected]/scroll-tech/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-rv32im-transpiler = { git = "ssh://[email protected]/scroll-tech/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-sdk = { git = "ssh://[email protected]/scroll-tech/openvm-private.git", branch = "patch-v1.2.0", default-features = false, features = ["parallel", "bench-metrics", "evm-prove"] }
openvm-sha256-guest = { git = "ssh://[email protected]/scroll-tech/openvm-private.git", branch = "patch-v1.2.0", default-features = false }
openvm-transpiler = { git = "ssh://[email protected]/scroll-tech/openvm-private.git", branch = "patch-v1.2.0", default-features = false }

[patch."ssh://[email protected]/axiom-crypto/stark-backend-private.git"]
openvm-stark-backend = { git = "ssh://[email protected]/scroll-tech/stark-backend-private.git", branch = "patch-v1.1.0", default-features = false }
openvm-stark-sdk = { git = "ssh://[email protected]/scroll-tech/stark-backend-private.git", branch = "patch-v1.1.0", default-features = false }

[patch."ssh://[email protected]/axiom-crypto/plonky3-private.git"]
p3-air = { git = "ssh://[email protected]/scroll-tech/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" }
p3-field = { git = "ssh://[email protected]/scroll-tech/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" }
p3-commit = { git = "ssh://[email protected]/scroll-tech/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" }
p3-matrix = { git = "ssh://[email protected]/scroll-tech/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" }
p3-baby-bear = { git = "ssh://[email protected]/scroll-tech/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" }
p3-koala-bear = { git = "ssh://[email protected]/scroll-tech/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" }
p3-util = { git = "ssh://[email protected]/scroll-tech/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" }
p3-challenger = { git = "ssh://[email protected]/scroll-tech/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" }
p3-dft = { git = "ssh://[email protected]/scroll-tech/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" }
p3-fri = { git = "ssh://[email protected]/scroll-tech/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" }
p3-goldilocks = { git = "ssh://[email protected]/scroll-tech/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" }
p3-keccak = { git = "ssh://[email protected]/scroll-tech/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" }
p3-keccak-air = { git = "ssh://[email protected]/scroll-tech/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" }
p3-blake3 = { git = "ssh://[email protected]/scroll-tech/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" }
p3-mds = { git = "ssh://[email protected]/scroll-tech/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" }
p3-merkle-tree = { git = "ssh://[email protected]/scroll-tech/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" }
p3-monty-31 = { git = "ssh://[email protected]/scroll-tech/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" }
p3-poseidon = { git = "ssh://[email protected]/scroll-tech/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" }
p3-poseidon2 = { git = "ssh://[email protected]/scroll-tech/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" }
p3-poseidon2-air = { git = "ssh://[email protected]/scroll-tech/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" }
p3-symmetric = { git = "ssh://[email protected]/scroll-tech/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" }
p3-uni-stark = { git = "ssh://[email protected]/scroll-tech/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" }
p3-maybe-rayon = { git = "ssh://[email protected]/scroll-tech/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" } # the "parallel" feature is NOT on by default to allow single-threaded benchmarking
p3-bn254-fr = { git = "ssh://[email protected]/scroll-tech/plonky3-private.git", rev = "51704e6036fba6edd58022eb0eceb9f44bc941fb" }

14 changes: 9 additions & 5 deletions crates/build-guest/src/builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,18 @@ const FD_APP_EXE: &str = "app.vmexe";
pub fn build<S: AsRef<str>>(
project_root: &str,
feature_flags: impl IntoIterator<Item = S>,
vm_config: &SdkVmConfig,
) -> eyre::Result<Elf> {
let guest_opts = GuestOptions::default();
let guest_opts = guest_opts.with_features(feature_flags);
let guest_opts = guest_opts.with_profile("maxperf".to_string());
Sdk::new().build(guest_opts, project_root, &Default::default())
Sdk::new().build(
guest_opts,
vm_config,
project_root,
&Default::default(),
None,
)
}

pub fn load_app_config(project_root: &str) -> eyre::Result<AppConfig<SdkVmConfig>> {
Expand Down Expand Up @@ -54,10 +61,7 @@ pub fn transpile(
std::fs::create_dir_all(&path_assets)?;

// Transpile ELF to openvm executable.
let transpiler = app_config
.app_vm_config
.transpiler()
.with_extension(openvm_native_transpiler::LongFormTranspilerExtension);
let transpiler = app_config.app_vm_config.transpiler();
let app_exe = Sdk::new().transpile(elf, transpiler)?;

// Write exe to disc.
Expand Down
Loading