@@ -15,9 +15,7 @@ use openvm_circuit_derive::{AnyEnum, InstructionExecutor, VmConfig};
1515use openvm_circuit_primitives_derive:: { Chip , ChipUsageGetter } ;
1616use openvm_instructions:: { program:: DEFAULT_PC_STEP , LocalOpcode , PhantomDiscriminant } ;
1717use openvm_native_compiler:: {
18- CastfOpcode , FieldArithmeticOpcode , FieldExtensionOpcode , FriOpcode , NativeBranchEqualOpcode ,
19- NativeJalOpcode , NativeLoadStore4Opcode , NativeLoadStoreOpcode , NativePhantom ,
20- NativeRangeCheckOpcode , Poseidon2Opcode , VerifyBatchOpcode , BLOCK_LOAD_STORE_SIZE ,
18+ CastfOpcode , FieldArithmeticOpcode , FieldExtensionOpcode , FriOpcode , NativeBranchEqualOpcode , NativeJalOpcode , NativeLoadStore4Opcode , NativeLoadStoreOpcode , NativePhantom , NativeRangeCheckOpcode , Poseidon2Opcode , SumcheckOpcode , VerifyBatchOpcode , BLOCK_LOAD_STORE_SIZE
2119} ;
2220use openvm_poseidon2_air:: Poseidon2Config ;
2321use openvm_rv32im_circuit:: {
@@ -29,10 +27,7 @@ use serde::{Deserialize, Serialize};
2927use strum:: IntoEnumIterator ;
3028
3129use crate :: {
32- adapters:: { convert_adapter:: ConvertAdapterChip , * } ,
33- poseidon2:: chip:: NativePoseidon2Chip ,
34- phantom:: * ,
35- * ,
30+ adapters:: { convert_adapter:: ConvertAdapterChip , * } , phantom:: * , poseidon2:: chip:: NativePoseidon2Chip , sumcheck:: chip:: NativeSumcheckChip , *
3631} ;
3732
3833#[ derive( Clone , Debug , Serialize , Deserialize , VmConfig , derive_new:: new) ]
@@ -76,6 +71,7 @@ pub enum NativeExecutor<F: PrimeField32> {
7671 FieldExtension ( FieldExtensionChip < F > ) ,
7772 FriReducedOpening ( FriReducedOpeningChip < F > ) ,
7873 VerifyBatch ( NativePoseidon2Chip < F , 1 > ) ,
74+ SumcheckLayerEval ( NativeSumcheckChip < F > ) ,
7975}
8076
8177#[ derive( From , ChipUsageGetter , Chip , AnyEnum ) ]
@@ -207,6 +203,17 @@ impl<F: PrimeField32> VmExtension<F> for Native {
207203 ] ,
208204 ) ?;
209205
206+ let sumcheck_chip = NativeSumcheckChip :: new (
207+ builder. system_port ( ) ,
208+ offline_memory. clone ( ) ,
209+ ) ;
210+ inventory. add_executor (
211+ sumcheck_chip,
212+ [
213+ SumcheckOpcode :: SUMCHECK_LAYER_EVAL . global_opcode ( ) ,
214+ ]
215+ ) ?;
216+
210217 builder. add_phantom_sub_executor (
211218 NativeHintInputSubEx ,
212219 PhantomDiscriminant ( NativePhantom :: HintInput as u16 ) ,
0 commit comments