Skip to content

refactor(pxe)!: drop V1 oracle remnants, simplify nullifier witness#23428

Merged
benesjan merged 3 commits into
merge-train/fairiesfrom
nchamo/more-oracle-cleanup
May 20, 2026
Merged

refactor(pxe)!: drop V1 oracle remnants, simplify nullifier witness#23428
benesjan merged 3 commits into
merge-train/fairiesfrom
nchamo/more-oracle-cleanup

Conversation

@nchamo

@nchamo nchamo commented May 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Drop the V1 getBlockHashMembershipWitness oracle handler and rename getBlockHashMembershipWitnessV2 to its canonical name.
  • Rename assertCompatibleOracleVersionV2 back to assertCompatibleOracleVersion.
  • Remove the RawNullifierMembershipWitness shim — the oracle now returns (NullifierLeafPreimage, MembershipWitness) directly. NullifierMembershipWitness.toNoirRepresentation() and toFields() are reordered to match Noir's fixed tuple layout (preimage fields, then index, then sibling path).
  • Bump ORACLE_VERSION_MAJOR 24 → 25.

Fixes F-651
Fixes F-546
Fixes F-554

@nchamo nchamo requested a review from nventuro as a code owner May 20, 2026 10:24
@nchamo nchamo self-assigned this May 20, 2026
@nchamo nchamo requested a review from benesjan May 20, 2026 10:53
*/
public toFields(): Fr[] {
return [new Fr(this.index), ...this.leafPreimage.toFields(), ...this.siblingPath.toFields()];
return [...this.leafPreimage.toFields(), new Fr(this.index), ...this.siblingPath.toFields()];

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.

Why was this needed?

I think in general it's desirable to keep the ordering of struct fields aligned everywhere as it prevents serialization issues.

Could we keep the ordering aligned across this method, schema and the constructor?

Note that if we would modify schema then this would likely be a aztec node API breaking change which I am not sure if it's problem on v5.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It wasn't actually needed, we just needed to update toNoirRepresentation. I though it made sense to be consistent, but I don't think we should update the schema and introduce potential breaking changes. Reverting

@benesjan benesjan May 20, 2026

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.

I see. In that case why not have toFields aligned with the rest here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As discussed:

  • Deleted toFields
  • Added a comment explaining why we are serialization it like that

* Returns a field array representation of a nullifier witness.
* @returns A field array representation of a nullifier witness.
*/
public toFields(): Fr[] {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was not being used

@nchamo nchamo requested a review from benesjan May 20, 2026 12:24
@benesjan benesjan merged commit 06cb964 into merge-train/fairies May 20, 2026
14 checks passed
@benesjan benesjan deleted the nchamo/more-oracle-cleanup branch May 20, 2026 12:57
nchamo added a commit that referenced this pull request May 23, 2026
…oding logic

The registry-introduction branch was based on an older snapshot that predated PR #23428,
which replaced V1's throw-on-None with V2's Option encoding. This re-applies that change
and removes the now-redundant V2 method.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
danielntmd pushed a commit to danielntmd/aztec-packages that referenced this pull request Jun 4, 2026
BEGIN_COMMIT_OVERRIDE
refactor(pxe)!: remove legacy oracle compat, rename V2 oracles (AztecProtocol#23425)
refactor(pxe)!: drop V1 oracle remnants, simplify nullifier witness
(AztecProtocol#23428)
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.

2 participants