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

Go to the source code of this file.

Functions

 TEST (SumcheckRound, SumcheckTupleOfTuplesOfUnivariates)
 Test SumcheckRound functions for operations on tuples (and tuples of tuples) of Univariates.
 
 TEST (SumcheckRound, TuplesOfEvaluationArrays)
 Test utility functions for applying operations to tuple of std::arrays of field elements.
 
 TEST (SumcheckRound, AddTuplesOfTuplesOfUnivariates)
 Test utility functions for adding two tuples of tuples of Univariates.
 
 TEST (SumcheckRound, ComputeEffectiveRoundSize)
 Test compute_effective_round_size optimization for non-ZK flavors.
 
 TEST (SumcheckRound, ComputeEffectiveRoundSizeZK)
 Test that compute_effective_round_size returns full size for ZK flavors.
 
 TEST (SumcheckRound, ExtendEdgesShortMonomial)
 Test that extend_edges works correctly in the cases we're using ShortMonomials.
 
 TEST (SumcheckRound, ExtendEdges)
 Test extend_edges with full barycentric extension (non-short-monomial flavor)
 
 TEST (SumcheckRound, AccumulateRelationUnivariatesSumcheckTestFlavor)
 Test accumulate_relation_univariates for SumcheckTestFlavor.
 
 TEST (SumcheckRound, CheckSumFieldArithmetic)
 Test check_sum with field arithmetic edge cases.
 
 TEST (SumcheckRound, CheckSumPaddingIndicator)
 Test check_sum with padding indicator.
 
 TEST (SumcheckRound, CheckSumRoundFailurePersistence)
 Test round_failed flag persistence in check_sum.
 
 TEST (SumcheckRound, CheckSumRecursiveUnsatisfiableWitness)
 Test check_sum in a recursive circuit with unsatisfiable witness.
 

Function Documentation

◆ TEST() [1/12]

TEST ( SumcheckRound  ,
AccumulateRelationUnivariatesSumcheckTestFlavor   
)

Test accumulate_relation_univariates for SumcheckTestFlavor.

Tests that:

  1. Arithmetic relation contributions are correctly accumulated
  2. Scaling factors are properly applied
  3. Multiple calls correctly accumulate (add) contributions

Definition at line 475 of file sumcheck_round.test.cpp.

◆ TEST() [2/12]

TEST ( SumcheckRound  ,
AddTuplesOfTuplesOfUnivariates   
)

Test utility functions for adding two tuples of tuples of Univariates.

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

◆ TEST() [3/12]

TEST ( SumcheckRound  ,
CheckSumFieldArithmetic   
)

Test check_sum with field arithmetic edge cases.

Verifies that check_sum works correctly with large field elements near the modulus

Definition at line 683 of file sumcheck_round.test.cpp.

◆ TEST() [4/12]

TEST ( SumcheckRound  ,
CheckSumPaddingIndicator   
)

Test check_sum with padding indicator.

Verifies that padding rounds (indicator=0) bypass the check, while non-padding rounds (indicator=1) perform the check

Definition at line 751 of file sumcheck_round.test.cpp.

◆ TEST() [5/12]

TEST ( SumcheckRound  ,
CheckSumRecursiveUnsatisfiableWitness   
)

Test check_sum in a recursive circuit with unsatisfiable witness.

Creates a recursive circuit where check_sum is called with witnesses that don't satisfy the constraint, verifying that the circuit correctly detects the failure.

Definition at line 890 of file sumcheck_round.test.cpp.

◆ TEST() [6/12]

TEST ( SumcheckRound  ,
CheckSumRoundFailurePersistence   
)

Test round_failed flag persistence in check_sum.

Verifies that once a check fails, the round_failed flag persists across subsequent checks

Definition at line 825 of file sumcheck_round.test.cpp.

◆ TEST() [7/12]

TEST ( SumcheckRound  ,
ComputeEffectiveRoundSize   
)

Test compute_effective_round_size optimization for non-ZK flavors.

This function optimizes sumcheck iteration by only processing up to the active witness region, avoiding iteration over trailing zeros when HasZK is false.

Definition at line 150 of file sumcheck_round.test.cpp.

◆ TEST() [8/12]

TEST ( SumcheckRound  ,
ComputeEffectiveRoundSizeZK   
)

Test that compute_effective_round_size returns full size for ZK flavors.

For ZK flavors, we must always iterate over the full round_size including masked rows

Definition at line 314 of file sumcheck_round.test.cpp.

◆ TEST() [9/12]

TEST ( SumcheckRound  ,
ExtendEdges   
)

Test extend_edges with full barycentric extension (non-short-monomial flavor)

Uses MultilinearBatchingFlavor which has USE_SHORT_MONOMIALS=false to test that the barycentric extension to MAX_PARTIAL_RELATION_LENGTH works correctly.

Definition at line 405 of file sumcheck_round.test.cpp.

◆ TEST() [10/12]

TEST ( SumcheckRound  ,
ExtendEdgesShortMonomial   
)

Test that extend_edges works correctly in the cases we're using ShortMonomials.

Verifies that the barycentric extension preserves the univariate property: the extended univariate should be a degree-1 polynomial that passes through the two given points.

Definition at line 346 of file sumcheck_round.test.cpp.

◆ TEST() [11/12]

TEST ( SumcheckRound  ,
SumcheckTupleOfTuplesOfUnivariates   
)

Test SumcheckRound functions for operations on tuples (and tuples of tuples) of Univariates.

Definition at line 17 of file sumcheck_round.test.cpp.

◆ TEST() [12/12]

TEST ( SumcheckRound  ,
TuplesOfEvaluationArrays   
)

Test utility functions for applying operations to tuple of std::arrays of field elements.

Definition at line 72 of file sumcheck_round.test.cpp.