Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::proving_key_inspector Namespace Reference

Classes

struct  NativeFlavorHelper
 
struct  NativeFlavorHelper< Flavor, true >
 

Functions

template<typename Flavor , typename Builder >
requires (IsMegaFlavor<Flavor> && IsMegaBuilder<Builder>)
uint256_t compute_vk_hash (const Builder &circuit_in, const TraceSettings &trace_settings=TraceSettings{ AZTEC_TRACE_STRUCTURE })
 Compute the hash of the verification key that results from constructing a proving key from the given circuit.
 
template<typename Flavor , typename Builder >
requires (!IsMegaFlavor<Flavor> || !IsMegaBuilder<Builder>)
uint256_t compute_vk_hash (const Builder &, const TraceSettings &=TraceSettings{ AZTEC_TRACE_STRUCTURE })
 
bool is_non_zero (auto &polynomial)
 
void inspect_proving_key (auto &decider_proving_key)
 Utility for indicating which polynomials in a decider proving key are identically zero.
 

Function Documentation

◆ compute_vk_hash() [1/2]

template<typename Flavor , typename Builder >
requires (!IsMegaFlavor<Flavor> || !IsMegaBuilder<Builder>)
uint256_t bb::proving_key_inspector::compute_vk_hash ( const Builder ,
const TraceSettings = TraceSettings{ AZTEC_TRACE_STRUCTURE } 
)

Definition at line 52 of file proving_key_inspector.hpp.

◆ compute_vk_hash() [2/2]

template<typename Flavor , typename Builder >
requires (IsMegaFlavor<Flavor> && IsMegaBuilder<Builder>)
uint256_t bb::proving_key_inspector::compute_vk_hash ( const Builder circuit_in,
const TraceSettings trace_settings = TraceSettings{ AZTEC_TRACE_STRUCTURE } 
)

Compute the hash of the verification key that results from constructing a proving key from the given circuit.

This is useful for identifying the point of divergence for two circuits that are expected to be identical, for example, the circuit constructed from a given acir program with or without a genuine witness.

Template Parameters
FlavorDetermines the type of PK and VK to be constructed.
BuilderThe builder for the circuit in question.

Definition at line 34 of file proving_key_inspector.hpp.

◆ inspect_proving_key()

void bb::proving_key_inspector::inspect_proving_key ( auto &  decider_proving_key)

Utility for indicating which polynomials in a decider proving key are identically zero.

Parameters
decider_proving_key

Definition at line 75 of file proving_key_inspector.hpp.

◆ is_non_zero()

bool bb::proving_key_inspector::is_non_zero ( auto &  polynomial)

Definition at line 60 of file proving_key_inspector.hpp.