Skip to content

fix: skip oracle version check for pinned protocol contracts#21349

Merged
benesjan merged 2 commits intomerge-train/fairiesfrom
jan/protocol-contracts-oracle-version-compat
Mar 11, 2026
Merged

fix: skip oracle version check for pinned protocol contracts#21349
benesjan merged 2 commits intomerge-train/fairiesfrom
jan/protocol-contracts-oracle-version-compat

Conversation

@benesjan
Copy link
Contributor

@benesjan benesjan commented Mar 11, 2026

We messed up backports of PRs modifying oracles because we forgot that we already have pinned protocol contracts artifacts on the v4 branch that effectively result in us having dependency on the old oracles. We agreed with Nico that to get around this we have to:

  1. Map the old oracles that are used by the protocol contracts to the new handlers,
  2. skip the oracle versions check for protocol the contracts,
  3. keep in mind that we no longer can modify the oracles used by the protocol contracts.

Note that this will need to be backported with #21101 at the same time #21101 is not backportable on its own.

AI Summary

  • Skip the oracle version check for pinned protocol contracts (ContractInstanceRegistry, ContractClassRegistry, FeeJuice) whose bytecode is committed and cannot be changed
  • Register legacy oracle name aliases (utilityLog, utilityAssertCompatibleOracleVersion, utilityLoadCapsule, privateStoreInExecutionCache, privateLoadFromExecutionCache) so the old oracle names used by these contracts still resolve
  • Narrow isProtocolContract to only the 3 actual protocol dependencies (was previously checking all 6 canonical addresses)
  • Add TODO(F-416) preservation comments to all affected oracle methods

benesjan and others added 2 commits March 11, 2026 05:01
… pinned protocol contracts

Protocol contracts (ContractInstanceRegistry, ContractClassRegistry, FeeJuice) shipped with committed bytecode compiled against an older oracle version. Since their bytecode cannot be changed, we skip the oracle version check for these contracts and register legacy oracle name aliases (utilityLog, utilityAssertCompatibleOracleVersion, etc.) so the old oracle names still resolve correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@benesjan benesjan requested a review from mverzilli March 11, 2026 05:45
@benesjan benesjan changed the title fix(pxe): skip oracle version check for pinned protocol contracts fix: skip oracle version check for pinned protocol contracts Mar 11, 2026
Copy link
Contributor

@mverzilli mverzilli left a comment

Choose a reason for hiding this comment

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

Good solution!

@benesjan benesjan merged commit 2a60496 into merge-train/fairies Mar 11, 2026
18 checks passed
@benesjan benesjan deleted the jan/protocol-contracts-oracle-version-compat branch March 11, 2026 08:23
nventuro added a commit that referenced this pull request Mar 13, 2026
## Summary
- Backports 5 PRs from `merge-train/fairies` related to oracle changes:
  - #21101 - feat: improve oracle name prefixes
- #21349 - fix: skip oracle version check for pinned protocol contracts
  - #21244 - refactor: deduplicate MembershipWitness struct
  - #21176 - feat(pxe)!: pass BoundedVec sizes as oracle params
- #21209 - refactor!: cleaning up public call and tx phase related
oracles

## Test plan
- CI passes on backport branch

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Nicolas Chamo <nicolas@chamo.com.ar>
Co-authored-by: benesjan <benesjan@users.noreply.github.com>
github-merge-queue bot pushed a commit that referenced this pull request Mar 13, 2026
BEGIN_COMMIT_OVERRIDE
fix: skip oracle version check for pinned protocol contracts (#21349)
fix: not reusing tags of partially reverted txs (#20817)
feat: move storage_slot from partial commitment to completion hash
(#21351)
feat: offchain reception (#20893)
fix: handle workspace members in needsRecompile crate collection
(#21284)
fix(aztec-nr): return Option from decode functions and fix event
commitment capacity (#21264)
fix: handle bad note lengths on compute_note_hash_and_nullifier (#21271)
fix: address review feedback from PRs #21284 and #21237 (#21369)
fix: claim contract & improve nullif docs (#21234)
feat!: auto-enqueue public init nullifier for contracts with public
functions (#20775)
fix: search for all note nonces instead of just the one for the note
index (#21438)
fix: set anvilSlotsInAnEpoch in e2e_offchain_payment to prevent
finalization race (#21452)
fix: complete legacy oracle mappings for all pinned contracts (#21404)
fix: correct inverted constrained encryption check in message delivery
(#21399)
feat!: improve L2ToL1MessageWitness API (#21231)
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