refactor(pxe)!: drop V1 oracle remnants, simplify nullifier witness#23428
Conversation
| */ | ||
| 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()]; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
I see. In that case why not have toFields aligned with the rest here?
There was a problem hiding this comment.
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[] { |
There was a problem hiding this comment.
This was not being used
…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>
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
Summary
getBlockHashMembershipWitnessoracle handler and renamegetBlockHashMembershipWitnessV2to its canonical name.assertCompatibleOracleVersionV2back toassertCompatibleOracleVersion.RawNullifierMembershipWitnessshim — the oracle now returns(NullifierLeafPreimage, MembershipWitness)directly.NullifierMembershipWitness.toNoirRepresentation()andtoFields()are reordered to match Noir's fixed tuple layout (preimage fields, then index, then sibling path).ORACLE_VERSION_MAJOR24 → 25.Fixes F-651
Fixes F-546
Fixes F-554