Skip to content

Commit daf1360

Browse files
authored
fix: satisfy Chonk num_circuits >= 4 assertion in mock IVC creation (#22188)
## Summary PR #22181 tightened the `Chonk` constructor to require `num_circuits >= 4`, but `create_mock_chonk_from_constraints()` was passing `constraints.size()` (1-2 for most kernels), causing assertion failures during VK generation for `mock-protocol-circuits` and `noir-protocol-circuits`. ## Fix Pass `std::max(constraints.size(), 4)` since the mock doesn't use `num_circuits` for anything — it directly manipulates the verification queue. ## Verification - All DSL tests pass (Hypernova, MockVerifier, ChonkRecursion) - `mock-protocol-circuits` bootstrap: 11/11 circuits pass - `noir-protocol-circuits` bootstrap: 120/120 circuits pass ClaudeBox log: https://claudebox.work/s/71d20ef48c81e6e3?run=1
1 parent 57280d7 commit daf1360

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

barretenberg/cpp/src/barretenberg/dsl/acir_format/hypernova_recursion_constraint.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ using namespace bb;
3131
*/
3232
std::shared_ptr<Chonk> create_mock_chonk_from_constraints(const std::vector<RecursionConstraint>& constraints)
3333
{
34-
auto ivc = std::make_shared<Chonk>(constraints.size());
34+
auto ivc = std::make_shared<Chonk>(std::max(constraints.size(), static_cast<size_t>(4)));
3535

3636
// Check constraint proof type. Throws if proof_type is not a valid HyperNova type
3737
auto constraint_has_type = [](const RecursionConstraint& c, Chonk::QUEUE_TYPE expected) {

0 commit comments

Comments
 (0)