@@ -17,7 +17,8 @@ use openvm_instructions::{program::DEFAULT_PC_STEP, LocalOpcode, PhantomDiscrimi
1717use openvm_native_compiler:: {
1818 CastfOpcode , FieldArithmeticOpcode , FieldExtensionOpcode , FriOpcode , NativeBranchEqualOpcode ,
1919 NativeJalOpcode , NativeLoadStore4Opcode , NativeLoadStoreOpcode , NativePhantom ,
20- NativeRangeCheckOpcode , Poseidon2Opcode , VerifyBatchOpcode , BLOCK_LOAD_STORE_SIZE ,
20+ NativeRangeCheckOpcode , Poseidon2Opcode , SumcheckOpcode , VerifyBatchOpcode ,
21+ BLOCK_LOAD_STORE_SIZE ,
2122} ;
2223use openvm_poseidon2_air:: Poseidon2Config ;
2324use openvm_rv32im_circuit:: BranchEqualCoreAir ;
@@ -61,6 +62,10 @@ use crate::{
6162 chip:: { NativePoseidon2Executor , NativePoseidon2Filler } ,
6263 NativePoseidon2Chip ,
6364 } ,
65+ sumcheck:: {
66+ air:: NativeSumcheckAir ,
67+ chip:: { NativeSumcheckChip , NativeSumcheckExecutor , NativeSumcheckFiller } ,
68+ } ,
6469} ;
6570
6671cfg_if:: cfg_if! {
@@ -94,6 +99,7 @@ pub enum NativeExecutor<F: Field> {
9499 FieldExtension ( FieldExtensionExecutor ) ,
95100 FriReducedOpening ( FriReducedOpeningExecutor ) ,
96101 VerifyBatch ( NativePoseidon2Executor < F , 1 > ) ,
102+ TowerVerify ( NativeSumcheckExecutor ) ,
97103}
98104
99105impl < F : PrimeField32 > VmExecutionExtension < F > for Native {
@@ -169,6 +175,12 @@ impl<F: PrimeField32> VmExecutionExtension<F> for Native {
169175 ] ,
170176 ) ?;
171177
178+ let tower_verify = NativeSumcheckExecutor :: new ( ) ;
179+ inventory. add_executor (
180+ tower_verify,
181+ [ SumcheckOpcode :: SUMCHECK_LAYER_EVAL . global_opcode ( ) ] ,
182+ ) ?;
183+
172184 inventory. add_phantom_sub_executor (
173185 NativeHintInputSubEx ,
174186 PhantomDiscriminant ( NativePhantom :: HintInput as u16 ) ,
@@ -262,6 +274,9 @@ where
262274 ) ;
263275 inventory. add_air ( verify_batch) ;
264276
277+ let tower_evaluate = NativeSumcheckAir :: new ( exec_bridge, memory_bridge) ;
278+ inventory. add_air ( tower_evaluate) ;
279+
265280 Ok ( ( ) )
266281 }
267282}
@@ -342,6 +357,9 @@ where
342357 ) ;
343358 inventory. add_executor_chip ( poseidon2) ;
344359
360+ let tower_verify = NativeSumcheckChip :: new ( NativeSumcheckFiller :: new ( ) , mem_helper. clone ( ) ) ;
361+ inventory. add_executor_chip ( tower_verify) ;
362+
345363 Ok ( ( ) )
346364 }
347365}
0 commit comments