Skip to content

chore: Accumulated backports to v4-next#22158

Merged
AztecBot merged 25 commits intov4-nextfrom
backport-to-v4-next-staging
Mar 31, 2026
Merged

chore: Accumulated backports to v4-next#22158
AztecBot merged 25 commits intov4-nextfrom
backport-to-v4-next-staging

Conversation

@AztecBot
Copy link
Copy Markdown
Collaborator

@AztecBot AztecBot commented Mar 30, 2026

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

benesjan and others added 16 commits March 26, 2026 03:04
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>
… 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>
sklppy88 and others added 9 commits March 31, 2026 01:23
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.
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
@critesjosh critesjosh requested a review from a team as a code owner March 31, 2026 00:42
Copy link
Copy Markdown
Collaborator

@ludamad ludamad left a comment

Choose a reason for hiding this comment

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

🤖 Auto-approved

@AztecBot AztecBot merged commit 4ffd56d into v4-next Mar 31, 2026
9 checks passed
@AztecBot
Copy link
Copy Markdown
Collaborator Author

🤖 Auto-merge enabled after 8 hours of inactivity. This PR will be merged automatically once all checks pass.

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.

8 participants