Skip to content
Merged
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions frame/zk-verifier/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,11 @@ pub mod pallet {
circuit_id,
version,
});
// In benchmarks, the full Groth16 pairing computation has already run
// (deserialization succeeded, pairing was computed) so the measured
// weight is accurate. We only skip the error return so the benchmark
// runner can record the weight; production behaviour is unchanged.
#[cfg(not(feature = "runtime-benchmarks"))]
return Err(Error::<T>::VerificationFailed.into());
}

Expand Down
Loading