diff --git a/Cargo.lock b/Cargo.lock index d3c7b93b6..e7f4b9287 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1160,6 +1160,7 @@ name = "ceno_recursion" version = "0.1.0" dependencies = [ "bincode 1.3.3", + "bitcode", "ceno-examples", "ceno_emul", "ceno_host", @@ -3681,7 +3682,7 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77e878c846a8abae00dd069496dbe8751b16ac1c3d6bd2a7283a938e8228f90d" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.4.0", "proc-macro2", "quote", "syn 2.0.101", @@ -3752,7 +3753,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "bytemuck", "num-bigint 0.4.6", @@ -3765,7 +3765,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -3794,7 +3793,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "openvm-macros-common", "quote", @@ -3804,7 +3802,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "halo2curves-axiom", "num-bigint 0.4.6", @@ -3820,7 +3817,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "num-bigint 0.4.6", "num-prime", @@ -3832,7 +3828,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "openvm-algebra-guest", "openvm-instructions", @@ -3846,7 +3841,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -3869,7 +3863,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "openvm-platform", "strum_macros", @@ -3878,7 +3871,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "openvm-bigint-guest", "openvm-instructions", @@ -3893,7 +3885,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "cargo_metadata 0.18.1", "eyre", @@ -3905,7 +3896,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "backtrace", "cfg-if", @@ -3944,7 +3934,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "itertools 0.14.0", "proc-macro2", @@ -3955,7 +3944,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "derive-new 0.6.0", "itertools 0.14.0", @@ -3973,7 +3961,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "itertools 0.14.0", "quote", @@ -3983,7 +3970,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "derivative", "openvm-circuit", @@ -4053,7 +4039,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "proc-macro2", "quote", @@ -4063,7 +4048,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -4092,7 +4076,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "ecdsa 0.16.9 (registry+https://github.com/rust-lang/crates.io-index)", "elliptic-curve", @@ -4111,7 +4094,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "openvm-macros-common", "quote", @@ -4121,7 +4103,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "openvm-ecc-guest", "openvm-instructions", @@ -4135,7 +4116,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "backtrace", "derive-new 0.6.0", @@ -4152,7 +4132,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "quote", "syn 2.0.101", @@ -4161,7 +4140,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -4186,7 +4164,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "openvm-platform", ] @@ -4194,7 +4171,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "openvm-instructions", "openvm-instructions-derive", @@ -4208,7 +4184,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "syn 2.0.101", ] @@ -4216,7 +4191,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "itertools 0.14.0", "num-bigint 0.4.6", @@ -4234,7 +4208,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -4265,7 +4238,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "backtrace", "itertools 0.14.0", @@ -4287,7 +4259,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "quote", "syn 2.0.101", @@ -4296,7 +4267,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "cfg-if", "itertools 0.14.0", @@ -4320,7 +4290,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "openvm-instructions", "openvm-transpiler", @@ -4330,7 +4299,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -4359,7 +4327,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "halo2curves-axiom", "hex-literal", @@ -4380,7 +4347,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "openvm-instructions", "openvm-pairing-guest", @@ -4393,7 +4359,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "libm", "openvm-custom-insn", @@ -4403,7 +4368,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "derivative", "lazy_static", @@ -4421,7 +4385,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "derive-new 0.6.0", "itertools 0.14.0", @@ -4438,7 +4401,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -4461,7 +4423,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "openvm-custom-insn", "p3-field", @@ -4471,7 +4432,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "openvm-instructions", "openvm-instructions-derive", @@ -4487,7 +4447,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "bitcode", "bon", @@ -4541,7 +4500,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "openvm-circuit-primitives", "openvm-stark-backend", @@ -4552,7 +4510,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "cfg-if", "derive-new 0.6.0", @@ -4575,7 +4532,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "openvm-platform", ] @@ -4583,7 +4539,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "openvm-instructions", "openvm-instructions-derive", @@ -4662,7 +4617,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#097e353b718628c7256cc1cac4b7a07101e7c887" dependencies = [ "elf", "eyre", diff --git a/Cargo.toml b/Cargo.toml index 0e4fd9890..5d568f4a7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -88,18 +88,28 @@ uint = "0.8" ceno_gpu = { git = "https://github.com/scroll-tech/ceno-gpu-mock.git", package = "cuda_hal", branch = "main", default-features = false, features = ["bb31"] } cudarc = { version = "0.17.3", features = ["driver", "cuda-version-from-build-system"] } +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 } # 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 = { 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-cuda-backend = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v1.2.1", 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 } @@ -139,14 +149,3 @@ 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 } diff --git a/ceno_recursion/Cargo.toml b/ceno_recursion/Cargo.toml index 3b978aa56..c1ddc9df1 100644 --- a/ceno_recursion/Cargo.toml +++ b/ceno_recursion/Cargo.toml @@ -10,6 +10,7 @@ repository.workspace = true version.workspace = true [dependencies] +bitcode = { version = "0.6.5", default-features = false, features = ["serde"] } bincode.workspace = true ceno-examples = { path = "../examples-builder" } ceno_emul = { path = "../ceno_emul" } @@ -53,7 +54,7 @@ path = "src/bin/e2e_aggregate.rs" [features] bench-metrics = ["openvm-circuit/metrics"] -default = ["parallel", "nightly-features"] +default = ["parallel", "nightly-features", "openvm-circuit/perf-metrics"] gpu = ["openvm-circuit/cuda", "openvm-native-circuit/cuda", "dep:openvm-cuda-backend"] nightly-features = [ "ceno_zkvm/nightly-features", diff --git a/ceno_recursion/src/aggregation/mod.rs b/ceno_recursion/src/aggregation/mod.rs index 27d6288c0..c3a86ef95 100644 --- a/ceno_recursion/src/aggregation/mod.rs +++ b/ceno_recursion/src/aggregation/mod.rs @@ -256,7 +256,13 @@ impl CenoAggregationProver { let zkvm_proof_inputs: Vec = base_proofs .into_iter() .enumerate() - .map(|(shard_id, p)| ZKVMProofInput::from((shard_id, p))) + .map(|(shard_id, p)| { + println!( + "leaf input {shard_id} has {} bytes", + bincode::serialized_size(&p).unwrap() + ); + ZKVMProofInput::from((shard_id, p)) + }) .collect(); let user_public_values: Vec = zkvm_proof_inputs .iter() @@ -289,6 +295,7 @@ impl CenoAggregationProver { // File::create(format!("leaf_proof_{:?}.bin", proof_idx)).expect("Create export proof file"); // bincode::serialize_into(file, &leaf_proof).expect("failed to serialize leaf proof"); + let leaf_proof_size = bincode::serialized_size(&leaf_proof).unwrap(); println!( "Aggregation - Completed leaf proof (idx: {:?}) at: {:?}, public values: {:?}", proof_idx, @@ -312,10 +319,17 @@ impl CenoAggregationProver { // We will always generate at least one internal proof, even if there is only one leaf // proof, in order to shrink the proof size while proofs.len() > 1 || internal_node_height == 0 { + for (i, proof) in proofs.iter().enumerate() { + println!( + "Internal aggregation layer {:?} node {i} has proof size: {:?} bytes", + internal_node_height, + bincode::serialized_size(proof).unwrap() + ); + } let internal_inputs = InternalVmVerifierInput::chunk_leaf_or_internal_proofs( (*self.internal_prover.program_commitment()).into(), &proofs, - DEFAULT_NUM_CHILDREN_INTERNAL, + 2, ); let layer_proofs: Vec> = internal_inputs @@ -720,16 +734,16 @@ mod tests { pub fn aggregation_inner_thread() { setup_tracing_with_log_level(tracing::Level::WARN); - let proof_path = "./src/imported/proof.bin"; - let vk_path = "./src/imported/vk.bin"; + let proof_path = "./src/imported/app_proof.bitcode"; + let vk_path = "./src/imported/app_vk.bitcode"; + let proof_bytes = std::fs::read(proof_path).unwrap(); + let vk_bytes = std::fs::read(vk_path).unwrap(); let zkvm_proofs: Vec>> = - bincode::deserialize_from(File::open(proof_path).expect("Failed to open proof file")) - .expect("Failed to deserialize proof file"); + bitcode::deserialize(&proof_bytes).expect("Failed to deserialize proof file"); let vk: ZKVMVerifyingKey> = - bincode::deserialize_from(File::open(vk_path).expect("Failed to open vk file")) - .expect("Failed to deserialize vk file"); + bitcode::deserialize(&vk_bytes).expect("Failed to deserialize vk file"); let mut agg_prover = CenoAggregationProver::from_base_vk(vk); let root_stark_proof = agg_prover.generate_root_proof(zkvm_proofs); diff --git a/ceno_recursion/src/imported/app_proof.bitcode b/ceno_recursion/src/imported/app_proof.bitcode new file mode 100644 index 000000000..4993e3b89 Binary files /dev/null and b/ceno_recursion/src/imported/app_proof.bitcode differ diff --git a/ceno_recursion/src/imported/app_vk.bitcode b/ceno_recursion/src/imported/app_vk.bitcode new file mode 100644 index 000000000..6ce68c86d Binary files /dev/null and b/ceno_recursion/src/imported/app_vk.bitcode differ