barretenberg
Loading...
Searching...
No Matches
Classes | Functions
ultra_relation_consistency.test.cpp File Reference

Show that relation arithmetic has a simple form. More...

#include "barretenberg/ecc/curves/bn254/fr.hpp"
#include "barretenberg/ecc/curves/grumpkin/grumpkin.hpp"
#include "barretenberg/relations/auxiliary_relation.hpp"
#include "barretenberg/relations/elliptic_relation.hpp"
#include "barretenberg/relations/gen_perm_sort_relation.hpp"
#include "barretenberg/relations/lookup_relation.hpp"
#include "barretenberg/relations/permutation_relation.hpp"
#include "barretenberg/relations/poseidon2_external_relation.hpp"
#include "barretenberg/relations/poseidon2_internal_relation.hpp"
#include "barretenberg/relations/relation_parameters.hpp"
#include "barretenberg/relations/ultra_arithmetic_relation.hpp"
#include <gtest/gtest.h>

Classes

struct  proof_system::ultra_relation_consistency_tests::InputElements
 
class  proof_system::ultra_relation_consistency_tests::UltraRelationConsistency
 

Functions

 proof_system::ultra_relation_consistency_tests::TEST_F (UltraRelationConsistency, UltraArithmeticRelation)
 
 proof_system::ultra_relation_consistency_tests::TEST_F (UltraRelationConsistency, UltraPermutationRelation)
 
 proof_system::ultra_relation_consistency_tests::TEST_F (UltraRelationConsistency, LookupRelation)
 
 proof_system::ultra_relation_consistency_tests::TEST_F (UltraRelationConsistency, GenPermSortRelation)
 
 proof_system::ultra_relation_consistency_tests::TEST_F (UltraRelationConsistency, EllipticRelation)
 
 proof_system::ultra_relation_consistency_tests::TEST_F (UltraRelationConsistency, AuxiliaryRelation)
 
 proof_system::ultra_relation_consistency_tests::TEST_F (UltraRelationConsistency, Poseidon2ExternalRelation)
 
 proof_system::ultra_relation_consistency_tests::TEST_F (UltraRelationConsistency, Poseidon2InternalRelation)
 

Detailed Description

Show that relation arithmetic has a simple form.

The purpose of this test suite is to show that the identity arithmetic implemented in the Relations is equivalent to a simpler unoptimized version implemented in the tests themselves. This is useful 1) as documentation since the simple implementations here should make the underlying arithmetic easier to see, and 2) as a check that optimizations introduced into the Relations have not changed the result.

For this purpose, we simply feed (the same) random inputs into each of the two implementations and confirm that the outputs match. This does not confirm the correctness of the identity arithmetic (the identities will not be satisfied in general by random inputs) only that the two implementations are equivalent.

Function Documentation

◆ TEST_F()

proof_system::ultra_relation_consistency_tests::TEST_F ( UltraRelationConsistency  ,
AuxiliaryRelation   
)

Non native field arithmetic gate 2

        _                                                                               _
       /   _                   _                               _       14                \

q_2 . q_4 | (w_1 . w_2) + (w_1 . w_2) + (w_1 . w_4 + w_2 . w_3 - w_3) . 2 - w_3 - w_4 | _ _/

MEMORY

Memory Record Check

ROM Consistency Check

RAM Consistency Check

RAM/ROM access check gate

RAM Timestamp Consistency Check

The complete RAM/ROM memory identity