|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
Public Types | |
| using | RecursiveFlavor = RecursiveFlavor_ |
Static Public Attributes | |
| static constexpr bool | IsRootRollup = IsRootRollup_ |
| static constexpr size_t | N = N_ |
| static constexpr std::array< size_t, N > | LayerSizes = LayerSizes_ |
These functions are used to generate the constraints for testing Honk recursive verification.
We wish to test the following scenarios:
We make the testing framework slighly more general to accomodate more cases, should we wish to test them. The template parameters depict the following scenarios: write (s_1, .., s_N) for the array in the template 0. s_1 <= s_2 <= .. <= s_N; instantiate an empty array (F_1, .., F_{s_1})
All the "inner" circuits F_1, .., F_{s_1} are constructed using the same builder and same flavor. This flavor is specified by RecursiveFlavor::NativeFlavor, called InnerFlavor. This flavor determines which data should be propagated (PairingPoints, IPA claims). The "outer" circuit that verifies F_1, .., F_{s_N} is constructed using the builder determined by RecursiveFlavor::CircuitBuilder. The rationale for templating the tests on a RecursiveFlavor is that this creates a direct correspondence betweeen the tests and the if/else branches in function that handles the honk recursion constraints.
NOTE: We add another template parameter: IsRootRollup so that we can force finalization of IPA claims.
EXAMPLE: If N = 1, s_1 = 1, then C = { recursively verify A_1 } performs a single recursive verification. EXAMPLE: If N = 1, s_1 = 2, IsRootRollup = false, then C = { recursively verify A_1, A_2 }. This is a Base/Merge rollup. EXAMPLE: If N = 1, s_1 = 2, IsRootRollup = true, then C = { recursively verify A_1, A_2 + IPA verification}. This is a root rollup. EXAMPLE: If N = 2, (s_1, s_2) = (2, 1), then C = { recursively verify B_1, A_2 }, where B_1 = { recursively verify A_1 }.
Definition at line 55 of file honk_recursion_constraint.test.cpp.
| using HonkRecursionTestParams< RecursiveFlavor_, IsRootRollup_, N_, LayerSizes_ >::RecursiveFlavor = RecursiveFlavor_ |
Definition at line 57 of file honk_recursion_constraint.test.cpp.
|
staticconstexpr |
Definition at line 58 of file honk_recursion_constraint.test.cpp.
|
staticconstexpr |
Definition at line 60 of file honk_recursion_constraint.test.cpp.
|
staticconstexpr |
Definition at line 59 of file honk_recursion_constraint.test.cpp.