Skip to content

fix: complete legacy oracle mappings for all pinned contracts (backport #21404)#21461

Closed
AztecBot wants to merge 7 commits intoclaudebox/backport-21281-reject-evict-txs-v4-nextfrom
claudebox/backport-21404-legacy-oracle-mappings
Closed

fix: complete legacy oracle mappings for all pinned contracts (backport #21404)#21461
AztecBot wants to merge 7 commits intoclaudebox/backport-21281-reject-evict-txs-v4-nextfrom
claudebox/backport-21404-legacy-oracle-mappings

Conversation

@AztecBot
Copy link
Collaborator

Summary

Backport of #21404 to v4-next.

  • Adds buildLegacyOracleCallbacks for pinned protocol contracts whose artifacts are committed and cannot be changed
  • Replaces isActualProtocolContract (only checked 3 contracts) with isProtocolContract (checks all) for oracle version check skip
  • Adds version check logic allowing both legacy oracle version (12) and current oracle version for protocol contracts

v4-next adaptations

On v4-next, oracle methods still use utilityXxx/privateXxx naming (not the aztec_utl_/aztec_prv_ prefix used on next), so:

  • Legacy oracle mappings adapted to call v4-next method names
  • Removed legacy entries for refactor!: cleaning up public call and tx phase related oracles #21209 renames (notifyRevertiblePhaseStart, inRevertiblePhase) and signature changes (validatePublicCalldata) that haven't landed on v4-next
  • Removed utilityValidateAndStoreEnqueuedNotesAndEvents 3→5 param adapter since v4-next still uses the 3-param signature

Test plan

  • CI passes on v4-next
  • Conflict resolution preserves all v4-next method names and handler interfaces
  • Code review confirms no broken references to aztec_utl_/aztec_prv_ methods

ClaudeBox log: https://claudebox.work/s/2809014acb6ffe82?run=2

@AztecBot AztecBot added the claudebox Owned by claudebox. it can push to this PR. label Mar 12, 2026
AztecBot and others added 7 commits March 13, 2026 00:04
 #20992 #21148)

BEGIN_COMMIT_OVERRIDE
fix: set wallet minFeePadding in BotFactory constructor (#20992)
fix: increase minFeePadding in e2e_bot bridge resume tests and harden GasFees.mul() (#20962)
fix: use dedicated L1 account for bot bridge resume tests to avoid nonce race (#21148)
fix: remove stale fee snapshot from BotFactory account deployment
END_COMMIT_OVERRIDE

Backports three fixes from next and adds a fourth:

1. BotFactory constructor now calls wallet.setMinFeePadding() so all
   setup transactions (token deploy, minting) use the configured padding
   instead of the wallet default (0.5x). (#20992)

2. GasFees.mul() uses bigint arithmetic for integer scalars to avoid
   precision loss, and Math.ceil for non-integer scalars. (#20962)

3. Bridge resume tests use a dedicated L1 private key (index 7) instead
   of the default mnemonic shared with the sequencer, avoiding nonce
   races on approve/deposit calls. (#21148)

4. Remove explicit maxFeesPerGas snapshot from setupAccountWithPrivateKey.
   Let the wallet re-estimate fees at send() time via completeFeeOptions(),
   making the fee estimate fresh and 10x padding sufficient.
…with public functions (#20775)

Cherry-pick of cee97a1 with conflicts.
Resolved conflicts in:
- docs/docs-developers/docs/resources/migration_notes.md
- noir-projects/aztec-nr/aztec/src/macros/aztec.nr
- noir-projects/noir-protocol-circuits/crates/types/src/constants.nr
- noir-projects/noir-protocol-circuits/crates/types/src/constants_tests.nr
- yarn-project/end-to-end/src/composed/ha/e2e_ha_full.test.ts
…e per gas (#21281)

Cherry-pick of 9e2d79c with conflicts.

Conflicts:
- yarn-project/end-to-end/src/spartan/block_capacity.test.ts: modify/delete conflict
  (deleted in v4-next, modified in source)
Remove yarn-project/end-to-end/src/spartan/block_capacity.test.ts which was deleted
in v4-next but modified by the cherry-picked commit. The file does not exist on the
target branch so the modification is dropped.
…racts (#21404)

Cherry-pick of 1019f2a with conflicts preserved for review.
Adapted oracle method names to v4-next convention (utilityXxx/privateXxx
instead of aztec_utl_/aztec_prv_ used on next). Removed legacy mappings
for #21209 renames and signature changes that haven't landed on v4-next.
@AztecBot AztecBot changed the base branch from backport-to-v4-next-staging to claudebox/backport-21281-reject-evict-txs-v4-next March 13, 2026 12:00
@AztecBot AztecBot force-pushed the claudebox/backport-21404-legacy-oracle-mappings branch from 9fac715 to 913f3d0 Compare March 13, 2026 12:00
@nventuro
Copy link
Contributor

This was done in #21403.

@nventuro nventuro closed this Mar 13, 2026
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.

5 participants