Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
ultra_honk.test.cpp File Reference
#include "ultra_honk.test.hpp"
#include "barretenberg/honk/relation_checker.hpp"
#include <gtest/gtest.h>

Go to the source code of this file.

Typedefs

using AggregationState = stdlib::recursion::PairingPoints< UltraCircuitBuilder >
 
using FlavorTypes = testing::Types< UltraFlavor, UltraZKFlavor, UltraKeccakFlavor, UltraKeccakZKFlavor, UltraRollupFlavor >
 

Functions

 TYPED_TEST_SUITE (UltraHonkTests, FlavorTypes)
 
 TYPED_TEST (UltraHonkTests, ProofLengthCheck)
 Check that size of a ultra honk proof matches the corresponding constant.
 
 TYPED_TEST (UltraHonkTests, ANonZeroPolynomialIsAGoodPolynomial)
 A quick test to ensure that none of our polynomials are identically zero.
 
 TYPED_TEST (UltraHonkTests, PublicInputs)
 Test simple circuit with public inputs.
 
 TYPED_TEST (UltraHonkTests, TestNoLookupProof)
 
 TYPED_TEST (UltraHonkTests, TestEllipticGate)
 
 TYPED_TEST (UltraHonkTests, NonNativeFieldMultiplication)
 
 TYPED_TEST (UltraHonkTests, RangeChecksOnDuplicates)
 
 TYPED_TEST (UltraHonkTests, RangeConstraintSmallVariable)
 
 TYPED_TEST (UltraHonkTests, NativeVKHashMismatchDetected)
 Test that native verifier detects VK hash mismatch.
 

Typedef Documentation

◆ AggregationState

◆ FlavorTypes

Function Documentation

◆ TYPED_TEST() [1/9]

TYPED_TEST ( UltraHonkTests  ,
ANonZeroPolynomialIsAGoodPolynomial   
)

A quick test to ensure that none of our polynomials are identically zero.

Note
This test assumes that gates have been added by default in the composer to achieve non-zero polynomials

Definition at line 60 of file ultra_honk.test.cpp.

◆ TYPED_TEST() [2/9]

TYPED_TEST ( UltraHonkTests  ,
NativeVKHashMismatchDetected   
)

Test that native verifier detects VK hash mismatch.

The VKAndHash stores a precomputed hash of the VK. During verification, the oink verifier computes a fresh hash and compares it. If they don't match, a BB_ASSERT_EQ should trigger, catching potential VK tampering or corruption.

Definition at line 301 of file ultra_honk.test.cpp.

◆ TYPED_TEST() [3/9]

TYPED_TEST ( UltraHonkTests  ,
NonNativeFieldMultiplication   
)

Definition at line 166 of file ultra_honk.test.cpp.

◆ TYPED_TEST() [4/9]

TYPED_TEST ( UltraHonkTests  ,
ProofLengthCheck   
)

Check that size of a ultra honk 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...
  • ultra_transcript.test.cpp
  • constants in yarn-project in: constants.nr, constants.gen.ts, ConstantsGen.sol, lib.nr in bb_proof_verification/src, main.nr of recursive acir_tests programs. with recursive verification circuits
  • Places that define SIZE_OF_PROOF_IF_LOGN_IS_28

Definition at line 32 of file ultra_honk.test.cpp.

◆ TYPED_TEST() [5/9]

TYPED_TEST ( UltraHonkTests  ,
PublicInputs   
)

Test simple circuit with public inputs.

Definition at line 96 of file ultra_honk.test.cpp.

◆ TYPED_TEST() [6/9]

TYPED_TEST ( UltraHonkTests  ,
RangeChecksOnDuplicates   
)

Definition at line 233 of file ultra_honk.test.cpp.

◆ TYPED_TEST() [7/9]

TYPED_TEST ( UltraHonkTests  ,
RangeConstraintSmallVariable   
)

Definition at line 274 of file ultra_honk.test.cpp.

◆ TYPED_TEST() [8/9]

TYPED_TEST ( UltraHonkTests  ,
TestEllipticGate   
)

Definition at line 131 of file ultra_honk.test.cpp.

◆ TYPED_TEST() [9/9]

TYPED_TEST ( UltraHonkTests  ,
TestNoLookupProof   
)

Definition at line 108 of file ultra_honk.test.cpp.

◆ TYPED_TEST_SUITE()

TYPED_TEST_SUITE ( UltraHonkTests  ,
FlavorTypes   
)