chore: Accumulated backports to v4-next#22158
Merged
Conversation
Remove 3 legacy oracle mappings that are not called by any pinned v4 protocol contract: privateIsSideEffectCounterRevertible, privateNotifySetPublicTeardownFunctionCall, and utilityEmitOffchainEffect. Verified by decoding the Brillig bytecode from the pinned protocol contract artifacts on v4-next. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ery mined block (with conflicts)
…k (with conflicts)
…tests (with conflicts)
… eth_simulateV1 timestamp (with conflicts)
Resolves conflicts from cherry-picking PRs #21829, #21853, #21869, #22023. Key resolutions: - start_anvil.ts: take full rewrite from PR #21829 (spawn-based instead of @viem/anvil) - sequencer-publisher.ts: use getNextL1SlotTimestamp with pipelining (PR #21853), getSimulationTimestamp for simulation timestamps (PR #22023), add aztecSlotDuration property - setup.ts: add slotsInAnEpoch and dateProvider options - slasher_config.test.ts: add anvilSlotsInAnEpoch option - checkpoint_voter test: add epochCache mock methods - Drop backupFailedTx calls (infrastructure not on this branch)
All conflicts were about dateProvider support from PR #21829 - take our version.
- Add aztecSlotDuration to SequencerPublisher constructor call sites - Replace isProposerPipeliningEnabled (not on this branch) with false default - Remove getSlotNow mock (not on this branch's EpochCache) - Fix eth.timestamp() -> eth.lastBlockTimestamp() in e2e test - Revert update to noir-repo submodule - Delete claude settings.local.json
Tests were failing with 'Cannot convert undefined to a BigInt' because mock configs didn't include aztecSlotDuration.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Backport deflaking fixes from next: send deploy tx before call tx with a 1s propagation delay instead of sending both simultaneously, and add retryUntil poll in assertMultipleBlocksPerSlot to handle archiver sync race. Originally fixed in #21003 and #21026. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
## Backport PRs to `backport-to-v4-next-staging` Cherry-picked the following PRs (in order) on top of the branch, committing each with conflicts unresolved: 1. **#21829** - `fix: sync dateProvider from anvil stdout on every mined block` 2. **#21853** - `fix(sequencer): remove l1 block timestamp check` 3. **#21869** - `fix(e2e): set anvilSlotsInAnEpoch in slashing tests` 4. **#22023** - `fix(sequencer): use last L1 slot of L2 slot as eth_simulateV1 timestamp` ### Conflict resolution Added a single commit resolving all cherry-pick conflicts: - **`yarn-project/ethereum/src/test/start_anvil.ts`**: Took the full rewrite from PR #21829, replacing the `@viem/anvil`-based implementation with a direct `child_process.spawn` approach. Updated `start_anvil.test.ts` to import the new local `Anvil` type instead of `@viem/anvil`. - **`yarn-project/end-to-end/src/fixtures/setup.ts`**: Added `slotsInAnEpoch` and `dateProvider` options to the `startAnvil` call. - **`yarn-project/end-to-end/src/e2e_sequencer/slasher_config.test.ts`**: Added `anvilSlotsInAnEpoch: 4` option to the `setup` call. - **`yarn-project/sequencer-client/src/sequencer/checkpoint_voter.ha.integration.test.ts`**: Added `epochCache.getSlotNow` and `epochCache.getL1Constants` mock return values. - **`yarn-project/sequencer-client/src/publisher/sequencer-publisher.ts`**: - `canProposeAt`: Replaced `getNextL1SlotTimestampWithL1Floor()` with `getNextL1SlotTimestamp()` plus pipelining offset (PR #21853). Added `pipelined?: boolean` to the opts type. - `validateCheckpointForSubmission`: Changed return type to `Promise<void>`, removed manual timestamp computation (PR #22023). - `enqueueCastSignalHelper` / `simulateProposeTx`: Use `getSimulationTimestamp()` for simulation timestamps, improved error logging with `formatViemError` (PR #22023). - Added `aztecSlotDuration` class property and wired it through the config. - Dropped `backupFailedTx` calls since the underlying `FailedL1Tx` / `createL1TxFailedStore` infrastructure does not exist on this branch.
…n L1 (#22156) ## Motivation Right after deployment, the archiver's L1 sync queries `getProvenCheckpointNumber` at the finalized L1 block tag. But if the rollup contract didn't exist yet at that L1 block, the call returns no data and logs a noisy warning on every sync iteration. ## Approach Swallow the "returned no data" error in `updateFinalizedCheckpoint` since it's an expected transient condition. Other errors still log a warning. ## Changes - **archiver**: Silence the `ContractFunctionExecutionError` with "returned no data" in `updateFinalizedCheckpoint`, which occurs when the rollup contract is too new to exist at the finalized L1 block Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This is a breaking change in the interface between PXE and wallets. ALL_SCOPES allowed wallets to request PXE to run operations "for all its known accounts". This PR removes that option and forces all layers of the system to explicitly state which addresses to use as scope by providing an array of addresses. An empty array now means "no account in scope" (it used to default to "ALL_SCOPES" particularly when executing utilities).
## Summary Backport of #22113 to v4-next. Introduces a `CapsuleService` wrapper that enforces scope-based access control on capsule operations invoked through oracles, ensuring they are within the scopes authorized for the current execution context. ## Cherry-pick conflicts Conflicts were in docs files only: - `docs/docs-developers/docs/resources/migration_notes.md` — positional conflict in TBD section (incoming content for capsule scope enforcement note + `## 4.2.0-aztecnr-rc.2` header) - `docs/netlify.toml` — missing `/errors/9` and `/errors/10` redirect entries Both resolved by accepting the incoming content. All TypeScript changes applied cleanly. ## Test plan - [ ] CI passes on backport branch - [ ] Capsule scope enforcement works as described in migration notes
## Summary Backport of #22136 to v4-next, stacked on #22157 (backport of #22113 scoped capsules). Removes the `ALL_SCOPES` option and `AccessScopes` type, forcing all callers to explicitly specify which addresses are in scope via `AztecAddress[]`. This is a breaking change in the PXE/wallet interface. ## Stacking This PR is stacked on `claudebox/backport-22113-scoped-capsules` (#22157) which introduces CapsuleService. With that base in place, the cherry-pick applies cleanly with no conflicts.
…tutorial fixes (with conflicts)
Deleted files (version-v4.2.0-aztecnr-rc.2 versioned docs and example_swap) don't exist on v4-next branch — accept deletion. Resolved content conflict in counter_contract.md by taking the incoming (PR) version which better describes the current aztec new behavior.
…orial fixes (#22165) ## Summary Backport of #22160 to v4-next. Cherry-pick had conflicts because the `version-v4.2.0-aztecnr-rc.2` versioned docs and `example_swap` don't exist on v4-next (deleted). Those changes were dropped. A content conflict in `counter_contract.md` was resolved by taking the incoming (PR) version. ### Changes applied: - Update `aztec new` CLI description in counter contract tutorial - Remove unused `@aztec/test-wallet` from token contract tutorial - Fix `#include_code` macro and import path in recursive verification tutorial - Update proof size comments from hardcoded `508` to `~500` - Rename `l2BlockNumber` → `checkpointNumber` in token_bridge ABI ClaudeBox log: https://claudebox.work/s/99e763f53ec8891b?run=1
Collaborator
Author
|
🤖 Auto-merge enabled after 8 hours of inactivity. This PR will be merged automatically once all checks pass. |
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.
BEGIN_COMMIT_OVERRIDE
chore: backport - drop dead legacy oracle mappings (#22035)
fix: backport timestamp and anvil fixes (#22110)
fix(archiver): swallow error when rollup contract not yet finalized on L1 (#22156)
END_COMMIT_OVERRIDE