Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
eccvm_circuit_builder.test.cpp File Reference

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.
 
 TEST (ECCVMCircuitBuilderTests, ScalarEdgeCase)
 Test multiplication with boundary scalar edge case.
 

Typedef Documentation

◆ Fr

using Fr = typename G1::Fr

Definition at line 9 of file eccvm_circuit_builder.test.cpp.

◆ G1

using G1 = bb::g1

Definition at line 8 of file eccvm_circuit_builder.test.cpp.

Function Documentation

◆ TEST() [1/23]

TEST ( ECCVMCircuitBuilderTests  ,
Add   
)

Definition at line 94 of file eccvm_circuit_builder.test.cpp.

◆ TEST() [2/23]

TEST ( ECCVMCircuitBuilderTests  ,
AddPointAtInfinity   
)

Definition at line 460 of file eccvm_circuit_builder.test.cpp.

◆ TEST() [3/23]

TEST ( ECCVMCircuitBuilderTests  ,
AddProducesDouble   
)

Definition at line 498 of file eccvm_circuit_builder.test.cpp.

◆ TEST() [4/23]

TEST ( ECCVMCircuitBuilderTests  ,
AddProducesPointAtInfinity   
)

Definition at line 480 of file eccvm_circuit_builder.test.cpp.

◆ TEST() [5/23]

TEST ( ECCVMCircuitBuilderTests  ,
BaseCase   
)

Definition at line 27 of file eccvm_circuit_builder.test.cpp.

◆ TEST() [6/23]

TEST ( ECCVMCircuitBuilderTests  ,
EmptyRow   
)

Definition at line 292 of file eccvm_circuit_builder.test.cpp.

◆ TEST() [7/23]

TEST ( ECCVMCircuitBuilderTests  ,
EmptyRowBetweenOps   
)

Definition at line 305 of file eccvm_circuit_builder.test.cpp.

◆ TEST() [8/23]

TEST ( ECCVMCircuitBuilderTests  ,
EndWithAdd   
)

Definition at line 342 of file eccvm_circuit_builder.test.cpp.

◆ TEST() [9/23]

TEST ( ECCVMCircuitBuilderTests  ,
EndWithEq   
)

Definition at line 324 of file eccvm_circuit_builder.test.cpp.

◆ TEST() [10/23]

TEST ( ECCVMCircuitBuilderTests  ,
EndWithMul   
)

Definition at line 361 of file eccvm_circuit_builder.test.cpp.

◆ TEST() [11/23]

TEST ( ECCVMCircuitBuilderTests  ,
EndWithNoop   
)

Definition at line 380 of file eccvm_circuit_builder.test.cpp.

◆ TEST() [12/23]

TEST ( ECCVMCircuitBuilderTests  ,
EqAgainstPointAtInfinity   
)

Definition at line 442 of file eccvm_circuit_builder.test.cpp.

◆ TEST() [13/23]

TEST ( ECCVMCircuitBuilderTests  ,
EqFails   
)

Definition at line 273 of file eccvm_circuit_builder.test.cpp.

◆ TEST() [14/23]

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 533 of file eccvm_circuit_builder.test.cpp.

◆ TEST() [15/23]

TEST ( ECCVMCircuitBuilderTests  ,
MSM   
)

Definition at line 401 of file eccvm_circuit_builder.test.cpp.

◆ TEST() [16/23]

TEST ( ECCVMCircuitBuilderTests  ,
MSMOverPointAtInfinity   
)

Definition at line 185 of file eccvm_circuit_builder.test.cpp.

◆ TEST() [17/23]

TEST ( ECCVMCircuitBuilderTests  ,
MSMProducesInfinity   
)

Definition at line 166 of file eccvm_circuit_builder.test.cpp.

◆ TEST() [18/23]

TEST ( ECCVMCircuitBuilderTests  ,
Mul   
)

Definition at line 110 of file eccvm_circuit_builder.test.cpp.

◆ TEST() [19/23]

TEST ( ECCVMCircuitBuilderTests  ,
MulInfinity   
)

Definition at line 127 of file eccvm_circuit_builder.test.cpp.

◆ TEST() [20/23]

TEST ( ECCVMCircuitBuilderTests  ,
MulOverIdenticalInputs   
)

Definition at line 148 of file eccvm_circuit_builder.test.cpp.

◆ TEST() [21/23]

TEST ( ECCVMCircuitBuilderTests  ,
NoOp   
)

Definition at line 84 of file eccvm_circuit_builder.test.cpp.

◆ TEST() [22/23]

TEST ( ECCVMCircuitBuilderTests  ,
ScalarEdgeCase   
)

Test multiplication with boundary scalar edge case.

This test validates scalar multiplication with (2^128) to ensure proper handling of edge cases associated with WNAF decomposition.

Definition at line 568 of file eccvm_circuit_builder.test.cpp.

◆ TEST() [23/23]

TEST ( ECCVMCircuitBuilderTests  ,
ShortMul   
)

Definition at line 250 of file eccvm_circuit_builder.test.cpp.