Skip to content

sumcheck cycle analysis #4

New issue

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

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

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: metrics/cycle_analysis
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ eyre = "0.6.12"

# Plonky3
p3-air = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
p3-baby-bear = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
p3-field = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
p3-commit = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
p3-matrix = { git = "https://github.com/Plonky3/Plonky3.git", rev = "1ba4e5c" }
Expand All @@ -38,7 +39,10 @@ ark-serialize = "0.5"
# Ceno
ceno_zkvm = { git = "https://github.com/scroll-tech/ceno.git", branch = "feat/export_ff_ext" }
ceno_emul = { git = "https://github.com/scroll-tech/ceno.git", branch = "feat/export_ff_ext" }
ceno_sumcheck = { git = "https://github.com/scroll-tech/ceno.git", branch = "feat/export_ff_ext", package = "sumcheck" }
ceno_mle = { git = "https://github.com/scroll-tech/ceno.git", branch = "feat/export_ff_ext", package = "multilinear_extensions" }
mpcs = { git = "https://github.com/scroll-tech/ceno.git", branch = "feat/export_ff_ext" }
ceno_transcript = { git = "https://github.com/scroll-tech/ceno.git", branch = "feat/export_ff_ext", package = "transcript" }
ff_ext = { git = "https://github.com/scroll-tech/ceno.git", branch = "feat/export_ff_ext" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Expand All @@ -53,4 +57,4 @@ parallel = [
"openvm-native-recursion/parallel",
"openvm-stark-backend/parallel",
"openvm-stark-sdk/parallel",
]
]
25 changes: 12 additions & 13 deletions src/e2e/mod.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
use crate::tower_verifier::binding::IOPProverMessage;
use crate::zkvm_verifier::binding::ZKVMProofInput;
use crate::zkvm_verifier::binding::{
E, F, TowerProofInput, ZKVMOpcodeProofInput, ZKVMTableProofInput,
TowerProofInput, ZKVMOpcodeProofInput, ZKVMTableProofInput, E, F,
};
use crate::zkvm_verifier::verifier::verify_zkvm_proof;
use eyre::Result;
use ff_ext::BabyBearExt4;
use itertools::Itertools;
use mpcs::BasefoldCommitment;
use mpcs::{Basefold, BasefoldRSParams};
use openvm_circuit::arch::{SystemConfig, VmExecutor, instructions::program::Program};
use openvm_circuit::arch::{instructions::program::Program, SystemConfig, VmExecutor};
use openvm_native_circuit::{Native, NativeConfig};
use openvm_native_compiler::{asm::AsmBuilder, conversion::CompilerOptions, conversion::convert_program, asm::AsmCompiler};
use openvm_native_compiler::{
asm::AsmBuilder, asm::AsmCompiler, conversion::convert_program, conversion::CompilerOptions,
};
use openvm_native_recursion::hints::Hintable;
use openvm_stark_backend::config::StarkGenericConfig;
use openvm_stark_sdk::{
Expand All @@ -25,7 +27,7 @@ type SC = BabyBearPoseidon2Config;
type EF = <SC as StarkGenericConfig>::Challenge;

use ceno_zkvm::{
scheme::{ZKVMProof, verifier::ZKVMVerifier},
scheme::{verifier::ZKVMVerifier, ZKVMProof},
structs::ZKVMVerifyingKey,
};

Expand Down Expand Up @@ -468,7 +470,9 @@ pub fn test_zkvm_proof_verifier_from_bincode_exports() {
let asm_code = compiler.code();
println!("=> asm_code.blocks: {:?}", asm_code.blocks);
println!("=> asm_code.labels: {:?}", asm_code.labels);
let program: Program<p3_monty_31::MontyField31<openvm_stark_sdk::p3_baby_bear::BabyBearParameters>,> = convert_program(asm_code, options);
let program: Program<
p3_monty_31::MontyField31<openvm_stark_sdk::p3_baby_bear::BabyBearParameters>,
> = convert_program(asm_code, options);

return ();

Expand All @@ -492,14 +496,9 @@ pub fn test_zkvm_proof_verifier_from_bincode_exports() {
});
*/

let res = executor.execute_and_then(
program,
witness_stream,
|_, seg| {
Ok(seg)
},
|err| err,
).unwrap();
let res = executor
.execute_and_then(program, witness_stream, |_, seg| Ok(seg), |err| err)
.unwrap();

for (i, seg) in res.iter().enumerate() {
// println!("=> segment {:?} metrics: {:?}", i, seg.metrics);
Expand Down
Loading