Skip to content

refactor: deduplicate MembershipWitness struct (backport #21244)#21344

Closed
AztecBot wants to merge 1 commit intobackport-to-v4-stagingfrom
claudebox/backport-21244-membership-witness
Closed

refactor: deduplicate MembershipWitness struct (backport #21244)#21344
AztecBot wants to merge 1 commit intobackport-to-v4-stagingfrom
claudebox/backport-21244-membership-witness

Conversation

@AztecBot
Copy link
Collaborator

Summary

Backport of #21244 to v4-next.

Removes the duplicate MembershipWitness<N, M> struct from aztec-nr/oracle/get_membership_witness.nr and reuses the canonical MembershipWitness<N> from noir-protocol-circuits/types/merkle_tree/membership. Also adds Deserialize/Serialize derives to the protocol-circuits version and improves doc comments on nullifier membership witness functions.

Conflict Resolution

The automatic cherry-pick failed due to oracle name differences between next and v4-next. On v4-next, oracle names use the utility prefix (e.g. utilityGetNoteHashMembershipWitness) while next uses aztec_utl_ prefix. Resolved by keeping the v4-next oracle names while applying the struct deduplication.

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

…definition

Remove the duplicate `MembershipWitness` struct from the aztec-nr oracle module and reuse the
canonical one from `noir-protocol-circuits/types/merkle_tree/membership`. This also drops the
unnecessary `M` generic parameter that was a workaround for a Noir type-system limitation that
no longer exists.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@AztecBot AztecBot added the claudebox Owned by claudebox. it can push to this PR. label Mar 11, 2026
@ludamad ludamad force-pushed the backport-to-v4-staging branch from 4ff264b to 2d467c9 Compare March 12, 2026 22:29
@nventuro nventuro closed this Mar 13, 2026
@nventuro nventuro deleted the claudebox/backport-21244-membership-witness branch March 13, 2026 14:17
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.

3 participants