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

Go to the source code of this file.

Classes

class  ECCVMTests
 

Typedefs

using FF = ECCVMFlavor::FF
 
using PK = ECCVMFlavor::ProvingKey
 
using Transcript = ECCVMFlavor::Transcript
 
using ECCVMVerifier = ECCVMVerifier_< ECCVMFlavor >
 

Functions

ECCVMCircuitBuilder generate_circuit (numeric::RNG *engine=nullptr)
 Adds operations in BN254 to the op_queue and then constructs and ECCVM circuit from the op_queue.
 
ECCVMCircuitBuilder generate_zero_circuit (numeric::RNG *engine=nullptr, bool zero_scalars=1)
 
void complete_proving_key_for_test (bb::RelationParameters< FF > &relation_parameters, std::shared_ptr< PK > &pk, std::vector< FF > &gate_challenges)
 
 TEST_F (ECCVMTests, ZeroesCoefficients)
 
 TEST_F (ECCVMTests, PointAtInfinity)
 
 TEST_F (ECCVMTests, ScalarEdgeCase)
 
 TEST_F (ECCVMTests, ProofLengthCheck)
 Check that size of a ECCVM proof matches the corresponding constant.
 
 TEST_F (ECCVMTests, BaseCaseFixedSize)
 
 TEST_F (ECCVMTests, EqFailsFixedSize)
 
 TEST_F (ECCVMTests, CommittedSumcheck)
 
 TEST_F (ECCVMTests, FixedVK)
 Test that the fixed VK from the default constructor agrees with the one computed for an arbitrary circuit.
 

Typedef Documentation

◆ ECCVMVerifier

Definition at line 25 of file eccvm.test.cpp.

◆ FF

Definition at line 22 of file eccvm.test.cpp.

◆ PK

Definition at line 23 of file eccvm.test.cpp.

◆ Transcript

Definition at line 24 of file eccvm.test.cpp.

Function Documentation

◆ complete_proving_key_for_test()

void complete_proving_key_for_test ( bb::RelationParameters< FF > &  relation_parameters,
std::shared_ptr< PK > &  pk,
std::vector< FF > &  gate_challenges 
)

Definition at line 114 of file eccvm.test.cpp.

◆ generate_circuit()

ECCVMCircuitBuilder generate_circuit ( numeric::RNG engine = nullptr)

Adds operations in BN254 to the op_queue and then constructs and ECCVM circuit from the op_queue.

Parameters
engine
Returns
ECCVMCircuitBuilder

Definition at line 53 of file eccvm.test.cpp.

◆ generate_zero_circuit()

ECCVMCircuitBuilder generate_zero_circuit ( numeric::RNG engine = nullptr,
bool  zero_scalars = 1 
)

Definition at line 88 of file eccvm.test.cpp.

◆ TEST_F() [1/8]

TEST_F ( ECCVMTests  ,
BaseCaseFixedSize   
)

Definition at line 244 of file eccvm.test.cpp.

◆ TEST_F() [2/8]

TEST_F ( ECCVMTests  ,
CommittedSumcheck   
)

Definition at line 297 of file eccvm.test.cpp.

◆ TEST_F() [3/8]

TEST_F ( ECCVMTests  ,
EqFailsFixedSize   
)

Definition at line 269 of file eccvm.test.cpp.

◆ TEST_F() [4/8]

TEST_F ( ECCVMTests  ,
FixedVK   
)

Test that the fixed VK from the default constructor agrees with the one computed for an arbitrary circuit.

Note
If this test fails, it may be because the constant ECCVM_FIXED_SIZE has changed and the fixed VK commitments in ECCVMFixedVKCommitments must be updated accordingly. Their values can be taken right from the output of this test.

Definition at line 366 of file eccvm.test.cpp.

◆ TEST_F() [5/8]

TEST_F ( ECCVMTests  ,
PointAtInfinity   
)

Definition at line 168 of file eccvm.test.cpp.

◆ TEST_F() [6/8]

TEST_F ( ECCVMTests  ,
ProofLengthCheck   
)

Check that size of a ECCVM proof matches the corresponding constant.

If this test FAILS, then the following (non-exhaustive) list should probably be updated as well:

Definition at line 234 of file eccvm.test.cpp.

◆ TEST_F() [7/8]

TEST_F ( ECCVMTests  ,
ScalarEdgeCase   
)

Definition at line 192 of file eccvm.test.cpp.

◆ TEST_F() [8/8]

TEST_F ( ECCVMTests  ,
ZeroesCoefficients   
)

Definition at line 142 of file eccvm.test.cpp.