|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
#include "barretenberg/circuit_checker/translator_circuit_checker.hpp"#include "barretenberg/common/log.hpp"#include "barretenberg/numeric/uint256/uint256.hpp"#include "barretenberg/relations/relation_parameters.hpp"#include "barretenberg/sumcheck/sumcheck_round.hpp"#include "barretenberg/transcript/transcript_manifest.hpp"#include "barretenberg/translator_vm/translator_circuit_builder.hpp"#include "barretenberg/translator_vm/translator_prover.hpp"#include "barretenberg/translator_vm/translator_verifier.hpp"#include <gtest/gtest.h>Go to the source code of this file.
Classes | |
| class | TranslatorTests |
Typedefs | |
| using | CircuitBuilder = TranslatorFlavor::CircuitBuilder |
| using | Transcript = TranslatorFlavor::Transcript |
| using | OpQueue = ECCOpQueue |
Functions | |
| TranslatorFlavor::VerificationKey | create_vk_from_proving_key (const std::shared_ptr< TranslatorFlavor::ProvingKey > &proving_key) |
| TranslatorFlavor::FF | compute_translator_vk_hash () |
| 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. | |
| TEST_F (TranslatorTests, TranscriptPinned) | |
| Pin the Translator transcript manifest. | |
| TEST_F (TranslatorTests, EvaluationPartition) | |
| Unit test for concatenated polynomial construction and reconstruction. | |
| TEST_F (TranslatorTests, VerifierPopulatesAllEntities) | |
| Verify that the verifier-side methods populate every entity in AllEntities. | |
Definition at line 14 of file translator.test.cpp.
| using OpQueue = ECCOpQueue |
Definition at line 16 of file translator.test.cpp.
Definition at line 15 of file translator.test.cpp.
| TranslatorFlavor::FF compute_translator_vk_hash | ( | ) |
Definition at line 31 of file translator.test.cpp.
| TranslatorFlavor::VerificationKey create_vk_from_proving_key | ( | const std::shared_ptr< TranslatorFlavor::ProvingKey > & | proving_key | ) |
Definition at line 20 of file translator.test.cpp.
| TEST_F | ( | TranslatorTests | , |
| Basic | |||
| ) |
Test simple circuit with public inputs.
Definition at line 289 of file translator.test.cpp.
| 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 309 of file translator.test.cpp.
| TEST_F | ( | TranslatorTests | , |
| EvaluationPartition | |||
| ) |
Unit test for concatenated polynomial construction and reconstruction.
Tests that:
Sanity check that minicircuit wires + full-circuit entities + computable precomputed partition all 192 entities without overlap or gaps.
The sumcheck helpers split AllEntities into three groups for mid-sumcheck sending:
Definition at line 463 of file translator.test.cpp.
| TEST_F | ( | TranslatorTests | , |
| FixedVK | |||
| ) |
Ensure that the fixed VK from the default constructor agrees with those computed manually for an arbitrary circuit.
Definition at line 337 of file translator.test.cpp.
| 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:
Definition at line 262 of file translator.test.cpp.
| TEST_F | ( | TranslatorTests | , |
| TranscriptPinned | |||
| ) |
Pin the Translator transcript manifest.
Verifies that the verifier transcript matches the expected hardcoded structure. Prover correctness follows by transitivity (prover/verifier must match for verification to succeed).
Definition at line 395 of file translator.test.cpp.
| TEST_F | ( | TranslatorTests | , |
| VerifierPopulatesAllEntities | |||
| ) |
Verify that the verifier-side methods populate every entity in AllEntities.
Start from all-zeros, call set_minicircuit_evaluations + complete_full_circuit_evaluations with random inputs, and check that no entity remains zero (with overwhelming probability).
Definition at line 522 of file translator.test.cpp.