|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
#include "barretenberg/common/thread.hpp"#include "barretenberg/honk/library/grand_product_library.hpp"#include "barretenberg/honk/relation_checker.hpp"#include "barretenberg/translator_vm/translator_flavor.hpp"#include "barretenberg/translator_vm/translator_proving_key.hpp"#include <gtest/gtest.h>#include <set>Go to the source code of this file.
Classes | |
| class | TranslatorRelationCorrectnessTests |
Functions | |
| TEST_F (TranslatorRelationCorrectnessTests, TranslatorExtraRelationsCorrectness) | |
| Test the correctness of TranslatorFlavor's extra relations (TranslatorOpcodeConstraintRelation and TranslatorAccumulatorTransferRelation) | |
| TEST_F (TranslatorRelationCorrectnessTests, Decomposition) | |
| Test the correctness of TranslatorFlavor's Decomposition Relation. | |
| TEST_F (TranslatorRelationCorrectnessTests, NonNative) | |
| Test the correctness of TranslatorFlavor's NonNativeField Relation. | |
| TEST_F (TranslatorRelationCorrectnessTests, ZeroKnowledgePermutation) | |
| TEST_F (TranslatorRelationCorrectnessTests, ZeroKnowledgeDeltaRange) | |
| TEST_F (TranslatorRelationCorrectnessTests, ConcatenatedPolynomialLayout) | |
| Test that compute_concatenated_polynomials() correctly maps wire values into concatenated polys. | |
| TEST_F (TranslatorRelationCorrectnessTests, RandomnessRedistributionIntegrity) | |
| Test that split_concatenated_random_coefficients_to_ordered() redistributes all random values from the 4 range-constraint concatenated polys into the 5 ordered polys at contiguous end positions. | |
| TEST_F (TranslatorRelationCorrectnessTests, BlockBoundaryEdgeCases) | |
| Test values at critical positions around block boundaries in concatenated polys. | |
| TEST_F (TranslatorRelationCorrectnessTests, OrderedPolynomialBoundary) | |
| Test the boundary between sorted values and masking in ordered polynomials. | |
| TEST_F (TranslatorRelationCorrectnessTests, LagrangeSelectorBoundaryCorrectness) | |
| Test that all masking-related lagrange selectors have correct values at every critical boundary. | |
| TEST_F | ( | TranslatorRelationCorrectnessTests | , |
| BlockBoundaryEdgeCases | |||
| ) |
Test values at critical positions around block boundaries in concatenated polys.
Verifies that sentinel circuit values and masking sentinels appear at the correct positions, and that block transitions (last masking row -> first row of next block) are correct.
Definition at line 847 of file relation_correctness.test.cpp.
| TEST_F | ( | TranslatorRelationCorrectnessTests | , |
| ConcatenatedPolynomialLayout | |||
| ) |
Test that compute_concatenated_polynomials() correctly maps wire values into concatenated polys.
Verifies that non-masking positions contain the original wire values, masking positions contain random masking values, null padding slots (group 4, lanes 13-15) are zero, and position 0 in each block (below start_index=1) is zero.
Definition at line 691 of file relation_correctness.test.cpp.
| TEST_F | ( | TranslatorRelationCorrectnessTests | , |
| Decomposition | |||
| ) |
Test the correctness of TranslatorFlavor's Decomposition Relation.
Decompose a standard 68-bit limb of binary into 5 14-bit limbs and the 6th limb that is the same as the 5th but shifted by 2 bits
Decompose a standard 50-bit top limb into 4 14-bit limbs and the 5th limb that is the same as 5th, but shifted by 6 bits
Decompose the 60-bit top limb of z1 or z2 into 5 14-bit limbs and a 6th limb which is equal to the 5th, but shifted by 10 bits.
Decompose the 52-bit top limb of quotient into 4 14-bit limbs and the 5th limb that is the same as 5th, but shifted by 4 bits
Decompose relation wide limb into 6 14-bit limbs
Definition at line 92 of file relation_correctness.test.cpp.
| TEST_F | ( | TranslatorRelationCorrectnessTests | , |
| LagrangeSelectorBoundaryCorrectness | |||
| ) |
Test that all masking-related lagrange selectors have correct values at every critical boundary.
Checks lagrange_masking (scattered), lagrange_ordered_masking (contiguous at end), and lagrange_real_last at their boundary positions.
Definition at line 994 of file relation_correctness.test.cpp.
| TEST_F | ( | TranslatorRelationCorrectnessTests | , |
| NonNative | |||
| ) |
Test the correctness of TranslatorFlavor's NonNativeField Relation.
Definition at line 440 of file relation_correctness.test.cpp.
| TEST_F | ( | TranslatorRelationCorrectnessTests | , |
| OrderedPolynomialBoundary | |||
| ) |
Test the boundary between sorted values and masking in ordered polynomials.
Verifies that lagrange_real_last is at the correct position, ordered values are non-descending, the max range value appears at the last non-masking position, and position 0 is zero.
Definition at line 930 of file relation_correctness.test.cpp.
| TEST_F | ( | TranslatorRelationCorrectnessTests | , |
| RandomnessRedistributionIntegrity | |||
| ) |
Test that split_concatenated_random_coefficients_to_ordered() redistributes all random values from the 4 range-constraint concatenated polys into the 5 ordered polys at contiguous end positions.
Verifies that all 256 random values from scattered masking positions appear in ordered polys, and non-masking positions in ordered polys have only in-range sorted values.
Definition at line 761 of file relation_correctness.test.cpp.
| TEST_F | ( | TranslatorRelationCorrectnessTests | , |
| TranslatorExtraRelationsCorrectness | |||
| ) |
Test the correctness of TranslatorFlavor's extra relations (TranslatorOpcodeConstraintRelation and TranslatorAccumulatorTransferRelation)
Definition at line 21 of file relation_correctness.test.cpp.
| TEST_F | ( | TranslatorRelationCorrectnessTests | , |
| ZeroKnowledgeDeltaRange | |||
| ) |
Definition at line 625 of file relation_correctness.test.cpp.
| TEST_F | ( | TranslatorRelationCorrectnessTests | , |
| ZeroKnowledgePermutation | |||
| ) |
Definition at line 572 of file relation_correctness.test.cpp.