Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
ac02ac5
Add native sumcheck chip
darth-cy Sep 16, 2025
d18ef80
Complete sumcheck layer execution logic
darth-cy Sep 17, 2025
7846a3c
Remove debug flags
darth-cy Sep 17, 2025
99c9f4c
Add variation
darth-cy Sep 17, 2025
1e06dc7
Cherry pick column reduction commits
darth-cy Sep 21, 2025
8c33bc6
Add record assignments
darth-cy Sep 22, 2025
5f1903e
Adjust unit test
darth-cy Sep 23, 2025
8f780da
Correct header row register reads
darth-cy Sep 23, 2025
f9023a5
Correct header row register reads
darth-cy Sep 23, 2025
1ae5182
Correct header row register read
darth-cy Sep 23, 2025
49f337f
Correct rw records for prod rows
darth-cy Sep 23, 2025
5d6a236
Debug constraints
darth-cy Sep 24, 2025
368cb99
Debug constraints
darth-cy Sep 24, 2025
0785a3e
Debug constraints
darth-cy Sep 24, 2025
de79174
Debug constraints
darth-cy Sep 24, 2025
e1194c2
Debug constraints
darth-cy Sep 24, 2025
6aaea67
Debug constraints
darth-cy Sep 24, 2025
75df4f3
Debug constraints
darth-cy Sep 24, 2025
2cbbb78
Degree reduction
darth-cy Sep 24, 2025
7e56928
Reduce degree
darth-cy Sep 24, 2025
18f0b75
Reduce degree
darth-cy Sep 24, 2025
7096b8b
Disable debug flag
darth-cy Sep 25, 2025
25a72ba
Debug constraints
darth-cy Sep 25, 2025
a43bd22
Recover constraints
darth-cy Sep 25, 2025
5b50b5b
Debug constraints
darth-cy Sep 25, 2025
12fe6fd
Debug constraints
darth-cy Sep 25, 2025
21a8971
Debug constraints
darth-cy Sep 25, 2025
8ad853a
Debug constraints
darth-cy Sep 25, 2025
4d28b21
Debug constraints:
darth-cy Sep 25, 2025
7be1fd8
Debug constraints
darth-cy Sep 25, 2025
964cee3
Debug constraints
darth-cy Sep 25, 2025
2da96e0
Debug constraints
darth-cy Sep 25, 2025
a3ab084
Debug constraints
darth-cy Sep 25, 2025
39afd1a
Debug constraints
darth-cy Sep 25, 2025
892d1d0
Add debug flag
darth-cy Sep 26, 2025
a817f6f
Remove debug flags
darth-cy Sep 26, 2025
de77242
Debug constraint
Sep 28, 2025
af6fc63
Correct constraints
Sep 28, 2025
b0c1e4d
Remove debug flags
Sep 28, 2025
72b6c5e
Prover field access
darth-cy Oct 9, 2025
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ Cargo.lock
**/.env
.DS_Store

# Log outputs
*.log

.cache/
rustc-*

Expand Down
8 changes: 4 additions & 4 deletions crates/sdk/src/prover/agg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ use crate::{
};

pub struct AggStarkProver<E: StarkFriEngine<SC>> {
leaf_prover: VmLocalProver<SC, NativeConfig, E>,
leaf_controller: LeafProvingController,
pub leaf_prover: VmLocalProver<SC, NativeConfig, E>,
pub leaf_controller: LeafProvingController,

internal_prover: VmLocalProver<SC, NativeConfig, E>,
root_prover: RootVerifierLocalProver,
pub internal_prover: VmLocalProver<SC, NativeConfig, E>,
pub root_prover: RootVerifierLocalProver,

pub num_children_internal: usize,
pub max_internal_wrapper_layers: usize,
Expand Down
21 changes: 14 additions & 7 deletions extensions/native/circuit/src/extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ use openvm_circuit_derive::{AnyEnum, InstructionExecutor, VmConfig};
use openvm_circuit_primitives_derive::{Chip, ChipUsageGetter};
use openvm_instructions::{program::DEFAULT_PC_STEP, LocalOpcode, PhantomDiscriminant};
use openvm_native_compiler::{
CastfOpcode, FieldArithmeticOpcode, FieldExtensionOpcode, FriOpcode, NativeBranchEqualOpcode,
NativeJalOpcode, NativeLoadStore4Opcode, NativeLoadStoreOpcode, NativePhantom,
NativeRangeCheckOpcode, Poseidon2Opcode, VerifyBatchOpcode, BLOCK_LOAD_STORE_SIZE,
CastfOpcode, FieldArithmeticOpcode, FieldExtensionOpcode, FriOpcode, NativeBranchEqualOpcode, NativeJalOpcode, NativeLoadStore4Opcode, NativeLoadStoreOpcode, NativePhantom, NativeRangeCheckOpcode, Poseidon2Opcode, SumcheckOpcode, VerifyBatchOpcode, BLOCK_LOAD_STORE_SIZE
};
use openvm_poseidon2_air::Poseidon2Config;
use openvm_rv32im_circuit::{
Expand All @@ -29,10 +27,7 @@ use serde::{Deserialize, Serialize};
use strum::IntoEnumIterator;

use crate::{
adapters::{convert_adapter::ConvertAdapterChip, *},
poseidon2::chip::NativePoseidon2Chip,
phantom::*,
*,
adapters::{convert_adapter::ConvertAdapterChip, *}, phantom::*, poseidon2::chip::NativePoseidon2Chip, sumcheck::chip::NativeSumcheckChip, *
};

#[derive(Clone, Debug, Serialize, Deserialize, VmConfig, derive_new::new)]
Expand Down Expand Up @@ -76,6 +71,7 @@ pub enum NativeExecutor<F: PrimeField32> {
FieldExtension(FieldExtensionChip<F>),
FriReducedOpening(FriReducedOpeningChip<F>),
VerifyBatch(NativePoseidon2Chip<F, 1>),
SumcheckLayerEval(NativeSumcheckChip<F>),
}

#[derive(From, ChipUsageGetter, Chip, AnyEnum)]
Expand Down Expand Up @@ -207,6 +203,17 @@ impl<F: PrimeField32> VmExtension<F> for Native {
],
)?;

let sumcheck_chip = NativeSumcheckChip::new(
builder.system_port(),
offline_memory.clone(),
);
inventory.add_executor(
sumcheck_chip,
[
SumcheckOpcode::SUMCHECK_LAYER_EVAL.global_opcode(),
]
)?;

builder.add_phantom_sub_executor(
NativeHintInputSubEx,
PhantomDiscriminant(NativePhantom::HintInput as u16),
Expand Down
4 changes: 2 additions & 2 deletions extensions/native/circuit/src/field_extension/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@ impl FieldExtension {

pub(crate) fn add<V, E>(x: [V; EXT_DEG], y: [V; EXT_DEG]) -> [E; EXT_DEG]
where
V: Copy,
V: Clone,
V: Add<V, Output = E>,
{
array::from_fn(|i| x[i] + y[i])
array::from_fn(|i| x[i].clone() + y[i].clone())
}

pub(crate) fn subtract<V, E>(x: [V; EXT_DEG], y: [V; EXT_DEG]) -> [E; EXT_DEG]
Expand Down
2 changes: 1 addition & 1 deletion extensions/native/circuit/src/fri/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ fn assert_array_eq<AB: AirBuilder, I1: Into<AB::Expr>, I2: Into<AB::Expr>, const
}
}

fn elem_to_ext<F: Field>(elem: F) -> [F; EXT_DEG] {
pub fn elem_to_ext<F: Field>(elem: F) -> [F; EXT_DEG] {
let mut ret = [F::ZERO; EXT_DEG];
ret[0] = elem;
ret
Expand Down
2 changes: 2 additions & 0 deletions extensions/native/circuit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ mod fri;
mod jal;
mod loadstore;
mod poseidon2;
mod sumcheck;

pub use branch_eq::*;
pub use castf::*;
Expand All @@ -17,6 +18,7 @@ pub use fri::*;
pub use jal::*;
pub use loadstore::*;
pub use poseidon2::*;
pub use sumcheck::*;

mod extension;
pub use extension::*;
Expand Down
4 changes: 2 additions & 2 deletions extensions/native/circuit/src/poseidon2/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ use openvm_stark_backend::{
};

use crate::{
chip::TranscriptObservationRecord, poseidon2::{
poseidon2::{
chip::{
CellRecord, IncorporateRowRecord, IncorporateSiblingRecord, InsideRowRecord, NativePoseidon2Chip, SimplePoseidonRecord, VerifyBatchRecord, NUM_INITIAL_READS
TranscriptObservationRecord, CellRecord, IncorporateRowRecord, IncorporateSiblingRecord, InsideRowRecord, NativePoseidon2Chip, SimplePoseidonRecord, VerifyBatchRecord, NUM_INITIAL_READS
},
columns::{
InsideRowSpecificCols, MultiObserveCols, NativePoseidon2Cols, SimplePoseidonSpecificCols, TopLevelSpecificCols
Expand Down
Loading
Loading