Skip to content

chore: backport PR #20775 to v4-next (auto-enqueue public init nullifier)#21492

Merged
nchamo merged 1 commit into
backport-to-v4-next-stagingfrom
claudebox/ff2dd4f68e9ac0be-2
Mar 13, 2026
Merged

chore: backport PR #20775 to v4-next (auto-enqueue public init nullifier)#21492
nchamo merged 1 commit into
backport-to-v4-next-stagingfrom
claudebox/ff2dd4f68e9ac0be-2

Conversation

@AztecBot

Copy link
Copy Markdown
Collaborator

Summary

Backport of #20775 to v4-next.

feat!: auto-enqueue public init nullifier for contracts with public functions

Contract initialization now emits two separate nullifiers (private + public) instead of one, fixing a bug where public functions could be called on an uninitialized contract if enqueued before the initializer's public calls.

Backport details

Cherry-picked merge commit cee97a1ba434f8469245152ca18d306f33d303fb onto latest backport-to-v4-next-staging.

Conflicts resolved in:

  • docs/docs-developers/docs/resources/migration_notes.md — added migration notes for the new init nullifier behavior
  • noir-projects/aztec-nr/aztec/src/macros/aztec.nr — adapted imports for v4-next style, added emit_public_init_nullifier import and quote output alongside existing offchain_receive
  • noir-projects/noir-protocol-circuits/crates/types/src/constants.nr — added DOM_SEP__PUBLIC_INITIALIZATION_NULLIFIER
  • noir-projects/noir-protocol-circuits/crates/types/src/constants_tests.nr — adjusted test counts from <50, 43> to <51, 44>
  • yarn-project/end-to-end/src/composed/ha/e2e_ha_full.test.ts — excluded reloadKeystore test (context from next, not part of this PR)

Verification

All modified Noir contracts (aztec-nr, init_test_contract, private_init_test_contract, stateful_test_contract) compile successfully with nargo check.

Supersedes #21419 (based on older v4-next).

ClaudeBox log: https://claudebox.work/s/ff2dd4f68e9ac0be?run=2

…with public functions (#20775)

Cherry-pick of cee97a1 with conflicts.
@AztecBot AztecBot added the claudebox Owned by claudebox. it can push to this PR. label Mar 13, 2026
@nchamo nchamo self-assigned this Mar 13, 2026
@nchamo nchamo marked this pull request as ready for review March 13, 2026 13:19
@nchamo nchamo merged commit 46079be into backport-to-v4-next-staging Mar 13, 2026
21 checks passed
@nchamo nchamo deleted the claudebox/ff2dd4f68e9ac0be-2 branch March 13, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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