From 46aa270c8b7fc82e4dcece05ed96d116afcfe42a Mon Sep 17 00:00:00 2001 From: Avory Date: Mon, 29 Dec 2025 01:13:04 +0200 Subject: [PATCH 01/11] Update inputs.rs --- core/src/stack/inputs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/stack/inputs.rs b/core/src/stack/inputs.rs index 701b23e5f7..30ae766c01 100644 --- a/core/src/stack/inputs.rs +++ b/core/src/stack/inputs.rs @@ -13,7 +13,7 @@ use crate::utils::{ByteReader, Deserializable, DeserializationError}; /// /// The values in the struct are stored in the "stack order" - i.e., the last input is at the top /// of the stack (in position 0). -#[derive(Clone, Debug, Default)] +#[derive(Clone, Copy, Debug, Default)] pub struct StackInputs { elements: [Felt; MIN_STACK_DEPTH], } From 4e7262d8846eeb30e77b91a118de1fca31a9de3d Mon Sep 17 00:00:00 2001 From: Avory Date: Mon, 29 Dec 2025 01:13:15 +0200 Subject: [PATCH 02/11] Change StackOutputs to derive Copy trait --- core/src/stack/outputs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/stack/outputs.rs b/core/src/stack/outputs.rs index 647b83ca76..c7f60a94dd 100644 --- a/core/src/stack/outputs.rs +++ b/core/src/stack/outputs.rs @@ -16,7 +16,7 @@ use crate::utils::{ByteReader, Deserializable, DeserializationError, range}; /// `stack` is expected to be ordered as if the elements were popped off the stack one by one. /// Thus, the value at the top of the stack is expected to be in the first position, and the order /// of the rest of the output elements will also match the order on the stack. -#[derive(Debug, Clone, Default, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)] pub struct StackOutputs { elements: [Felt; MIN_STACK_DEPTH], } From 2cb5d7e365f72763e9c7f1ab9d917e0e6f5c520e Mon Sep 17 00:00:00 2001 From: Avory Date: Mon, 29 Dec 2025 01:23:02 +0200 Subject: [PATCH 03/11] fix clippy delete clone --- prover/src/lib.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/prover/src/lib.rs b/prover/src/lib.rs index a0e24e5d99..f4845b0255 100644 --- a/prover/src/lib.rs +++ b/prover/src/lib.rs @@ -101,7 +101,7 @@ pub fn prove( now.elapsed().as_millis() ); - let stack_outputs = trace.stack_outputs().clone(); + let stack_outputs = *trace.stack_outputs(); let hash_fn = options.hash_fn(); // extract precompile requests from the trace to include in the proof @@ -113,7 +113,7 @@ pub fn prove( let prover = ExecutionProver::>::new( options, stack_inputs, - stack_outputs.clone(), + stack_outputs, ); maybe_await!(prover.prove(trace)) }, @@ -121,7 +121,7 @@ pub fn prove( let prover = ExecutionProver::>::new( options, stack_inputs, - stack_outputs.clone(), + stack_outputs, ); maybe_await!(prover.prove(trace)) }, @@ -129,7 +129,7 @@ pub fn prove( let prover = ExecutionProver::::new( options, stack_inputs, - stack_outputs.clone(), + stack_outputs, ); #[cfg(all(feature = "metal", target_arch = "aarch64", target_os = "macos"))] let prover = gpu::metal::MetalExecutionProver::new(prover, HashFn::Rpo256); @@ -139,7 +139,7 @@ pub fn prove( let prover = ExecutionProver::::new( options, stack_inputs, - stack_outputs.clone(), + stack_outputs, ); #[cfg(all(feature = "metal", target_arch = "aarch64", target_os = "macos"))] let prover = gpu::metal::MetalExecutionProver::new(prover, HashFn::Rpx256); @@ -149,7 +149,7 @@ pub fn prove( let prover = ExecutionProver::>::new( options, stack_inputs, - stack_outputs.clone(), + stack_outputs, ); maybe_await!(prover.prove(trace)) }, @@ -249,8 +249,8 @@ where let final_pc_transcript = trace.final_precompile_transcript(); PublicInputs::new( program_info, - self.stack_inputs.clone(), - self.stack_outputs.clone(), + self.stack_inputs, + self.stack_outputs, final_pc_transcript.state(), ) } From 1166ad0c568ca52eb8136f1cc43321c35139eeb4 Mon Sep 17 00:00:00 2001 From: Avory Date: Mon, 29 Dec 2025 01:23:34 +0200 Subject: [PATCH 04/11] fix clippy delete clone --- crates/test-utils/src/lib.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/test-utils/src/lib.rs b/crates/test-utils/src/lib.rs index fdb0505c12..9ac51d8285 100644 --- a/crates/test-utils/src/lib.rs +++ b/crates/test-utils/src/lib.rs @@ -271,7 +271,7 @@ impl Test { let mut host = host.with_source_manager(self.source_manager.clone()); // execute the test - let stack_inputs: Vec = self.stack_inputs.clone().into_iter().rev().collect(); + let stack_inputs: Vec = self.stack_inputs.into_iter().rev().collect(); let processor = if self.in_debug_mode { FastProcessor::new_debug(&stack_inputs, self.advice_inputs.clone()) } else { @@ -379,7 +379,7 @@ impl Test { let mut host = host.with_source_manager(self.source_manager.clone()); let fast_stack_result = { - let stack_inputs: Vec = self.stack_inputs.clone().into_iter().rev().collect(); + let stack_inputs: Vec = self.stack_inputs.into_iter().rev().collect(); let advice_inputs: AdviceInputs = self.advice_inputs.clone(); let fast_processor = FastProcessor::new_with_advice_inputs(&stack_inputs, advice_inputs); @@ -410,7 +410,7 @@ impl Test { let mut host = host.with_source_manager(self.source_manager.clone()); let processor = FastProcessor::new_debug( - &self.stack_inputs.clone().into_iter().rev().collect::>(), + &self.stack_inputs.into_iter().rev().collect::>(), self.advice_inputs.clone(), ); @@ -430,7 +430,7 @@ impl Test { .with_debug_handler(debug_handler); let processor = FastProcessor::new_debug( - &self.stack_inputs.clone().into_iter().rev().collect::>(), + &self.stack_inputs.into_iter().rev().collect::>(), self.advice_inputs.clone(), ); @@ -457,7 +457,7 @@ impl Test { let stack_inputs = StackInputs::try_from_ints(pub_inputs).unwrap(); let (mut stack_outputs, proof) = miden_prover::prove( &program, - stack_inputs.clone(), + stack_inputs, self.advice_inputs.clone(), &mut host, ProvingOptions::default(), @@ -563,7 +563,7 @@ impl Test { let mut host = host.with_source_manager(self.source_manager.clone()); let fast_result_by_step = { - let stack_inputs: Vec = self.stack_inputs.clone().into_iter().rev().collect(); + let stack_inputs: Vec = self.stack_inputs.into_iter().rev().collect(); let advice_inputs: AdviceInputs = self.advice_inputs.clone(); let fast_process = FastProcessor::new_with_advice_inputs(&stack_inputs, advice_inputs); fast_process.execute_by_step_sync(&program, &mut host) From a9f76752771124448357389a15d194347deca34f Mon Sep 17 00:00:00 2001 From: Avory Date: Mon, 29 Dec 2025 01:24:13 +0200 Subject: [PATCH 05/11] fix clippy delete clone --- crates/lib/core/tests/sys/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/lib/core/tests/sys/mod.rs b/crates/lib/core/tests/sys/mod.rs index c8c198ba66..f30acbe66e 100644 --- a/crates/lib/core/tests/sys/mod.rs +++ b/crates/lib/core/tests/sys/mod.rs @@ -110,7 +110,7 @@ fn log_precompile_request_procedure() { let options = ProvingOptions::with_96_bit_security(miden_air::HashFunction::Blake3_192); let (stack_outputs, proof) = miden_utils_testing::prove( &program, - stack_inputs.clone(), + stack_inputs, advice_inputs, &mut host, options, From 3faafb499923a6b8de3a7e05ca4f1a5431c3cd22 Mon Sep 17 00:00:00 2001 From: Avory Date: Mon, 29 Dec 2025 01:24:52 +0200 Subject: [PATCH 06/11] fix clippy delete clone --- crates/lib/core/tests/stark/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/lib/core/tests/stark/mod.rs b/crates/lib/core/tests/stark/mod.rs index 87ca3801e0..069c647421 100644 --- a/crates/lib/core/tests/stark/mod.rs +++ b/crates/lib/core/tests/stark/mod.rs @@ -88,7 +88,7 @@ pub fn generate_recursive_verifier_data( ProvingOptions::new(27, 8, 0, FieldExtension::Quadratic, 4, 127, HashFunction::Rpo256); let (stack_outputs, proof) = - prove(&program, stack_inputs.clone(), advice_inputs, &mut host, options).unwrap(); + prove(&program, stack_inputs, advice_inputs, &mut host, options).unwrap(); let program_info = ProgramInfo::from(program); From 2581253feb5eecf0722de6dd6a212a8a19ca8010 Mon Sep 17 00:00:00 2001 From: Avory Date: Mon, 29 Dec 2025 01:25:37 +0200 Subject: [PATCH 07/11] fix clippy delete clone --- crates/lib/core/tests/crypto/falcon.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/lib/core/tests/crypto/falcon.rs b/crates/lib/core/tests/crypto/falcon.rs index f76a25be07..036974e339 100644 --- a/crates/lib/core/tests/crypto/falcon.rs +++ b/crates/lib/core/tests/crypto/falcon.rs @@ -300,7 +300,7 @@ fn falcon_prove_verify() { let options = ProvingOptions::with_96_bit_security(miden_air::HashFunction::Blake3_192); let (stack_outputs, proof) = miden_utils_testing::prove( &program, - stack_inputs.clone(), + stack_inputs, advice_inputs, &mut host, options, From 15bbefdc1863f0dc835c5bb023980ea36f20f001 Mon Sep 17 00:00:00 2001 From: Avory Date: Mon, 29 Dec 2025 01:30:46 +0200 Subject: [PATCH 08/11] Fix stack cloning in compare_results call --- crates/test-utils/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/test-utils/src/lib.rs b/crates/test-utils/src/lib.rs index 9ac51d8285..5d7a842dc8 100644 --- a/crates/test-utils/src/lib.rs +++ b/crates/test-utils/src/lib.rs @@ -570,7 +570,7 @@ impl Test { }; compare_results( - fast_result.as_ref().map(|(output, _)| output.stack.clone()), + fast_result.as_ref().map(|(output, _)| output.stack), &fast_result_by_step, "fast processor", "fast processor by step", From afa3258037b41e14caf72c24b42e90f5aac341a6 Mon Sep 17 00:00:00 2001 From: Avory Date: Sun, 28 Dec 2025 23:42:40 +0000 Subject: [PATCH 09/11] fix fmt --- crates/lib/core/tests/crypto/falcon.rs | 11 +++-------- crates/lib/core/tests/sys/mod.rs | 11 +++-------- prover/src/lib.rs | 14 ++++---------- 3 files changed, 10 insertions(+), 26 deletions(-) diff --git a/crates/lib/core/tests/crypto/falcon.rs b/crates/lib/core/tests/crypto/falcon.rs index 036974e339..80cb6f2498 100644 --- a/crates/lib/core/tests/crypto/falcon.rs +++ b/crates/lib/core/tests/crypto/falcon.rs @@ -298,14 +298,9 @@ fn falcon_prove_verify() { .unwrap(); let options = ProvingOptions::with_96_bit_security(miden_air::HashFunction::Blake3_192); - let (stack_outputs, proof) = miden_utils_testing::prove( - &program, - stack_inputs, - advice_inputs, - &mut host, - options, - ) - .expect("failed to generate proof"); + let (stack_outputs, proof) = + miden_utils_testing::prove(&program, stack_inputs, advice_inputs, &mut host, options) + .expect("failed to generate proof"); let program_info = ProgramInfo::from(program); let result = miden_utils_testing::verify(program_info, stack_inputs, stack_outputs, proof); diff --git a/crates/lib/core/tests/sys/mod.rs b/crates/lib/core/tests/sys/mod.rs index f30acbe66e..cc5f090494 100644 --- a/crates/lib/core/tests/sys/mod.rs +++ b/crates/lib/core/tests/sys/mod.rs @@ -108,14 +108,9 @@ fn log_precompile_request_procedure() { .expect("failed to register dummy handler"); let options = ProvingOptions::with_96_bit_security(miden_air::HashFunction::Blake3_192); - let (stack_outputs, proof) = miden_utils_testing::prove( - &program, - stack_inputs, - advice_inputs, - &mut host, - options, - ) - .expect("failed to generate proof for log_precompile helper"); + let (stack_outputs, proof) = + miden_utils_testing::prove(&program, stack_inputs, advice_inputs, &mut host, options) + .expect("failed to generate proof for log_precompile helper"); // Proof should include the single deferred request that we expect. assert_eq!(proof.precompile_requests().len(), 1); diff --git a/prover/src/lib.rs b/prover/src/lib.rs index f4845b0255..c78f90ee83 100644 --- a/prover/src/lib.rs +++ b/prover/src/lib.rs @@ -126,21 +126,15 @@ pub fn prove( maybe_await!(prover.prove(trace)) }, HashFunction::Rpo256 => { - let prover = ExecutionProver::::new( - options, - stack_inputs, - stack_outputs, - ); + let prover = + ExecutionProver::::new(options, stack_inputs, stack_outputs); #[cfg(all(feature = "metal", target_arch = "aarch64", target_os = "macos"))] let prover = gpu::metal::MetalExecutionProver::new(prover, HashFn::Rpo256); maybe_await!(prover.prove(trace)) }, HashFunction::Rpx256 => { - let prover = ExecutionProver::::new( - options, - stack_inputs, - stack_outputs, - ); + let prover = + ExecutionProver::::new(options, stack_inputs, stack_outputs); #[cfg(all(feature = "metal", target_arch = "aarch64", target_os = "macos"))] let prover = gpu::metal::MetalExecutionProver::new(prover, HashFn::Rpx256); maybe_await!(prover.prove(trace)) From 794f71c386243efec779e7e3706d2915d6058611 Mon Sep 17 00:00:00 2001 From: Avory Date: Mon, 5 Jan 2026 12:39:49 +0200 Subject: [PATCH 10/11] Clone stack outputs and convert precompile requests to vec --- prover/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prover/src/lib.rs b/prover/src/lib.rs index c78f90ee83..065abae735 100644 --- a/prover/src/lib.rs +++ b/prover/src/lib.rs @@ -101,11 +101,11 @@ pub fn prove( now.elapsed().as_millis() ); - let stack_outputs = *trace.stack_outputs(); + let stack_outputs = trace.stack_outputs().clone(); let hash_fn = options.hash_fn(); // extract precompile requests from the trace to include in the proof - let pc_requests = trace.take_precompile_requests(); + let pc_requests = trace.precompile_requests().to_vec(); // generate STARK proof let proof = match hash_fn { From 916162ff3c15733e0e54310119f489cbee630b0b Mon Sep 17 00:00:00 2001 From: Avory Date: Mon, 5 Jan 2026 12:42:35 +0200 Subject: [PATCH 11/11] Refactor prove function and update imports Refactor prove function to be synchronous and update dependencies. --- prover/src/lib.rs | 173 ++++++++++++++++++++++++++++------------------ 1 file changed, 107 insertions(+), 66 deletions(-) diff --git a/prover/src/lib.rs b/prover/src/lib.rs index f05348d5b9..065abae735 100644 --- a/prover/src/lib.rs +++ b/prover/src/lib.rs @@ -1,34 +1,49 @@ #![no_std] +#[cfg_attr(all(feature = "metal", target_arch = "aarch64", target_os = "macos"), macro_use)] extern crate alloc; #[cfg(feature = "std")] extern crate std; -use alloc::string::ToString; +use core::marker::PhantomData; -use miden_processor::{Program, fast::FastProcessor, math::Felt, parallel::build_trace}; +use miden_air::{AuxRandElements, PartitionOptions, ProcessorAir, PublicInputs}; +#[cfg(all(feature = "metal", target_arch = "aarch64", target_os = "macos"))] +use miden_gpu::HashFn; +use miden_processor::{ + ExecutionTrace, Program, + crypto::{ + Blake3_192, Blake3_256, ElementHasher, Poseidon2, RandomCoin, Rpo256, RpoRandomCoin, + Rpx256, RpxRandomCoin, WinterRandomCoin, + }, + fast::{DEFAULT_CORE_TRACE_FRAGMENT_SIZE, FastProcessor}, + math::{Felt, FieldElement}, + parallel::build_trace, +}; use tracing::instrument; - -// Trace conversion utilities -mod trace_adapter; +use winter_maybe_async::{maybe_async, maybe_await}; +use winter_prover::{ + CompositionPoly, CompositionPolyTrace, ConstraintCompositionCoefficients, + DefaultConstraintCommitment, DefaultConstraintEvaluator, DefaultTraceLde, + ProofOptions as WinterProofOptions, Prover, StarkDomain, TraceInfo, TracePolyTable, + matrix::ColMatrix, +}; +#[cfg(feature = "std")] +use {std::time::Instant, winter_prover::Trace}; +mod gpu; // EXPORTS // ================================================================================================ pub use miden_air::{ - DEFAULT_CORE_TRACE_FRAGMENT_SIZE, DeserializationError, ExecutionProof, HashFunction, - ProcessorAir, ProvingOptions, config, -}; -pub use miden_crypto::{ - stark, - stark::{Commitments, OpenedValues, Proof}, + DeserializationError, ExecutionProof, FieldExtension, HashFunction, ProvingOptions, }; pub use miden_processor::{ - AdviceInputs, AsyncHost, BaseHost, ExecutionError, InputError, StackInputs, StackOutputs, - SyncHost, Word, crypto, math, utils, + AdviceInputs, AsyncHost, BaseHost, ExecutionError, InputError, PrecompileRequest, StackInputs, + StackOutputs, SyncHost, Word, crypto, math, utils, }; -pub use trace_adapter::{aux_trace_to_row_major, execution_trace_to_row_major}; +pub use winter_prover::{Proof, crypto::MerkleTree as MerkleTreeVC}; // PROVER // ================================================================================================ @@ -36,8 +51,6 @@ pub use trace_adapter::{aux_trace_to_row_major, execution_trace_to_row_major}; /// Executes and proves the specified `program` and returns the result together with a STARK-based /// proof of the program's execution. /// -/// This is an async function that works on all platforms including wasm32. -/// /// - `stack_inputs` specifies the initial state of the stack for the VM. /// - `host` specifies the host environment which contain non-deterministic (secret) inputs for the /// prover @@ -46,7 +59,8 @@ pub use trace_adapter::{aux_trace_to_row_major, execution_trace_to_row_major}; /// # Errors /// Returns an error if program execution or STARK proof generation fails for any reason. #[instrument("prove_program", skip_all)] -pub async fn prove( +#[maybe_async] +pub fn prove( program: &Program, stack_inputs: StackInputs, advice_inputs: AdviceInputs, @@ -54,6 +68,8 @@ pub async fn prove( options: ProvingOptions, ) -> Result<(StackOutputs, ExecutionProof), ExecutionError> { // execute the program to create an execution trace using FastProcessor + #[cfg(feature = "std")] + let now = Instant::now(); // Reverse stack inputs since FastProcessor expects them in reverse order // (first element = bottom of stack, last element = top) @@ -65,27 +81,27 @@ pub async fn prove( FastProcessor::new_with_advice_inputs(&stack_inputs_reversed, advice_inputs) }; - let (execution_output, trace_generation_context) = processor - .execute_for_trace(program, host, options.execution_options().core_trace_fragment_size()) - .await?; + let (execution_output, trace_generation_context) = + processor.execute_for_trace_sync(program, host, DEFAULT_CORE_TRACE_FRAGMENT_SIZE)?; - let trace = build_trace( + let mut trace = build_trace( execution_output, trace_generation_context, program.hash(), program.kernel().clone(), ); + #[cfg(feature = "std")] tracing::event!( tracing::Level::INFO, - "Generated execution trace of {} columns and {} steps (padded from {})", - miden_air::trace::TRACE_WIDTH, + "Generated execution trace of {} columns and {} steps ({}% padded) in {} ms", + trace.info().main_trace_width(), trace.trace_len_summary().padded_trace_len(), - trace.trace_len_summary().main_trace_len() + trace.trace_len_summary().padding_percentage(), + now.elapsed().as_millis() ); let stack_outputs = trace.stack_outputs().clone(); - let precompile_requests = trace.precompile_requests().to_vec(); let hash_fn = options.hash_fn(); // extract precompile requests from the trace to include in the proof @@ -131,50 +147,63 @@ pub async fn prove( ); maybe_await!(prover.prove(trace)) }, - HashFunction::Rpx256 => { - let config = miden_air::config::create_rpx_config(); - let proof = stark::prove(&config, &air, &trace_matrix, &public_values); - serialize_proof(&proof)? - }, - }; + } + .map_err(ExecutionError::ProverError)?; - let proof = miden_air::ExecutionProof::new(proof_bytes, hash_fn, precompile_requests); + let proof = ExecutionProof::new(proof, hash_fn, pc_requests); Ok((stack_outputs, proof)) } -/// Synchronous wrapper for the async `prove()` function. -/// -/// This method is only available on non-wasm32 targets. On wasm32, use the -/// async `prove()` method directly since wasm32 runs in the browser's event loop. -/// -/// # Panics -/// Panics if called from within an existing Tokio runtime. Use the async `prove()` -/// method instead in async contexts. -#[cfg(not(target_arch = "wasm32"))] -#[instrument("prove_program_sync", skip_all)] -pub fn prove_sync( - program: &Program, +// PROVER +// ================================================================================================ + +struct ExecutionProver +where + H: ElementHasher, + R: RandomCoin, +{ + random_coin: PhantomData, + options: WinterProofOptions, stack_inputs: StackInputs, - advice_inputs: AdviceInputs, - host: &mut impl AsyncHost, - options: ProvingOptions, -) -> Result<(StackOutputs, ExecutionProof), ExecutionError> { - match tokio::runtime::Handle::try_current() { - Ok(_handle) => { - // We're already inside a Tokio runtime - this is not supported - // because we cannot safely create a nested runtime or move the - // non-Send host reference to another thread - panic!( - "Cannot call prove_sync from within a Tokio runtime. \ - Use the async prove() method instead." - ) - }, - Err(_) => { - // No runtime exists - create one and use it - let rt = tokio::runtime::Builder::new_current_thread().build().unwrap(); - rt.block_on(prove(program, stack_inputs, advice_inputs, host, options)) - }, + stack_outputs: StackOutputs, +} + +impl ExecutionProver +where + H: ElementHasher, + R: RandomCoin, +{ + pub fn new( + options: ProvingOptions, + stack_inputs: StackInputs, + stack_outputs: StackOutputs, + ) -> Self { + Self { + random_coin: PhantomData, + options: options.into(), + stack_inputs, + stack_outputs, + } + } + + // HELPER FUNCTIONS + // -------------------------------------------------------------------------------------------- + + /// Validates the stack inputs against the provided execution trace and returns true if valid. + fn are_inputs_valid(&self, trace: &ExecutionTrace) -> bool { + self.stack_inputs + .iter() + .zip(trace.init_stack_state().iter()) + .all(|(l, r)| l == r) + } + + /// Validates the stack outputs against the provided execution trace and returns true if valid. + fn are_outputs_valid(&self, trace: &ExecutionTrace) -> bool { + self.stack_outputs + .iter() + .zip(trace.last_stack_state().iter()) + .all(|(l, r)| l == r) } } @@ -251,7 +280,19 @@ where trace.build_aux_trace(aux_rand_elements.rand_elements()).unwrap() } -/// Serializes a proof to bytes, converting serialization errors to ExecutionError. -fn serialize_proof(proof: &T) -> Result, ExecutionError> { - bincode::serialize(proof).map_err(|e| ExecutionError::ProofSerializationError(e.to_string())) + #[maybe_async] + fn build_constraint_commitment>( + &self, + composition_poly_trace: CompositionPolyTrace, + num_constraint_composition_columns: usize, + domain: &StarkDomain, + partition_options: PartitionOptions, + ) -> (Self::ConstraintCommitment, CompositionPoly) { + DefaultConstraintCommitment::new( + composition_poly_trace, + num_constraint_composition_columns, + domain, + partition_options, + ) + } }