Barretenberg
The ZK-SNARK library at the core of Aztec
|
#include "barretenberg/crypto/generators/generator_data.hpp"
#include "barretenberg/crypto/pedersen_commitment/pedersen.hpp"
#include "barretenberg/eccvm/eccvm_flavor.hpp"
#include "barretenberg/eccvm/eccvm_trace_checker.hpp"
#include <gtest/gtest.h>
Go to the source code of this file.
Typedefs | |
using | G1 = bb::g1 |
using | Fr = typename G1::Fr |
Functions | |
TEST (ECCVMCircuitBuilderTests, BaseCase) | |
TEST (ECCVMCircuitBuilderTests, NoOp) | |
TEST (ECCVMCircuitBuilderTests, Add) | |
TEST (ECCVMCircuitBuilderTests, Mul) | |
TEST (ECCVMCircuitBuilderTests, MulInfinity) | |
TEST (ECCVMCircuitBuilderTests, MulOverIdenticalInputs) | |
TEST (ECCVMCircuitBuilderTests, MSMProducesInfinity) | |
TEST (ECCVMCircuitBuilderTests, MSMOverPointAtInfinity) | |
TEST (ECCVMCircuitBuilderTests, ShortMul) | |
TEST (ECCVMCircuitBuilderTests, EqFails) | |
TEST (ECCVMCircuitBuilderTests, EmptyRow) | |
TEST (ECCVMCircuitBuilderTests, EmptyRowBetweenOps) | |
TEST (ECCVMCircuitBuilderTests, EndWithEq) | |
TEST (ECCVMCircuitBuilderTests, EndWithAdd) | |
TEST (ECCVMCircuitBuilderTests, EndWithMul) | |
TEST (ECCVMCircuitBuilderTests, EndWithNoop) | |
TEST (ECCVMCircuitBuilderTests, MSM) | |
TEST (ECCVMCircuitBuilderTests, EqAgainstPointAtInfinity) | |
TEST (ECCVMCircuitBuilderTests, AddPointAtInfinity) | |
TEST (ECCVMCircuitBuilderTests, AddProducesPointAtInfinity) | |
TEST (ECCVMCircuitBuilderTests, AddProducesDouble) | |
TEST (ECCVMCircuitBuilderTests, InfinityFailure) | |
Test to catch the Point at infinity issue in the interaction between ECCVM and Translator. | |
using Fr = typename G1::Fr |
Definition at line 9 of file eccvm_circuit_builder.test.cpp.
Definition at line 8 of file eccvm_circuit_builder.test.cpp.
TEST | ( | ECCVMCircuitBuilderTests | , |
Add | |||
) |
Definition at line 80 of file eccvm_circuit_builder.test.cpp.
TEST | ( | ECCVMCircuitBuilderTests | , |
AddPointAtInfinity | |||
) |
Definition at line 429 of file eccvm_circuit_builder.test.cpp.
TEST | ( | ECCVMCircuitBuilderTests | , |
AddProducesDouble | |||
) |
Definition at line 465 of file eccvm_circuit_builder.test.cpp.
TEST | ( | ECCVMCircuitBuilderTests | , |
AddProducesPointAtInfinity | |||
) |
Definition at line 448 of file eccvm_circuit_builder.test.cpp.
TEST | ( | ECCVMCircuitBuilderTests | , |
BaseCase | |||
) |
Definition at line 15 of file eccvm_circuit_builder.test.cpp.
TEST | ( | ECCVMCircuitBuilderTests | , |
EmptyRow | |||
) |
Definition at line 270 of file eccvm_circuit_builder.test.cpp.
TEST | ( | ECCVMCircuitBuilderTests | , |
EmptyRowBetweenOps | |||
) |
Definition at line 282 of file eccvm_circuit_builder.test.cpp.
TEST | ( | ECCVMCircuitBuilderTests | , |
EndWithAdd | |||
) |
Definition at line 317 of file eccvm_circuit_builder.test.cpp.
TEST | ( | ECCVMCircuitBuilderTests | , |
EndWithEq | |||
) |
Definition at line 300 of file eccvm_circuit_builder.test.cpp.
TEST | ( | ECCVMCircuitBuilderTests | , |
EndWithMul | |||
) |
Definition at line 335 of file eccvm_circuit_builder.test.cpp.
TEST | ( | ECCVMCircuitBuilderTests | , |
EndWithNoop | |||
) |
Definition at line 353 of file eccvm_circuit_builder.test.cpp.
TEST | ( | ECCVMCircuitBuilderTests | , |
EqAgainstPointAtInfinity | |||
) |
Definition at line 412 of file eccvm_circuit_builder.test.cpp.
TEST | ( | ECCVMCircuitBuilderTests | , |
EqFails | |||
) |
Definition at line 252 of file eccvm_circuit_builder.test.cpp.
TEST | ( | ECCVMCircuitBuilderTests | , |
InfinityFailure | |||
) |
Test to catch the Point at infinity issue in the interaction between ECCVM and Translator.
Currently, Goblin does not support clean initialization, which means that we have to create mock ECCOpQueue to avoid commiting to zero polynomials. This test localizes the issue to the problem with populating ECCVM Transcript rows in the method compute rows. Namely, we are loosing the point at infinity contribution to the 'transcipt_Px' polynomials while parsing the eccvm ops of ECCOpQueue.
More specifically, in this test we add a simple MSM with the point at infinity multiplied by \(0\). While the ECCVM computes the result of this op correctly, i.e. outputs the point at infinity, the computation of 'transcript_Px' is incorrect, because the \(x\)-coordinate of the point at infinity is replaced with \( 0 \). This leads to the ECCVM opening result being equal to \( x \cdot 4 \), where \(4\) is the mul opcode.
In a more global context, the Translator verifier would compute the accumulated result as \( 4 + \varepsilon\), where \( \varepsilon\) is the \(x\)-coordinate of the point at infinity.
Definition at line 499 of file eccvm_circuit_builder.test.cpp.
TEST | ( | ECCVMCircuitBuilderTests | , |
MSM | |||
) |
Definition at line 373 of file eccvm_circuit_builder.test.cpp.
TEST | ( | ECCVMCircuitBuilderTests | , |
MSMOverPointAtInfinity | |||
) |
Definition at line 166 of file eccvm_circuit_builder.test.cpp.
TEST | ( | ECCVMCircuitBuilderTests | , |
MSMProducesInfinity | |||
) |
Definition at line 148 of file eccvm_circuit_builder.test.cpp.
TEST | ( | ECCVMCircuitBuilderTests | , |
Mul | |||
) |
Definition at line 95 of file eccvm_circuit_builder.test.cpp.
TEST | ( | ECCVMCircuitBuilderTests | , |
MulInfinity | |||
) |
Definition at line 111 of file eccvm_circuit_builder.test.cpp.
TEST | ( | ECCVMCircuitBuilderTests | , |
MulOverIdenticalInputs | |||
) |
Definition at line 131 of file eccvm_circuit_builder.test.cpp.
TEST | ( | ECCVMCircuitBuilderTests | , |
NoOp | |||
) |
Definition at line 71 of file eccvm_circuit_builder.test.cpp.
TEST | ( | ECCVMCircuitBuilderTests | , |
ShortMul | |||
) |
Definition at line 230 of file eccvm_circuit_builder.test.cpp.