From 576eecfeecaa11c4672d678a6ac7c2054dfd0420 Mon Sep 17 00:00:00 2001 From: kunxian xia Date: Mon, 1 Dec 2025 00:27:39 +0800 Subject: [PATCH 1/8] gpu prover --- Cargo.lock | 183 +++++++++++++++++++++++++- ceno_recursion/Cargo.toml | 42 +++--- ceno_recursion/src/aggregation/mod.rs | 33 +++-- 3 files changed, 222 insertions(+), 36 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 177ace3d3..f1a231eff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -689,6 +689,26 @@ dependencies = [ "serde", ] +[[package]] +name = "bincode" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36eaf5d7b090263e8150820482d5d93cd964a81e4019913c972f4edcc6edb740" +dependencies = [ + "bincode_derive", + "serde", + "unty", +] + +[[package]] +name = "bincode_derive" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf95709a440f45e986983918d0e8a1f30a9b1df04918fc828670606804ac3c09" +dependencies = [ + "virtue", +] + [[package]] name = "bit-set" version = "0.8.0" @@ -933,6 +953,12 @@ dependencies = [ "serde", ] +[[package]] +name = "bytesize" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bd91ee7b2422bcb158d90ef4d14f75ef67f340943fc4149891dcce8f8b972a3" + [[package]] name = "c-kzg" version = "2.1.4" @@ -962,7 +988,7 @@ name = "cargo-ceno" version = "0.1.0" dependencies = [ "anyhow", - "bincode", + "bincode 1.3.3", "cargo_metadata 0.19.2", "ceno_emul", "ceno_host", @@ -1121,7 +1147,7 @@ dependencies = [ name = "ceno_recursion" version = "0.1.0" dependencies = [ - "bincode", + "bincode 1.3.3", "ceno-examples", "ceno_emul", "ceno_host", @@ -1135,6 +1161,7 @@ dependencies = [ "openvm", "openvm-circuit", "openvm-continuations", + "openvm-cuda-backend", "openvm-instructions", "openvm-native-circuit", "openvm-native-compiler", @@ -1191,7 +1218,7 @@ name = "ceno_zkvm" version = "0.1.0" dependencies = [ "base64", - "bincode", + "bincode 1.3.3", "ceno-examples", "ceno_emul", "ceno_host", @@ -1570,6 +1597,22 @@ dependencies = [ "memchr", ] +[[package]] +name = "ctor" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67773048316103656a637612c4a62477603b777d91d9c62ff2290f9cde178fdb" +dependencies = [ + "ctor-proc-macro", + "dtor", +] + +[[package]] +name = "ctor-proc-macro" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2931af7e13dc045d8e9d26afccc6fa115d64e115c9c84b1166288b46f6782c2" + [[package]] name = "cuda_hal" version = "0.1.0" @@ -1963,6 +2006,21 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" +[[package]] +name = "dtor" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "404d02eeb088a82cfd873006cb713fe411306c7d182c344905e101fb1167d301" +dependencies = [ + "dtor-proc-macro", +] + +[[package]] +name = "dtor-proc-macro" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f678cf4a922c215c63e0de95eb1ff08a958a81d47e485cf9da1e27bf6305cfa5" + [[package]] name = "dyn-clone" version = "1.0.20" @@ -2371,7 +2429,7 @@ dependencies = [ name = "gkr_iop" version = "0.1.0" dependencies = [ - "bincode", + "bincode 1.3.3", "criterion", "cuda_hal", "cudarc", @@ -3257,7 +3315,7 @@ name = "mpcs" version = "0.1.0" source = "git+https://github.com/scroll-tech/gkr-backend.git?tag=v1.0.0-alpha.15#9be620b18900138d0b89569759fc2b3b9451b49e" dependencies = [ - "bincode", + "bincode 1.3.3", "clap", "ff_ext", "itertools 0.13.0", @@ -3630,6 +3688,7 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openvm" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "bytemuck", "num-bigint 0.4.6", @@ -3642,6 +3701,7 @@ dependencies = [ [[package]] name = "openvm-algebra-circuit" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -3670,6 +3730,7 @@ dependencies = [ [[package]] name = "openvm-algebra-complex-macros" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-macros-common", "quote", @@ -3679,6 +3740,7 @@ dependencies = [ [[package]] name = "openvm-algebra-guest" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "halo2curves-axiom", "num-bigint 0.4.6", @@ -3694,6 +3756,7 @@ dependencies = [ [[package]] name = "openvm-algebra-moduli-macros" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "num-bigint 0.4.6", "num-prime", @@ -3705,6 +3768,7 @@ dependencies = [ [[package]] name = "openvm-algebra-transpiler" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-algebra-guest", "openvm-instructions", @@ -3718,6 +3782,7 @@ dependencies = [ [[package]] name = "openvm-bigint-circuit" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -3740,6 +3805,7 @@ dependencies = [ [[package]] name = "openvm-bigint-guest" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-platform", "strum_macros", @@ -3748,6 +3814,7 @@ dependencies = [ [[package]] name = "openvm-bigint-transpiler" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-bigint-guest", "openvm-instructions", @@ -3762,6 +3829,7 @@ dependencies = [ [[package]] name = "openvm-build" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cargo_metadata 0.18.1", "eyre", @@ -3773,6 +3841,7 @@ dependencies = [ [[package]] name = "openvm-circuit" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "backtrace", "cfg-if", @@ -3789,6 +3858,9 @@ dependencies = [ "openvm-circuit-derive", "openvm-circuit-primitives", "openvm-circuit-primitives-derive", + "openvm-cuda-backend", + "openvm-cuda-builder", + "openvm-cuda-common", "openvm-instructions", "openvm-poseidon2-air", "openvm-stark-backend", @@ -3807,6 +3879,7 @@ dependencies = [ [[package]] name = "openvm-circuit-derive" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "itertools 0.14.0", "proc-macro2", @@ -3817,13 +3890,16 @@ dependencies = [ [[package]] name = "openvm-circuit-primitives" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "derive-new 0.6.0", "itertools 0.14.0", "num-bigint 0.4.6", "num-traits", "openvm-circuit-primitives-derive", + "openvm-cuda-backend", "openvm-cuda-builder", + "openvm-cuda-common", "openvm-stark-backend", "rand 0.8.5", "tracing", @@ -3832,6 +3908,7 @@ dependencies = [ [[package]] name = "openvm-circuit-primitives-derive" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "itertools 0.14.0", "quote", @@ -3841,6 +3918,7 @@ dependencies = [ [[package]] name = "openvm-continuations" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "derivative", "openvm-circuit", @@ -3852,6 +3930,38 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "openvm-cuda-backend" +version = "1.2.1" +source = "git+https://github.com/openvm-org/stark-backend.git?tag=v1.2.1#dde6cdaf105cc57d1609fd49568c7bce0a066cc2" +dependencies = [ + "bincode 2.0.1", + "bincode_derive", + "derivative", + "derive-new 0.7.0", + "itertools 0.14.0", + "lazy_static", + "metrics", + "openvm-cuda-builder", + "openvm-cuda-common", + "openvm-stark-backend", + "openvm-stark-sdk", + "p3-baby-bear", + "p3-commit", + "p3-dft", + "p3-field", + "p3-fri", + "p3-matrix", + "p3-merkle-tree", + "p3-symmetric", + "p3-util", + "rustc-hash", + "serde", + "serde_json", + "thiserror 1.0.69", + "tracing", +] + [[package]] name = "openvm-cuda-builder" version = "1.2.1" @@ -3861,9 +3971,24 @@ dependencies = [ "glob", ] +[[package]] +name = "openvm-cuda-common" +version = "1.2.1" +source = "git+https://github.com/openvm-org/stark-backend.git?tag=v1.2.1#dde6cdaf105cc57d1609fd49568c7bce0a066cc2" +dependencies = [ + "bytesize", + "ctor", + "lazy_static", + "metrics", + "openvm-cuda-builder", + "thiserror 1.0.69", + "tracing", +] + [[package]] name = "openvm-custom-insn" version = "0.1.0" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "proc-macro2", "quote", @@ -3873,6 +3998,7 @@ dependencies = [ [[package]] name = "openvm-ecc-circuit" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -3901,6 +4027,7 @@ dependencies = [ [[package]] name = "openvm-ecc-guest" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "ecdsa 0.16.9 (registry+https://github.com/rust-lang/crates.io-index)", "elliptic-curve", @@ -3919,6 +4046,7 @@ dependencies = [ [[package]] name = "openvm-ecc-sw-macros" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-macros-common", "quote", @@ -3928,6 +4056,7 @@ dependencies = [ [[package]] name = "openvm-ecc-transpiler" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-ecc-guest", "openvm-instructions", @@ -3941,6 +4070,7 @@ dependencies = [ [[package]] name = "openvm-instructions" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "backtrace", "derive-new 0.6.0", @@ -3957,6 +4087,7 @@ dependencies = [ [[package]] name = "openvm-instructions-derive" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "quote", "syn 2.0.101", @@ -3965,6 +4096,7 @@ dependencies = [ [[package]] name = "openvm-keccak256-circuit" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -3989,6 +4121,7 @@ dependencies = [ [[package]] name = "openvm-keccak256-guest" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-platform", ] @@ -3996,6 +4129,7 @@ dependencies = [ [[package]] name = "openvm-keccak256-transpiler" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-instructions", "openvm-instructions-derive", @@ -4009,6 +4143,7 @@ dependencies = [ [[package]] name = "openvm-macros-common" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "syn 2.0.101", ] @@ -4016,6 +4151,7 @@ dependencies = [ [[package]] name = "openvm-mod-circuit-builder" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "itertools 0.14.0", "num-bigint 0.4.6", @@ -4033,6 +4169,7 @@ dependencies = [ [[package]] name = "openvm-native-circuit" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -4043,6 +4180,9 @@ dependencies = [ "openvm-circuit-derive", "openvm-circuit-primitives", "openvm-circuit-primitives-derive", + "openvm-cuda-backend", + "openvm-cuda-builder", + "openvm-cuda-common", "openvm-instructions", "openvm-native-compiler", "openvm-poseidon2-air", @@ -4060,6 +4200,7 @@ dependencies = [ [[package]] name = "openvm-native-compiler" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "backtrace", "itertools 0.14.0", @@ -4081,6 +4222,7 @@ dependencies = [ [[package]] name = "openvm-native-compiler-derive" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "quote", "syn 2.0.101", @@ -4089,6 +4231,7 @@ dependencies = [ [[package]] name = "openvm-native-recursion" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "itertools 0.14.0", @@ -4112,6 +4255,7 @@ dependencies = [ [[package]] name = "openvm-native-transpiler" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-instructions", "openvm-transpiler", @@ -4121,6 +4265,7 @@ dependencies = [ [[package]] name = "openvm-pairing-circuit" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -4149,6 +4294,7 @@ dependencies = [ [[package]] name = "openvm-pairing-guest" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "halo2curves-axiom", "hex-literal", @@ -4169,6 +4315,7 @@ dependencies = [ [[package]] name = "openvm-pairing-transpiler" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-instructions", "openvm-pairing-guest", @@ -4181,6 +4328,7 @@ dependencies = [ [[package]] name = "openvm-platform" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "libm", "openvm-custom-insn", @@ -4190,6 +4338,7 @@ dependencies = [ [[package]] name = "openvm-poseidon2-air" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "derivative", "lazy_static", @@ -4207,6 +4356,7 @@ dependencies = [ [[package]] name = "openvm-rv32-adapters" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "derive-new 0.6.0", "itertools 0.14.0", @@ -4223,6 +4373,7 @@ dependencies = [ [[package]] name = "openvm-rv32im-circuit" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -4245,6 +4396,7 @@ dependencies = [ [[package]] name = "openvm-rv32im-guest" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-custom-insn", "p3-field", @@ -4254,6 +4406,7 @@ dependencies = [ [[package]] name = "openvm-rv32im-transpiler" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-instructions", "openvm-instructions-derive", @@ -4269,6 +4422,7 @@ dependencies = [ [[package]] name = "openvm-sdk" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "bitcode", "bon", @@ -4322,6 +4476,7 @@ dependencies = [ [[package]] name = "openvm-sha256-air" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-circuit-primitives", "openvm-stark-backend", @@ -4332,6 +4487,7 @@ dependencies = [ [[package]] name = "openvm-sha256-circuit" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -4354,6 +4510,7 @@ dependencies = [ [[package]] name = "openvm-sha256-guest" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-platform", ] @@ -4361,6 +4518,7 @@ dependencies = [ [[package]] name = "openvm-sha256-transpiler" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-instructions", "openvm-instructions-derive", @@ -4438,6 +4596,7 @@ dependencies = [ [[package]] name = "openvm-transpiler" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "elf", "eyre", @@ -6795,6 +6954,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "unty" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d49784317cd0d1ee7ec5c716dd598ec5b4483ea832a2dced265471cc0f690ae" + [[package]] name = "url" version = "2.5.4" @@ -6890,6 +7055,12 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "virtue" +version = "0.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "051eb1abcf10076295e815102942cc58f9d5e3b4560e46e53c21e8ff6f3af7b1" + [[package]] name = "wait-timeout" version = "0.2.1" @@ -6997,7 +7168,7 @@ name = "whir" version = "0.1.0" source = "git+https://github.com/scroll-tech/gkr-backend.git?tag=v1.0.0-alpha.15#9be620b18900138d0b89569759fc2b3b9451b49e" dependencies = [ - "bincode", + "bincode 1.3.3", "clap", "derive_more 1.0.0", "ff_ext", diff --git a/ceno_recursion/Cargo.toml b/ceno_recursion/Cargo.toml index 3e949f587..b4ecedaa6 100644 --- a/ceno_recursion/Cargo.toml +++ b/ceno_recursion/Cargo.toml @@ -35,35 +35,37 @@ whir.workspace = true witness.workspace = true # openvm -# openvm = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } -# openvm-circuit = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } -# openvm-continuations = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } -# openvm-instructions = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } -# openvm-native-circuit = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } -# openvm-native-compiler = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } -# openvm-native-compiler-derive = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } -# openvm-native-recursion = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } -# openvm-rv32im-circuit = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } -# openvm-sdk = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } +openvm = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } +openvm-circuit = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } +openvm-continuations = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } +openvm-instructions = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } +openvm-native-circuit = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } +openvm-native-compiler = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } +openvm-native-compiler-derive = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } +openvm-native-recursion = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } +openvm-rv32im-circuit = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } +openvm-sdk = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } -openvm = { path = "../../openvm-scroll-tech/crates/toolchain/openvm", default-features = false } -openvm-circuit = { path = "../../openvm-scroll-tech/crates/vm", default-features = false } -openvm-continuations = { path = "../../openvm-scroll-tech/crates/continuations", default-features = false } -openvm-instructions = { path = "../../openvm-scroll-tech/crates/toolchain/instructions", default-features = false } -openvm-native-circuit = { path = "../../openvm-scroll-tech/extensions/native/circuit", default-features = false } -openvm-native-compiler = { path = "../../openvm-scroll-tech/extensions/native/compiler", default-features = false } -openvm-native-compiler-derive = { path = "../../openvm-scroll-tech/extensions/native/compiler/derive", default-features = false } -openvm-native-recursion = { path = "../../openvm-scroll-tech/extensions/native/recursion", default-features = false } -openvm-rv32im-circuit = { path = "../../openvm-scroll-tech/extensions/rv32im/circuit", default-features = false } -openvm-sdk = { path = "../../openvm-scroll-tech/crates/sdk", default-features = false } +# openvm = { path = "../../openvm-scroll-tech/crates/toolchain/openvm", default-features = false } +# openvm-circuit = { path = "../../openvm-scroll-tech/crates/vm", default-features = false } +# openvm-continuations = { path = "../../openvm-scroll-tech/crates/continuations", default-features = false } +# openvm-instructions = { path = "../../openvm-scroll-tech/crates/toolchain/instructions", default-features = false } +# openvm-native-circuit = { path = "../../openvm-scroll-tech/extensions/native/circuit", default-features = false } +# openvm-native-compiler = { path = "../../openvm-scroll-tech/extensions/native/compiler", default-features = false } +# openvm-native-compiler-derive = { path = "../../openvm-scroll-tech/extensions/native/compiler/derive", default-features = false } +# openvm-native-recursion = { path = "../../openvm-scroll-tech/extensions/native/recursion", default-features = false } +# openvm-rv32im-circuit = { path = "../../openvm-scroll-tech/extensions/rv32im/circuit", default-features = false } +# openvm-sdk = { path = "../../openvm-scroll-tech/crates/sdk", default-features = false } openvm-stark-backend = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v1.2.1", default-features = false } openvm-stark-sdk = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v1.2.1", default-features = false } +openvm-cuda-backend = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v1.2.1", default-features = false } p3-monty-31 = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" } [features] # bench-metrics = ["openvm-circuit/bench-metrics"] default = ["parallel", "nightly-features"] +cuda = ["openvm-circuit/cuda", "openvm-native-circuit/cuda"] nightly-features = [ "ceno_zkvm/nightly-features", "openvm-stark-sdk/nightly-features", diff --git a/ceno_recursion/src/aggregation/mod.rs b/ceno_recursion/src/aggregation/mod.rs index cac29a82b..a8d7f306e 100644 --- a/ceno_recursion/src/aggregation/mod.rs +++ b/ceno_recursion/src/aggregation/mod.rs @@ -10,8 +10,13 @@ use openvm_circuit::{ MemoryConfig, SystemConfig, VirtualMachine, VmExecutor, VmInstance, instructions::program::Program, }, - system::program::trace::VmCommittedExe, + system::program::trace::VmCommittedExe, utils::air_test_impl, }; + +#[cfg(feature = "cuda")] +use openvm_cuda_backend::engine::GpuBabyBearPoseidon2Engine as BabyBearPoseidon2Engine; +#[cfg(not(feature = "cuda"))] +use openvm_stark_sdk::config::baby_bear_poseidon2::BabyBearPoseidon2Engine; use openvm_continuations::{ C, verifier::{ @@ -37,7 +42,7 @@ use openvm_sdk::{ }; use openvm_stark_backend::{engine::StarkEngine, prover::hal::DeviceDataTransporter}; use openvm_stark_sdk::{ - config::{FriParameters, baby_bear_poseidon2::BabyBearPoseidon2Engine}, + config::{FriParameters, fri_params::standard_fri_params_with_100_bits_conjectured_security}, engine::StarkFriEngine, openvm_stark_backend::{config::StarkGenericConfig, keygen::types::MultiStarkVerifyingKey}, p3_bn254_fr::Bn254Fr, @@ -57,7 +62,7 @@ use openvm_circuit::{ }, system::{memory::CHUNK, program::trace::compute_exe_commit}, }; -use openvm_native_circuit::{NATIVE_MAX_TRACE_HEIGHTS, NativeCpuBuilder}; +use openvm_native_circuit::{NATIVE_MAX_TRACE_HEIGHTS}; use openvm_sdk::util::check_max_constraint_degrees; use openvm_stark_backend::proof::Proof; use openvm_native_compiler::{ @@ -89,6 +94,7 @@ impl CenoAggregationProver { vm_builder: NativeBuilder, vk: ZKVMVerifyingKey>, ) -> Self { + let vb = NativeBuilder::default(); let [leaf_fri_params, internal_fri_params, _root_fri_params] = [LEAF_LOG_BLOWUP, INTERNAL_LOG_BLOWUP, ROOT_LOG_BLOWUP] .map(FriParameters::standard_with_100_bits_conjectured_security); @@ -114,7 +120,7 @@ impl CenoAggregationProver { let leaf_engine = BabyBearPoseidon2Engine::new(leaf_fri_params); let (_, vm_pk) = VirtualMachine::new_with_keygen( leaf_engine, - NativeCpuBuilder, + vb.clone(), leaf_vm_config.clone(), ) .expect("leaf keygen"); @@ -164,7 +170,7 @@ impl CenoAggregationProver { let internal_engine = BabyBearPoseidon2Engine::new(internal_fri_params); let (internal_vm, vm_pk) = VirtualMachine::new_with_keygen( internal_engine, - NativeCpuBuilder, + vb, internal_vm_config.clone(), ) .expect("internal keygen"); @@ -666,12 +672,19 @@ pub fn verify_proofs( let mut config = NativeConfig::aggregation(0, poseidon2_max_constraint_degree); config.system.memory_config.max_access_adapter_n = 8; - let executor = VmExecutor::new(config).unwrap(); let exe = VmExe::new(program); - let interpreter = executor.instance(&exe).unwrap(); - interpreter - .execute(witness_stream, None) - .expect("verification should pass"); + + let fri_params = standard_fri_params_with_100_bits_conjectured_security(1); + let vb = NativeBuilder::default(); + air_test_impl::( + fri_params, + vb, + config, + exe, + witness_stream, + 1, + true + ).unwrap(); } } From 5acfdd4037f54d6af03173975ab4524a08dcf24b Mon Sep 17 00:00:00 2001 From: kunxian xia Date: Mon, 1 Dec 2025 11:51:57 +0800 Subject: [PATCH 2/8] patch openvm with local repo --- ceno_recursion/Cargo.toml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/ceno_recursion/Cargo.toml b/ceno_recursion/Cargo.toml index b4ecedaa6..202012bb8 100644 --- a/ceno_recursion/Cargo.toml +++ b/ceno_recursion/Cargo.toml @@ -46,16 +46,6 @@ openvm-native-recursion = { git = "https://github.com/scroll-tech/openvm.git", b openvm-rv32im-circuit = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } openvm-sdk = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } -# openvm = { path = "../../openvm-scroll-tech/crates/toolchain/openvm", default-features = false } -# openvm-circuit = { path = "../../openvm-scroll-tech/crates/vm", default-features = false } -# openvm-continuations = { path = "../../openvm-scroll-tech/crates/continuations", default-features = false } -# openvm-instructions = { path = "../../openvm-scroll-tech/crates/toolchain/instructions", default-features = false } -# openvm-native-circuit = { path = "../../openvm-scroll-tech/extensions/native/circuit", default-features = false } -# openvm-native-compiler = { path = "../../openvm-scroll-tech/extensions/native/compiler", default-features = false } -# openvm-native-compiler-derive = { path = "../../openvm-scroll-tech/extensions/native/compiler/derive", default-features = false } -# openvm-native-recursion = { path = "../../openvm-scroll-tech/extensions/native/recursion", default-features = false } -# openvm-rv32im-circuit = { path = "../../openvm-scroll-tech/extensions/rv32im/circuit", default-features = false } -# openvm-sdk = { path = "../../openvm-scroll-tech/crates/sdk", default-features = false } openvm-stark-backend = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v1.2.1", default-features = false } openvm-stark-sdk = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v1.2.1", default-features = false } @@ -71,3 +61,15 @@ nightly-features = [ "openvm-stark-sdk/nightly-features", ] parallel = ["openvm-stark-backend/parallel"] + +# [patch."https://github.com/scroll-tech/openvm.git"] +# openvm = { path = "../../openvm-scroll-tech/crates/toolchain/openvm", default-features = false } +# openvm-circuit = { path = "../../openvm-scroll-tech/crates/vm", default-features = false } +# openvm-continuations = { path = "../../openvm-scroll-tech/crates/continuations", default-features = false } +# openvm-instructions = { path = "../../openvm-scroll-tech/crates/toolchain/instructions", default-features = false } +# openvm-native-circuit = { path = "../../openvm-scroll-tech/extensions/native/circuit", default-features = false } +# openvm-native-compiler = { path = "../../openvm-scroll-tech/extensions/native/compiler", default-features = false } +# openvm-native-compiler-derive = { path = "../../openvm-scroll-tech/extensions/native/compiler/derive", default-features = false } +# openvm-native-recursion = { path = "../../openvm-scroll-tech/extensions/native/recursion", default-features = false } +# openvm-rv32im-circuit = { path = "../../openvm-scroll-tech/extensions/rv32im/circuit", default-features = false } +# openvm-sdk = { path = "../../openvm-scroll-tech/crates/sdk", default-features = false } From 395552efc42964dcc77afb931494fd50415f4cac Mon Sep 17 00:00:00 2001 From: kunxian xia Date: Mon, 1 Dec 2025 14:01:58 +0800 Subject: [PATCH 3/8] patch outside --- Cargo.lock | 47 --------------------------------------- Cargo.toml | 28 +++++++++++++++++++++++ ceno_recursion/Cargo.toml | 40 +++++++++++---------------------- 3 files changed, 41 insertions(+), 74 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f1a231eff..9e1c89f3e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3688,7 +3688,6 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openvm" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "bytemuck", "num-bigint 0.4.6", @@ -3701,7 +3700,6 @@ dependencies = [ [[package]] name = "openvm-algebra-circuit" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -3730,7 +3728,6 @@ dependencies = [ [[package]] name = "openvm-algebra-complex-macros" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-macros-common", "quote", @@ -3740,7 +3737,6 @@ dependencies = [ [[package]] name = "openvm-algebra-guest" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "halo2curves-axiom", "num-bigint 0.4.6", @@ -3756,7 +3752,6 @@ dependencies = [ [[package]] name = "openvm-algebra-moduli-macros" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "num-bigint 0.4.6", "num-prime", @@ -3768,7 +3763,6 @@ dependencies = [ [[package]] name = "openvm-algebra-transpiler" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-algebra-guest", "openvm-instructions", @@ -3782,7 +3776,6 @@ dependencies = [ [[package]] name = "openvm-bigint-circuit" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -3805,7 +3798,6 @@ dependencies = [ [[package]] name = "openvm-bigint-guest" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-platform", "strum_macros", @@ -3814,7 +3806,6 @@ dependencies = [ [[package]] name = "openvm-bigint-transpiler" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-bigint-guest", "openvm-instructions", @@ -3829,7 +3820,6 @@ dependencies = [ [[package]] name = "openvm-build" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cargo_metadata 0.18.1", "eyre", @@ -3841,7 +3831,6 @@ dependencies = [ [[package]] name = "openvm-circuit" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "backtrace", "cfg-if", @@ -3879,7 +3868,6 @@ dependencies = [ [[package]] name = "openvm-circuit-derive" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "itertools 0.14.0", "proc-macro2", @@ -3890,7 +3878,6 @@ dependencies = [ [[package]] name = "openvm-circuit-primitives" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "derive-new 0.6.0", "itertools 0.14.0", @@ -3908,7 +3895,6 @@ dependencies = [ [[package]] name = "openvm-circuit-primitives-derive" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "itertools 0.14.0", "quote", @@ -3918,7 +3904,6 @@ dependencies = [ [[package]] name = "openvm-continuations" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "derivative", "openvm-circuit", @@ -3988,7 +3973,6 @@ dependencies = [ [[package]] name = "openvm-custom-insn" version = "0.1.0" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "proc-macro2", "quote", @@ -3998,7 +3982,6 @@ dependencies = [ [[package]] name = "openvm-ecc-circuit" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -4027,7 +4010,6 @@ dependencies = [ [[package]] name = "openvm-ecc-guest" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "ecdsa 0.16.9 (registry+https://github.com/rust-lang/crates.io-index)", "elliptic-curve", @@ -4046,7 +4028,6 @@ dependencies = [ [[package]] name = "openvm-ecc-sw-macros" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-macros-common", "quote", @@ -4056,7 +4037,6 @@ dependencies = [ [[package]] name = "openvm-ecc-transpiler" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-ecc-guest", "openvm-instructions", @@ -4070,7 +4050,6 @@ dependencies = [ [[package]] name = "openvm-instructions" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "backtrace", "derive-new 0.6.0", @@ -4087,7 +4066,6 @@ dependencies = [ [[package]] name = "openvm-instructions-derive" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "quote", "syn 2.0.101", @@ -4096,7 +4074,6 @@ dependencies = [ [[package]] name = "openvm-keccak256-circuit" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -4121,7 +4098,6 @@ dependencies = [ [[package]] name = "openvm-keccak256-guest" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-platform", ] @@ -4129,7 +4105,6 @@ dependencies = [ [[package]] name = "openvm-keccak256-transpiler" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-instructions", "openvm-instructions-derive", @@ -4143,7 +4118,6 @@ dependencies = [ [[package]] name = "openvm-macros-common" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "syn 2.0.101", ] @@ -4151,7 +4125,6 @@ dependencies = [ [[package]] name = "openvm-mod-circuit-builder" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "itertools 0.14.0", "num-bigint 0.4.6", @@ -4169,7 +4142,6 @@ dependencies = [ [[package]] name = "openvm-native-circuit" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -4200,7 +4172,6 @@ dependencies = [ [[package]] name = "openvm-native-compiler" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "backtrace", "itertools 0.14.0", @@ -4222,7 +4193,6 @@ dependencies = [ [[package]] name = "openvm-native-compiler-derive" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "quote", "syn 2.0.101", @@ -4231,7 +4201,6 @@ dependencies = [ [[package]] name = "openvm-native-recursion" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "itertools 0.14.0", @@ -4255,7 +4224,6 @@ dependencies = [ [[package]] name = "openvm-native-transpiler" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-instructions", "openvm-transpiler", @@ -4265,7 +4233,6 @@ dependencies = [ [[package]] name = "openvm-pairing-circuit" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -4294,7 +4261,6 @@ dependencies = [ [[package]] name = "openvm-pairing-guest" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "halo2curves-axiom", "hex-literal", @@ -4315,7 +4281,6 @@ dependencies = [ [[package]] name = "openvm-pairing-transpiler" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-instructions", "openvm-pairing-guest", @@ -4328,7 +4293,6 @@ dependencies = [ [[package]] name = "openvm-platform" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "libm", "openvm-custom-insn", @@ -4338,7 +4302,6 @@ dependencies = [ [[package]] name = "openvm-poseidon2-air" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "derivative", "lazy_static", @@ -4356,7 +4319,6 @@ dependencies = [ [[package]] name = "openvm-rv32-adapters" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "derive-new 0.6.0", "itertools 0.14.0", @@ -4373,7 +4335,6 @@ dependencies = [ [[package]] name = "openvm-rv32im-circuit" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -4396,7 +4357,6 @@ dependencies = [ [[package]] name = "openvm-rv32im-guest" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-custom-insn", "p3-field", @@ -4406,7 +4366,6 @@ dependencies = [ [[package]] name = "openvm-rv32im-transpiler" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-instructions", "openvm-instructions-derive", @@ -4422,7 +4381,6 @@ dependencies = [ [[package]] name = "openvm-sdk" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "bitcode", "bon", @@ -4476,7 +4434,6 @@ dependencies = [ [[package]] name = "openvm-sha256-air" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-circuit-primitives", "openvm-stark-backend", @@ -4487,7 +4444,6 @@ dependencies = [ [[package]] name = "openvm-sha256-circuit" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -4510,7 +4466,6 @@ dependencies = [ [[package]] name = "openvm-sha256-guest" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-platform", ] @@ -4518,7 +4473,6 @@ dependencies = [ [[package]] name = "openvm-sha256-transpiler" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-instructions", "openvm-instructions-derive", @@ -4596,7 +4550,6 @@ dependencies = [ [[package]] name = "openvm-transpiler" version = "1.4.1" -source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "elf", "eyre", diff --git a/Cargo.toml b/Cargo.toml index 647040af5..61c1dcf56 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -87,6 +87,22 @@ uint = "0.8" ceno_gpu = { path = "utils/cuda_hal", package = "cuda_hal" } cudarc = { version = "0.17.3", features = ["driver", "cuda-version-from-build-system"] } +# ceno-recursion dependencies +openvm = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } +openvm-circuit = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } +openvm-continuations = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } +openvm-instructions = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } +openvm-native-circuit = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } +openvm-native-compiler = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } +openvm-native-compiler-derive = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } +openvm-native-recursion = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } +openvm-rv32im-circuit = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } +openvm-sdk = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } + +openvm-stark-backend = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v1.2.1", default-features = false } +openvm-stark-sdk = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v1.2.1", default-features = false } +openvm-cuda-backend = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v1.2.1", default-features = false } + [profile.dev] lto = "thin" # We are running our tests with optimizations turned on to make them faster. @@ -114,3 +130,15 @@ lto = "thin" #transcript = { path = "../gkr-backend/crates/transcript", package = "transcript" } #whir = { path = "../gkr-backend/crates/whir", package = "whir" } #witness = { path = "../gkr-backend/crates/witness", package = "witness" } + +[patch."https://github.com/scroll-tech/openvm.git"] +openvm = { path = "../openvm-scroll-tech/crates/toolchain/openvm", default-features = false } +openvm-circuit = { path = "../openvm-scroll-tech/crates/vm", default-features = false } +openvm-continuations = { path = "../openvm-scroll-tech/crates/continuations", default-features = false } +openvm-instructions = { path = "../openvm-scroll-tech/crates/toolchain/instructions", default-features = false } +openvm-native-circuit = { path = "../openvm-scroll-tech/extensions/native/circuit", default-features = false } +openvm-native-compiler = { path = "../openvm-scroll-tech/extensions/native/compiler", default-features = false } +openvm-native-compiler-derive = { path = "../openvm-scroll-tech/extensions/native/compiler/derive", default-features = false } +openvm-native-recursion = { path = "../openvm-scroll-tech/extensions/native/recursion", default-features = false } +openvm-rv32im-circuit = { path = "../openvm-scroll-tech/extensions/rv32im/circuit", default-features = false } +openvm-sdk = { path = "../openvm-scroll-tech/crates/sdk", default-features = false } diff --git a/ceno_recursion/Cargo.toml b/ceno_recursion/Cargo.toml index 3761e3e61..0a498cbf7 100644 --- a/ceno_recursion/Cargo.toml +++ b/ceno_recursion/Cargo.toml @@ -33,22 +33,20 @@ tracing-subscriber.workspace = true transcript.workspace = true whir.workspace = true witness.workspace = true +openvm.workspace = true +openvm-circuit.workspace = true +openvm-continuations.workspace = true +openvm-instructions.workspace = true +openvm-native-circuit.workspace = true +openvm-native-compiler.workspace = true +openvm-native-compiler-derive.workspace = true +openvm-native-recursion.workspace = true +openvm-rv32im-circuit.workspace = true +openvm-sdk.workspace = true +openvm-stark-sdk.workspace = true +openvm-stark-backend.workspace = true +openvm-cuda-backend.workspace = true -# openvm -openvm = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } -openvm-circuit = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } -openvm-continuations = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } -openvm-instructions = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } -openvm-native-circuit = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } -openvm-native-compiler = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } -openvm-native-compiler-derive = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } -openvm-native-recursion = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } -openvm-rv32im-circuit = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } -openvm-sdk = { git = "https://github.com/scroll-tech/openvm.git", branch = "feat/v1.4.1-scroll-ext", default-features = false } - -openvm-stark-backend = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v1.2.1", default-features = false } -openvm-stark-sdk = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v1.2.1", default-features = false } -openvm-cuda-backend = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v1.2.1", default-features = false } p3-monty-31 = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" } [features] @@ -60,15 +58,3 @@ nightly-features = [ "openvm-stark-sdk/nightly-features", ] parallel = ["openvm-stark-backend/parallel"] - -# [patch."https://github.com/scroll-tech/openvm.git"] -# openvm = { path = "../../openvm-scroll-tech/crates/toolchain/openvm", default-features = false } -# openvm-circuit = { path = "../../openvm-scroll-tech/crates/vm", default-features = false } -# openvm-continuations = { path = "../../openvm-scroll-tech/crates/continuations", default-features = false } -# openvm-instructions = { path = "../../openvm-scroll-tech/crates/toolchain/instructions", default-features = false } -# openvm-native-circuit = { path = "../../openvm-scroll-tech/extensions/native/circuit", default-features = false } -# openvm-native-compiler = { path = "../../openvm-scroll-tech/extensions/native/compiler", default-features = false } -# openvm-native-compiler-derive = { path = "../../openvm-scroll-tech/extensions/native/compiler/derive", default-features = false } -# openvm-native-recursion = { path = "../../openvm-scroll-tech/extensions/native/recursion", default-features = false } -# openvm-rv32im-circuit = { path = "../../openvm-scroll-tech/extensions/rv32im/circuit", default-features = false } -# openvm-sdk = { path = "../../openvm-scroll-tech/crates/sdk", default-features = false } From 0d7bc1daa1b698cf8d64d05dd26d675d205dd10a Mon Sep 17 00:00:00 2001 From: kunxian xia Date: Mon, 1 Dec 2025 14:37:07 +0800 Subject: [PATCH 4/8] without local patch --- Cargo.lock | 47 +++++++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 22 +++++++++++----------- 2 files changed, 58 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9e1c89f3e..f1a231eff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3688,6 +3688,7 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openvm" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "bytemuck", "num-bigint 0.4.6", @@ -3700,6 +3701,7 @@ dependencies = [ [[package]] name = "openvm-algebra-circuit" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -3728,6 +3730,7 @@ dependencies = [ [[package]] name = "openvm-algebra-complex-macros" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-macros-common", "quote", @@ -3737,6 +3740,7 @@ dependencies = [ [[package]] name = "openvm-algebra-guest" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "halo2curves-axiom", "num-bigint 0.4.6", @@ -3752,6 +3756,7 @@ dependencies = [ [[package]] name = "openvm-algebra-moduli-macros" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "num-bigint 0.4.6", "num-prime", @@ -3763,6 +3768,7 @@ dependencies = [ [[package]] name = "openvm-algebra-transpiler" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-algebra-guest", "openvm-instructions", @@ -3776,6 +3782,7 @@ dependencies = [ [[package]] name = "openvm-bigint-circuit" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -3798,6 +3805,7 @@ dependencies = [ [[package]] name = "openvm-bigint-guest" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-platform", "strum_macros", @@ -3806,6 +3814,7 @@ dependencies = [ [[package]] name = "openvm-bigint-transpiler" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-bigint-guest", "openvm-instructions", @@ -3820,6 +3829,7 @@ dependencies = [ [[package]] name = "openvm-build" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cargo_metadata 0.18.1", "eyre", @@ -3831,6 +3841,7 @@ dependencies = [ [[package]] name = "openvm-circuit" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "backtrace", "cfg-if", @@ -3868,6 +3879,7 @@ dependencies = [ [[package]] name = "openvm-circuit-derive" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "itertools 0.14.0", "proc-macro2", @@ -3878,6 +3890,7 @@ dependencies = [ [[package]] name = "openvm-circuit-primitives" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "derive-new 0.6.0", "itertools 0.14.0", @@ -3895,6 +3908,7 @@ dependencies = [ [[package]] name = "openvm-circuit-primitives-derive" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "itertools 0.14.0", "quote", @@ -3904,6 +3918,7 @@ dependencies = [ [[package]] name = "openvm-continuations" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "derivative", "openvm-circuit", @@ -3973,6 +3988,7 @@ dependencies = [ [[package]] name = "openvm-custom-insn" version = "0.1.0" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "proc-macro2", "quote", @@ -3982,6 +3998,7 @@ dependencies = [ [[package]] name = "openvm-ecc-circuit" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -4010,6 +4027,7 @@ dependencies = [ [[package]] name = "openvm-ecc-guest" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "ecdsa 0.16.9 (registry+https://github.com/rust-lang/crates.io-index)", "elliptic-curve", @@ -4028,6 +4046,7 @@ dependencies = [ [[package]] name = "openvm-ecc-sw-macros" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-macros-common", "quote", @@ -4037,6 +4056,7 @@ dependencies = [ [[package]] name = "openvm-ecc-transpiler" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-ecc-guest", "openvm-instructions", @@ -4050,6 +4070,7 @@ dependencies = [ [[package]] name = "openvm-instructions" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "backtrace", "derive-new 0.6.0", @@ -4066,6 +4087,7 @@ dependencies = [ [[package]] name = "openvm-instructions-derive" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "quote", "syn 2.0.101", @@ -4074,6 +4096,7 @@ dependencies = [ [[package]] name = "openvm-keccak256-circuit" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -4098,6 +4121,7 @@ dependencies = [ [[package]] name = "openvm-keccak256-guest" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-platform", ] @@ -4105,6 +4129,7 @@ dependencies = [ [[package]] name = "openvm-keccak256-transpiler" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-instructions", "openvm-instructions-derive", @@ -4118,6 +4143,7 @@ dependencies = [ [[package]] name = "openvm-macros-common" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "syn 2.0.101", ] @@ -4125,6 +4151,7 @@ dependencies = [ [[package]] name = "openvm-mod-circuit-builder" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "itertools 0.14.0", "num-bigint 0.4.6", @@ -4142,6 +4169,7 @@ dependencies = [ [[package]] name = "openvm-native-circuit" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -4172,6 +4200,7 @@ dependencies = [ [[package]] name = "openvm-native-compiler" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "backtrace", "itertools 0.14.0", @@ -4193,6 +4222,7 @@ dependencies = [ [[package]] name = "openvm-native-compiler-derive" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "quote", "syn 2.0.101", @@ -4201,6 +4231,7 @@ dependencies = [ [[package]] name = "openvm-native-recursion" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "itertools 0.14.0", @@ -4224,6 +4255,7 @@ dependencies = [ [[package]] name = "openvm-native-transpiler" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-instructions", "openvm-transpiler", @@ -4233,6 +4265,7 @@ dependencies = [ [[package]] name = "openvm-pairing-circuit" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -4261,6 +4294,7 @@ dependencies = [ [[package]] name = "openvm-pairing-guest" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "halo2curves-axiom", "hex-literal", @@ -4281,6 +4315,7 @@ dependencies = [ [[package]] name = "openvm-pairing-transpiler" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-instructions", "openvm-pairing-guest", @@ -4293,6 +4328,7 @@ dependencies = [ [[package]] name = "openvm-platform" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "libm", "openvm-custom-insn", @@ -4302,6 +4338,7 @@ dependencies = [ [[package]] name = "openvm-poseidon2-air" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "derivative", "lazy_static", @@ -4319,6 +4356,7 @@ dependencies = [ [[package]] name = "openvm-rv32-adapters" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "derive-new 0.6.0", "itertools 0.14.0", @@ -4335,6 +4373,7 @@ dependencies = [ [[package]] name = "openvm-rv32im-circuit" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -4357,6 +4396,7 @@ dependencies = [ [[package]] name = "openvm-rv32im-guest" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-custom-insn", "p3-field", @@ -4366,6 +4406,7 @@ dependencies = [ [[package]] name = "openvm-rv32im-transpiler" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-instructions", "openvm-instructions-derive", @@ -4381,6 +4422,7 @@ dependencies = [ [[package]] name = "openvm-sdk" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "bitcode", "bon", @@ -4434,6 +4476,7 @@ dependencies = [ [[package]] name = "openvm-sha256-air" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-circuit-primitives", "openvm-stark-backend", @@ -4444,6 +4487,7 @@ dependencies = [ [[package]] name = "openvm-sha256-circuit" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -4466,6 +4510,7 @@ dependencies = [ [[package]] name = "openvm-sha256-guest" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-platform", ] @@ -4473,6 +4518,7 @@ dependencies = [ [[package]] name = "openvm-sha256-transpiler" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "openvm-instructions", "openvm-instructions-derive", @@ -4550,6 +4596,7 @@ dependencies = [ [[package]] name = "openvm-transpiler" version = "1.4.1" +source = "git+https://github.com/scroll-tech/openvm.git?branch=feat%2Fv1.4.1-scroll-ext#30e9eff582a1be608a08bbd9546b708958cd5399" dependencies = [ "elf", "eyre", diff --git a/Cargo.toml b/Cargo.toml index 61c1dcf56..523d42f7b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -131,14 +131,14 @@ lto = "thin" #whir = { path = "../gkr-backend/crates/whir", package = "whir" } #witness = { path = "../gkr-backend/crates/witness", package = "witness" } -[patch."https://github.com/scroll-tech/openvm.git"] -openvm = { path = "../openvm-scroll-tech/crates/toolchain/openvm", default-features = false } -openvm-circuit = { path = "../openvm-scroll-tech/crates/vm", default-features = false } -openvm-continuations = { path = "../openvm-scroll-tech/crates/continuations", default-features = false } -openvm-instructions = { path = "../openvm-scroll-tech/crates/toolchain/instructions", default-features = false } -openvm-native-circuit = { path = "../openvm-scroll-tech/extensions/native/circuit", default-features = false } -openvm-native-compiler = { path = "../openvm-scroll-tech/extensions/native/compiler", default-features = false } -openvm-native-compiler-derive = { path = "../openvm-scroll-tech/extensions/native/compiler/derive", default-features = false } -openvm-native-recursion = { path = "../openvm-scroll-tech/extensions/native/recursion", default-features = false } -openvm-rv32im-circuit = { path = "../openvm-scroll-tech/extensions/rv32im/circuit", default-features = false } -openvm-sdk = { path = "../openvm-scroll-tech/crates/sdk", default-features = false } +# [patch."https://github.com/scroll-tech/openvm.git"] +# openvm = { path = "../openvm-scroll-tech/crates/toolchain/openvm", default-features = false } +# openvm-circuit = { path = "../openvm-scroll-tech/crates/vm", default-features = false } +# openvm-continuations = { path = "../openvm-scroll-tech/crates/continuations", default-features = false } +# openvm-instructions = { path = "../openvm-scroll-tech/crates/toolchain/instructions", default-features = false } +# openvm-native-circuit = { path = "../openvm-scroll-tech/extensions/native/circuit", default-features = false } +# openvm-native-compiler = { path = "../openvm-scroll-tech/extensions/native/compiler", default-features = false } +# openvm-native-compiler-derive = { path = "../openvm-scroll-tech/extensions/native/compiler/derive", default-features = false } +# openvm-native-recursion = { path = "../openvm-scroll-tech/extensions/native/recursion", default-features = false } +# openvm-rv32im-circuit = { path = "../openvm-scroll-tech/extensions/rv32im/circuit", default-features = false } +# openvm-sdk = { path = "../openvm-scroll-tech/crates/sdk", default-features = false } From a004207904e32b626bc7ab2edb090880b12fcebd Mon Sep 17 00:00:00 2001 From: kunxian xia Date: Mon, 1 Dec 2025 14:38:06 +0800 Subject: [PATCH 5/8] set max_access_adapter_n to 16 --- ceno_recursion/src/aggregation/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ceno_recursion/src/aggregation/mod.rs b/ceno_recursion/src/aggregation/mod.rs index 1016ddc3d..5ae37ead1 100644 --- a/ceno_recursion/src/aggregation/mod.rs +++ b/ceno_recursion/src/aggregation/mod.rs @@ -652,7 +652,7 @@ pub fn verify_proofs( let poseidon2_max_constraint_degree: usize = 3; let mut config = NativeConfig::aggregation(0, poseidon2_max_constraint_degree); - config.system.memory_config.max_access_adapter_n = 8; + config.system.memory_config.max_access_adapter_n = 16; let exe = VmExe::new(program); From bb33ae9274ceb6205f7464149cf3c1f7af6566ef Mon Sep 17 00:00:00 2001 From: kunxian xia Date: Mon, 1 Dec 2025 15:28:26 +0800 Subject: [PATCH 6/8] add binary --- ceno_recursion/Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ceno_recursion/Cargo.toml b/ceno_recursion/Cargo.toml index 0a498cbf7..c977ead30 100644 --- a/ceno_recursion/Cargo.toml +++ b/ceno_recursion/Cargo.toml @@ -49,6 +49,10 @@ openvm-cuda-backend.workspace = true p3-monty-31 = { git = "https://github.com/Plonky3/Plonky3.git", rev = "539bbc84085efb609f4f62cb03cf49588388abdb" } +[[bin]] +name = "e2e_aggregate" +path = "src/bin/e2e_aggregate.rs" + [features] # bench-metrics = ["openvm-circuit/bench-metrics"] default = ["parallel", "nightly-features"] From 236e9e4593f08c21dcbea5a0720f151e2c5951af Mon Sep 17 00:00:00 2001 From: kunxian xia Date: Mon, 1 Dec 2025 16:31:25 +0800 Subject: [PATCH 7/8] num_public_values need to be multiple of 8 --- ceno_recursion/src/aggregation/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ceno_recursion/src/aggregation/mod.rs b/ceno_recursion/src/aggregation/mod.rs index 5ae37ead1..c559c6777 100644 --- a/ceno_recursion/src/aggregation/mod.rs +++ b/ceno_recursion/src/aggregation/mod.rs @@ -153,6 +153,8 @@ impl CenoAggregationProver { .expect("leaf prover"); // Configure vm for internal layers + // needs to be a multiple of DIGEST_SIZE + let num_public_values = InternalVmVerifierPvs::::width().div_ceil(DIGEST_SIZE) * DIGEST_SIZE; let internal_vm_config = NativeConfig { system: SystemConfig::new( SBOX_SIZE.min(internal_fri_params.max_constraint_degree()), @@ -160,7 +162,7 @@ impl CenoAggregationProver { max_access_adapter_n: 8, ..Default::default() }, - InternalVmVerifierPvs::::width(), + num_public_values, ) .with_max_segment_len((1 << 24) - 100), native: Default::default(), From 190b2711f14934d936eacd4495269600092525a1 Mon Sep 17 00:00:00 2001 From: kunxian xia Date: Mon, 1 Dec 2025 16:34:16 +0800 Subject: [PATCH 8/8] rename gpu feature --- ceno_recursion/Cargo.toml | 2 +- ceno_recursion/src/aggregation/mod.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ceno_recursion/Cargo.toml b/ceno_recursion/Cargo.toml index c977ead30..6181a4237 100644 --- a/ceno_recursion/Cargo.toml +++ b/ceno_recursion/Cargo.toml @@ -56,7 +56,7 @@ path = "src/bin/e2e_aggregate.rs" [features] # bench-metrics = ["openvm-circuit/bench-metrics"] default = ["parallel", "nightly-features"] -cuda = ["openvm-circuit/cuda", "openvm-native-circuit/cuda"] +gpu = ["openvm-circuit/cuda", "openvm-native-circuit/cuda"] nightly-features = [ "ceno_zkvm/nightly-features", "openvm-stark-sdk/nightly-features", diff --git a/ceno_recursion/src/aggregation/mod.rs b/ceno_recursion/src/aggregation/mod.rs index c559c6777..12f23298f 100644 --- a/ceno_recursion/src/aggregation/mod.rs +++ b/ceno_recursion/src/aggregation/mod.rs @@ -13,9 +13,9 @@ use openvm_circuit::{ system::program::trace::VmCommittedExe, utils::air_test_impl, }; -#[cfg(feature = "cuda")] +#[cfg(feature = "gpu")] use openvm_cuda_backend::engine::GpuBabyBearPoseidon2Engine as BabyBearPoseidon2Engine; -#[cfg(not(feature = "cuda"))] +#[cfg(not(feature = "gpu"))] use openvm_stark_sdk::config::baby_bear_poseidon2::BabyBearPoseidon2Engine; use openvm_continuations::{ C,