From 4fd74b03a2ee2dd7998df650e87de591d5303d84 Mon Sep 17 00:00:00 2001 From: Alexander Camuto <45801863+alexander-camuto@users.noreply.github.com> Date: Tue, 3 Oct 2023 22:19:24 +0100 Subject: [PATCH] patch no instance case --- src/pfsys/mod.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/pfsys/mod.rs b/src/pfsys/mod.rs index 723145e4e..c5922d2a6 100644 --- a/src/pfsys/mod.rs +++ b/src/pfsys/mod.rs @@ -403,10 +403,15 @@ where .collect::>(); let pi_inner: &[&[&[Scheme::Scalar]]] = &[&pi_inner]; trace!("instances {:?}", instances); + trace!( + "pk num instance column: {:?}", + pk.get_vk().cs().num_instance_columns() + ); info!("proof started..."); // not wasm32 unknown let now = Instant::now(); + create_proof::( params, pk, @@ -582,6 +587,12 @@ pub fn create_proof_circuit_kzg< strategy: Strategy, check_mode: CheckMode, ) -> Result, Box> { + let public_inputs = if !public_inputs.is_empty() { + vec![public_inputs] + } else { + vec![] + }; + match transcript { TranscriptType::EVM => create_proof_circuit::< KZGCommitmentScheme<_>, @@ -595,7 +606,7 @@ pub fn create_proof_circuit_kzg< EvmTranscript, >( circuit, - vec![public_inputs], + public_inputs, params, pk, strategy, @@ -615,7 +626,7 @@ pub fn create_proof_circuit_kzg< PoseidonTranscript, >( circuit, - vec![public_inputs], + public_inputs, params, pk, strategy,