40 BB_ASSERT(!constraints.empty(),
"At least one recursion constraint is required to determine Chonk state");
41 const bool is_init = constraint_has_type(constraints[0], Chonk::QUEUE_TYPE::OINK);
42 const bool is_reset = (constraints.size() == 1 && constraint_has_type(constraints[0], Chonk::QUEUE_TYPE::HN));
43 const bool is_tail = (constraints.size() == 1 && constraint_has_type(constraints[0], Chonk::QUEUE_TYPE::HN_TAIL));
44 const bool is_hiding =
45 (constraints.size() == 1 && constraint_has_type(constraints[0], Chonk::QUEUE_TYPE::HN_FINAL));
46 const size_t upper_bound = is_init ? MAX_APPS_PER_KERNEL : MAX_APPS_PER_KERNEL + 1;
47 BB_ASSERT_LTE(constraints.size(), upper_bound,
"Too many recursion constraints encountered when mocking IVC state");
54 for (
size_t idx = 1; idx < constraints.size(); idx++) {
55 BB_ASSERT(constraint_has_type(constraints[idx], Chonk::QUEUE_TYPE::HN),
56 "Subsequent constraints in init kernel must be HN type");
81 bool is_kernel =
true;
82 for (
const auto& constraint : constraints) {
83 BB_ASSERT(constraint_has_type(constraint, Chonk::QUEUE_TYPE::HN),
84 "All constraints in inner kernel must be HN type");
107 const bool is_kernel)
109 using IvcType =
Chonk;
110 using FF = IvcType::FF;
111 using MegaVerificationKey = IvcType::MegaVerificationKey;
112 using Flavor = IvcType::Flavor;
114 size_t dyadic_size = 1 << Flavor::VIRTUAL_LOG_N;
116 std::vector<FF> proof;
121 BB_ASSERT_EQ(verification_type == Chonk::QUEUE_TYPE::HN || verification_type == Chonk::QUEUE_TYPE::HN_TAIL ||
122 verification_type == Chonk::QUEUE_TYPE::HN_FINAL,
126 constexpr bool include_fold =
true;
127 proof = create_mock_hyper_nova_proof<Flavor, KernelIO>(include_fold);
129 verification_key = create_mock_honk_vk<Flavor, KernelIO>(dyadic_size);
132 BB_ASSERT_EQ(verification_type == Chonk::QUEUE_TYPE::OINK || verification_type == Chonk::QUEUE_TYPE::HN,
true);
135 bool include_fold = (verification_type != Chonk::QUEUE_TYPE::OINK);
136 proof = create_mock_hyper_nova_proof<Flavor, AppIO>(include_fold);
138 verification_key = create_mock_honk_vk<Flavor, AppIO>(dyadic_size);
164 ivc->recursive_verifier_native_accum.non_shifted_evaluation =
FF::zero();
165 ivc->recursive_verifier_native_accum.shifted_evaluation =
FF::zero();
166 ivc->recursive_verifier_native_accum.non_shifted_commitment = Commitment::one();
167 ivc->recursive_verifier_native_accum.shifted_commitment = Commitment::one();
170 ivc->verification_queue.emplace_back(entry);
171 if (
type == Chonk::QUEUE_TYPE::HN_FINAL) {
173 ivc->decider_proof = acir_format::create_mock_pcs_proof<Chonk::Flavor>();
175 ivc->num_circuits_accumulated++;