refactor: deduplicate MembershipWitness struct (backport #21244)#21344
Closed
AztecBot wants to merge 1 commit intobackport-to-v4-stagingfrom
Closed
refactor: deduplicate MembershipWitness struct (backport #21244)#21344AztecBot wants to merge 1 commit intobackport-to-v4-stagingfrom
AztecBot wants to merge 1 commit intobackport-to-v4-stagingfrom
Conversation
…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>
4ff264b to
2d467c9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backport of #21244 to v4-next.
Removes the duplicate
MembershipWitness<N, M>struct fromaztec-nr/oracle/get_membership_witness.nrand reuses the canonicalMembershipWitness<N>fromnoir-protocol-circuits/types/merkle_tree/membership. Also addsDeserialize/Serializederives 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
nextandv4-next. Onv4-next, oracle names use theutilityprefix (e.g.utilityGetNoteHashMembershipWitness) whilenextusesaztec_utl_prefix. Resolved by keeping the v4-next oracle names while applying the struct deduplication.ClaudeBox log: https://claudebox.work/s/d61d773ada3c4f43?run=1