|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
#include <test_class.hpp>
Public Types | |
| using | Base = Base_ |
| using | Builder = Base::Builder |
| using | AcirConstraint = Base::AcirConstraint |
| using | InvalidWitness = Base::InvalidWitness |
| using | InvalidWitnessTarget = Base::InvalidWitness::Target |
Static Public Member Functions | |
| static std::tuple< bool, bool, std::string > | test_constraints (AcirConstraint &constraint, WitnessVector &witness_values, const InvalidWitnessTarget &invalid_witness_target) |
| General purpose testing function. It tests the constraints based on the invalidation target. | |
| template<typename Flavor > | |
| static size_t | test_vk_independence () |
| Test vk generation is independent of the witness values supplied. | |
| static std::vector< std::string > | test_tampering () |
| Test all invalid witness targets. | |
Definition at line 586 of file test_class.hpp.
| using acir_format::TestClass< Base_ >::AcirConstraint = Base::AcirConstraint |
Definition at line 590 of file test_class.hpp.
| using acir_format::TestClass< Base_ >::Base = Base_ |
Definition at line 588 of file test_class.hpp.
| using acir_format::TestClass< Base_ >::Builder = Base::Builder |
Definition at line 589 of file test_class.hpp.
| using acir_format::TestClass< Base_ >::InvalidWitness = Base::InvalidWitness |
Definition at line 591 of file test_class.hpp.
| using acir_format::TestClass< Base_ >::InvalidWitnessTarget = Base::InvalidWitness::Target |
Definition at line 592 of file test_class.hpp.
|
inlinestatic |
General purpose testing function. It tests the constraints based on the invalidation target.
In a real flow, we have: Noir --> ACIR --> Bytes --> AcirFormat (via circuit_buf_to_acir_format) --> Builder We simulate the above flow by generating an AcirConstraint (one of the constraints stored in an AcirFormat struct), rewinding it into its Acir::Opcode form (which is the output of the byte deserialization step in the diagram above), and then feeding it into circuit_serde_to_acir_format as an Acir::Circuit with a single opcode. The function circuit_buf_to_acir_format internally calls circuit_serde_to_acir_format after having deserialized the byte buffer to an Acir::Circuit, so the flow in this test is the same as the real flow, minus the byte serialization/deserialization. The rationale for doing the rewinding is ensuring that barretenberg internally tests circuit_serde_to_acir_format, which would otherwise only be tested via the tests in acir_tests.
Definition at line 608 of file test_class.hpp.
|
inlinestatic |
Test all invalid witness targets.
Definition at line 681 of file test_class.hpp.
|
inlinestatic |
Test vk generation is independent of the witness values supplied.
This function tests that the verification key is deterministic and independent of the witness values by going through the full ACIR flow.
| Flavor |
Definition at line 632 of file test_class.hpp.