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

Go to the source code of this file.

Classes

class  TranslatorTests
 

Typedefs

using CircuitBuilder = TranslatorFlavor::CircuitBuilder
 
using Transcript = TranslatorFlavor::Transcript
 
using OpQueue = ECCOpQueue
 

Functions

 TEST_F (TranslatorTests, ProofLengthCheck)
 Check that size of a Translator proof matches the corresponding constant.
 
 TEST_F (TranslatorTests, Basic)
 Test simple circuit with public inputs.
 
 TEST_F (TranslatorTests, BasicAvmMode)
 Test Translator operates correctly for AVM i.e. when we only run Goblin on a single table of ecc ops and we should not expect random ops to appear at the end of Translator trace.
 
 TEST_F (TranslatorTests, FixedVK)
 Ensure that the fixed VK from the default constructor agrees with those computed manually for an arbitrary circuit.
 

Typedef Documentation

◆ CircuitBuilder

◆ OpQueue

Definition at line 15 of file translator.test.cpp.

◆ Transcript

Definition at line 14 of file translator.test.cpp.

Function Documentation

◆ TEST_F() [1/4]

TEST_F ( TranslatorTests  ,
Basic   
)

Test simple circuit with public inputs.

Definition at line 129 of file translator.test.cpp.

◆ TEST_F() [2/4]

TEST_F ( TranslatorTests  ,
BasicAvmMode   
)

Test Translator operates correctly for AVM i.e. when we only run Goblin on a single table of ecc ops and we should not expect random ops to appear at the end of Translator trace.

Definition at line 149 of file translator.test.cpp.

◆ TEST_F() [3/4]

TEST_F ( TranslatorTests  ,
FixedVK   
)

Ensure that the fixed VK from the default constructor agrees with those computed manually for an arbitrary circuit.

Note
If this test fails, it may be because the constant CONST_TRANSLATOR_LOG_N has changed and the fixed VK commitments in TranslatorFixedVKCommitments must be updated accordingly. Their values can be taken right from the output of this test.

Definition at line 177 of file translator.test.cpp.

◆ TEST_F() [4/4]

TEST_F ( TranslatorTests  ,
ProofLengthCheck   
)

Check that size of a Translator 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 translator_flavor.hpp, etc...
  • translator_transcript.test.cpp
  • constants in yarn-project in: constants.nr, constants.gen.ts, ConstantsGen.sol

Definition at line 102 of file translator.test.cpp.