feat: assert non revertible phase when setting fee payer - #24479
Merged
nventuro merged 4 commits intoJul 10, 2026
Merged
Conversation
nchamo
approved these changes
Jul 3, 2026
nventuro
enabled auto-merge (squash)
July 10, 2026 18:01
PhilWindle
pushed a commit
that referenced
this pull request
Jul 21, 2026
This was referenced Jul 21, 2026
spalladino
added a commit
that referenced
this pull request
Jul 23, 2026
(cherry picked from commit da9ac1c) CONFLICTS LEFT INTENTIONALLY for follow-up resolution.
rangozd
pushed a commit
to rangozd/aztec-packages
that referenced
this pull request
Aug 5, 2026
…rotocol#24930) Forward-ports the **end-to-end / testing** slice of the v5-next → next backlog (work merged to `v5-next` after the ~2026-07-08 cut that reshaped `next`). ## Applied (clean cherry-picks, chronological) - AztecProtocol#24518 docs(e2e): update READMEs for the consolidated suite layout - AztecProtocol#24534 test(e2e): instrument and diagnose bot suite setup cost - AztecProtocol#24566 perf(e2e): warp dead waits in multi-node recovery and proving tests - AztecProtocol#24570 perf(e2e): shrink e2e slot times - AztecProtocol#24564 perf(e2e): seed BananaFPC fee juice at genesis instead of bridging - AztecProtocol#24568 perf(e2e): seed standard contracts at genesis - AztecProtocol#24597 chore: add writing-e2e-tests skill - AztecProtocol#24590 feat(e2e): interactive handshake e2e - AztecProtocol#24671 test: fix proof_boundary startup race ##⚠️ Needs owner conflict-resolution (conflict against reshaped `next`; not included here) Cherry-pick onto this branch and resolve: - [ ] AztecProtocol#24569 `git cherry-pick -x 1d280af` — perf(e2e): overlap and batch setup txs in e2e harnesses - [ ] AztecProtocol#24479 `git cherry-pick -x da9ac1c` — feat: assert non revertible phase when setting fee payer Part of the manual v5-next backlog sweep. Draft until owners resolve the conflicts above and CI is green.
nventuro
pushed a commit
that referenced
this pull request
Aug 27, 2026
## Summary `BatchCall.simulate()` silently discarded `options.fee.paymentMethod` and dropped the merged payload's `feePayer`, so batches simulated with a sponsored/deferred fee method ran with the wallet's fallback handling (`PREEXISTING_FEE_JUICE`) instead of the caller's method. The wallet's account entrypoint then self-elected as fee payer and ended setup up front — a different phase structure than the caller asked for. Resolves F-785. Surfaced while landing #24479. ## Changes - `batch_call.ts`: fetch `options.fee.paymentMethod.getExecutionPayload()`, merge it ahead of the batch (mirroring `request()`), and preserve `combinedPayload.feePayer` when rebuilding the `ExecutionPayload`. - The wallet-side app-call offset only counts the wallet's own fee payment method, not one supplied via `options.fee`. So each batched call's private/public return-value index is offset by the fee payload's own call counts of each type; otherwise a call-contributing method (e.g. `SponsoredFeePaymentMethod`) shifts the indices and the fee call's return values decode as the first app call's. - `contract_function_interaction.ts`: fixed the same latent off-by-one under a call-contributing fee method. The single app call is the last of its type in the payload, so its index is derived from the merged payload (avoiding a second `getExecutionPayload()` call). - `phase_check.parallel.test.ts`: reverted the #24479 workaround back to the plain `batch.simulate({ from, fee })` form now that the option is honored. ## Testing - Added 3 `batch_call` unit tests: return-value index offset (asserting on actual decoded values, not just absence of errors), `feePayer` from the payment method, and `feePayer` carried by a batched payload. Verified red/green — the offset test fails without the fix. - All 3 `phase_check` e2e tests pass, including the reverted late-election test. - No behavior change for batches simulated without `fee.paymentMethod` (offsets are 0).
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.
The fee payer should only be set in the non-revertible phase, but we were not asserting this.