Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
mega_honk.test.cpp File Reference

Go to the source code of this file.

Classes

class  MegaHonkTests< Flavor >
 

Typedefs

using FlavorTypes = ::testing::Types< MegaFlavor, MegaZKFlavor >
 

Functions

 TYPED_TEST_SUITE (MegaHonkTests, FlavorTypes)
 
 TYPED_TEST (MegaHonkTests, ProofLengthCheck)
 Check that size of a mega proof matches the corresponding constant.
 
 TYPED_TEST (MegaHonkTests, Basic)
 Test proof construction/verification for a circuit with ECC op gates, public inputs, and basic arithmetic gates.
 
 TYPED_TEST (MegaHonkTests, DynamicVirtualSizeIncrease)
 Test that increasing the virtual size of a valid set of prover polynomials still results in a valid Megahonk proof.
 
 TYPED_TEST (MegaHonkTests, PolySwap)
 A sanity check that a simple std::swap on a ProverPolynomials object works as expected.
 

Variables

auto & engine = numeric::get_debug_randomness()
 

Typedef Documentation

◆ FlavorTypes

using FlavorTypes = ::testing::Types<MegaFlavor, MegaZKFlavor>

Definition at line 18 of file mega_honk.test.cpp.

Function Documentation

◆ TYPED_TEST() [1/4]

TYPED_TEST ( MegaHonkTests  ,
Basic   
)

Test proof construction/verification for a circuit with ECC op gates, public inputs, and basic arithmetic gates.

Definition at line 84 of file mega_honk.test.cpp.

◆ TYPED_TEST() [2/4]

TYPED_TEST ( MegaHonkTests  ,
DynamicVirtualSizeIncrease   
)

Test that increasing the virtual size of a valid set of prover polynomials still results in a valid Megahonk proof.

Definition at line 101 of file mega_honk.test.cpp.

◆ TYPED_TEST() [3/4]

TYPED_TEST ( MegaHonkTests  ,
PolySwap   
)

A sanity check that a simple std::swap on a ProverPolynomials object works as expected.

Constuct two valid proving keys. Tamper with the prover_polynomials of one key then swap the prover_polynomials of the two keys. The key who received the tampered polys leads to a failed verification while the other succeeds.

Definition at line 164 of file mega_honk.test.cpp.

◆ TYPED_TEST() [4/4]

TYPED_TEST ( MegaHonkTests  ,
ProofLengthCheck   
)

Check that size of a mega proof matches the corresponding constant.

If this test FAILS, then the following (non-exhaustive) list should probably be updated as well:

  • Proof length formula in ultra_flavor.hpp, mega_flavor.hpp, etc...
  • mega_transcript.test.cpp
  • constants in yarn-project in: constants.nr, constants.gen.ts, ConstantsGen.sol, various main.nr files of programs with recursive verification circuits
  • Places that define SIZE_OF_PROOF_IF_LOGN_IS_28

Definition at line 62 of file mega_honk.test.cpp.

◆ TYPED_TEST_SUITE()

TYPED_TEST_SUITE ( MegaHonkTests  ,
FlavorTypes   
)

Variable Documentation

◆ engine

auto& engine = numeric::get_debug_randomness()

Definition at line 16 of file mega_honk.test.cpp.