Skip to content

fix: suppress debug assertions during mock IVC VK generation#21932

Closed
AztecBot wants to merge 1 commit into
nextfrom
claudebox/fix-bb-debug-build
Closed

fix: suppress debug assertions during mock IVC VK generation#21932
AztecBot wants to merge 1 commit into
nextfrom
claudebox/fix-bb-debug-build

Conversation

@AztecBot

Copy link
Copy Markdown
Collaborator

Summary

Fixes nightly barretenberg debug build failure in test_chonk_standalone_vks_havent_changed.sh.

The VK check script uses bb check --scheme chonk with the debug-built binary. During VK generation, when no real IVC instance is available (ivc_base == nullptr), a mock IVC is created with dummy data. The mock's calldata commitments ({1, 2}) don't match the kernel_return_data from proof public inputs, triggering BB_ASSERT_DEBUG(kernel_return_data_match) in chonk.cpp:173. This assertion is a no-op in release builds but crashes the debug binary.

Fix: add BB_DISABLE_ASSERTS() guard when processing HN recursion constraints with mock IVC data, since databus consistency checks are only meaningful with real witness data.

CI log

  • Failed job: http://ci.aztec-labs.com/ed339fd42baf768f
  • Error: kernel_return_data mismatch: proof contains { 0x2de8... } but calldata commitment is { 0x01, 0x02 }
  • Affected flows: all kernel flows in the VK check (ecdsar1+transfer, amm_add_liquidity, token_bridge_claim_private, etc.)

ClaudeBox log: https://claudebox.work/s/3bdb56bf04e64c5d?run=1

@AztecBot AztecBot added ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR. labels Mar 24, 2026
The nightly barretenberg debug build fails in test_chonk_standalone_vks_havent_changed.sh
because BB_ASSERT_DEBUG(kernel_return_data_match) fires in chonk.cpp when using mock IVC
data for VK generation. The mock data has intentionally mismatched dummy calldata
commitments ({1, 2}) that don't match the kernel_return_data from proof public inputs.

Fix: use BB_DISABLE_ASSERTS() guard when processing HN recursion constraints with mock IVC
(ivc_base == nullptr), which is the VK generation path. These databus consistency checks
are only meaningful with real witness data, not the dummy values used during VK derivation.
@AztecBot AztecBot force-pushed the claudebox/fix-bb-debug-build branch from 6c8891f to 1e5b898 Compare March 25, 2026 05:45
@federicobarbacovi

Copy link
Copy Markdown
Contributor

Fixed in #21957

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants