Skip to content

chore: remove obsolete no_predicates wrappers (#7729) - #24050

Merged
benesjan merged 1 commit into
merge-train/fairiesfrom
jb/remove-no-predicates-wrappers
Jun 15, 2026
Merged

chore: remove obsolete no_predicates wrappers (#7729)#24050
benesjan merged 1 commit into
merge-train/fairiesfrom
jb/remove-no-predicates-wrappers

Conversation

@benesjan

@benesjan benesjan commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Issue #7729 (closed) left behind two TODO(#7729) wrappers that used #[no_predicates] + #[contract_library_method] to compute recursive contract interface calls outside of conditional branches:

  • compute_recurse_subtract_balance_call in the token contract
  • call_verify_storage_proof_path_recursively in the storage proof test contract

This PR removes both wrappers and calls the contract interface methods directly at the call sites (including inside the recursive if/else branches the wrappers were originally guarding).

Verification

Compiled each contract with and without the wrappers (nargo compile --inliner-aggressiveness 0, matching bootstrap.sh) and measured the affected functions with bb gates --scheme chonk:

Function With wrapper Without wrapper
Token::transfer 5,602 opcodes / 19,766 circuit size identical
Token::_recurse_subtract_balance 13,175 / 35,020 identical
StorageProofTest::storage_proof 18,130 / 92,641 identical
StorageProofTest::verify_storage_proof_path_recursively 55,575 / 383,444 identical

The extracted function ACIR is byte-identical (matching md5) across the two builds in all four cases, so the manual optimization no longer has any effect and the compiler handles this on its own.

These were the last two #[no_predicates] usages referencing #7729 in noir-contracts.

Removes the #[no_predicates] + #[contract_library_method] wrappers around
recursive contract interface calls in the token and storage proof test
contracts. Compiling with and without the wrappers produces byte-identical
bytecode for all affected functions (verified with bb gates --scheme chonk:
transfer 5602 opcodes / _recurse_subtract_balance 13175 opcodes /
storage_proof 18130 opcodes / verify_storage_proof_path_recursively 55575
opcodes, unchanged), so the manual optimization is no longer needed.
@AztecBot

Copy link
Copy Markdown
Collaborator

Flakey Tests

🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry.

\033FLAKED\033 (8;;http://ci.aztec-labs.com/e93fee4aa755c5d7�e93fee4aa755c5d78;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_p2p/sentinel_status_slash.parallel.test.ts "slashes the proposer with INACTIVITY when checkpoint validation records unvalidated" (208s) (code: 0) group:e2e-p2p-epoch-flakes

@vezenovm vezenovm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@benesjan
benesjan merged commit 93c080c into merge-train/fairies Jun 15, 2026
15 checks passed
@benesjan
benesjan deleted the jb/remove-no-predicates-wrappers branch June 15, 2026 15:04
rangozd pushed a commit to rangozd/aztec-packages that referenced this pull request Aug 5, 2026
BEGIN_COMMIT_OVERRIDE
chore: remove obsolete no_predicates wrappers (AztecProtocol#7729) (AztecProtocol#24050)
chore: barebones constants-codegen project (AztecProtocol#24687)
chore: constants codegen release (AztecProtocol#24728)
END_COMMIT_OVERRIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants