Skip to content

fix: sync dateProvider from anvil stdout on every mined block (backport #21829)#21843

Draft
AztecBot wants to merge 7 commits intobackport-to-v4-next-stagingfrom
claudebox/backport-21829-v4-next
Draft

fix: sync dateProvider from anvil stdout on every mined block (backport #21829)#21843
AztecBot wants to merge 7 commits intobackport-to-v4-next-stagingfrom
claudebox/backport-21829-v4-next

Conversation

@AztecBot
Copy link
Collaborator

Summary

Backport of #21829 to v4-next.

Anvil logs block timestamps to stdout on each mined block. Parse these and update the TestDateProvider so it stays in lockstep with the L1 chain, eliminating drift between wall clock and anvil chain time. Also renames cheatCodes.timestamp() to lastBlockTimestamp() to clarify it returns the latest block's discrete timestamp.

Conflicts resolved

  • yarn-project/ethereum/src/test/start_anvil.ts: v4-next uses @viem/anvil's createAnvil with on('message') handler while next uses raw child_process with child.stdout. Adapted the dateProvider sync to work with the on('message') API. Dropped slotsInAnEpoch option and killChild helper (not present in v4-next). Kept the removeHandler guard to also check for dateProvider.
  • yarn-project/end-to-end/src/fixtures/setup.ts: v4-next doesn't have slotsInAnEpoch option. Added only dateProvider to startAnvil call.

Commit structure

  1. Cherry-pick with conflict markers
  2. Conflict resolution

ClaudeBox log: https://claudebox.work/s/75e3470a878bbb37?run=1

benesjan and others added 7 commits March 17, 2026 12:26
## Summary

Merges v4 into v4-next, resolving the conflict in
`getBlockHashMembershipWitness` in `server.ts`.

The conflict was between v4-next's simple passthrough to
`getWorldState(referenceBlock)` and v4's off-by-one bugfix that uses
`getWorldState(BlockNumber(referenceBlockNumber - 1))`. The v4 fix is
correct: the Noir circuit checks the archive membership proof against
`anchor_block_header.last_archive.root`, which is the archive tree root
BEFORE the anchor block was added, so we need the world state at block
N-1.

Resolution: took the v4 bugfix, adapted to use v4-next's `getWorldState`
(protected) instead of v4's `#getWorldState` (private).

Replaces #21493
which had stale conflict markers.

ClaudeBox log: https://claudebox.work/s/d4b96d5b355d7fba?run=1

Co-authored-by: Jan Beneš <janbenes1234@gmail.com>
Co-authored-by: PhilWindle <60546371+PhilWindle@users.noreply.github.com>
Co-authored-by: Phil Windle <philip.windle@gmail.com>
Co-authored-by: Santiago Palladino <santiago@aztecprotocol.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: ludamad <adam.domurad@gmail.com>
Co-authored-by: Alex Gherghisan <alexghr@users.noreply.github.com>
## Summary

Merges latest `v4` (`bb3ea6f1`) into `v4-next` with a proper **merge
commit** to preserve the merge topology. This fixes the issue where PR
#21702 was squash-merged, causing git to lose track of which v4 commits
were already in v4-next.

## Commits

1. **Merge commit with conflict markers** — raw `git merge origin/v4`
showing the conflicts
2. **Fix server.ts** — resolve `getWorldState` vs `#getWorldState`
conflict (use protected version), remove duplicate `resolveBlockNumber`
method
3. **Fix deploy_network.sh** — resolve pre-existing conflict from old
merge (keep default multiplier of 2)

## Important

**This PR must be merged with a merge commit (not squashed)** to
preserve the v4→v4-next merge topology. Add the `ci-no-squash` label.
Without the merge commit, future auto-merges will re-encounter the same
conflicts.

ClaudeBox log: https://claudebox.work/s/3402fef75fe1ebde?run=4

---------

Co-authored-by: Jan Beneš <janbenes1234@gmail.com>
Co-authored-by: PhilWindle <60546371+PhilWindle@users.noreply.github.com>
Co-authored-by: Phil Windle <philip.windle@gmail.com>
Co-authored-by: Santiago Palladino <santiago@aztecprotocol.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: ludamad <adam.domurad@gmail.com>
Co-authored-by: Alex Gherghisan <alexghr@users.noreply.github.com>
Co-authored-by: spypsy <spypsy@users.noreply.github.com>
## Summary
- Bump `.release-please-manifest.json` from `4.1.0` to `4.2.0` in
preparation for the next release cycle.
BEGIN_COMMIT_OVERRIDE
feat: entrypoint replay protection (#21649)
feat: guard BoundedVec oracle returns against dirty trailing storage
(#21589)
fix: add bounds when allocating arrays in deserialization (#21622)
feat: implement manual Packable for structs with sub-Field members
(#21576)
fix(aztec-node): throw on existing nullifier in
getLowNullifierMembershipWitness (#21472)
fix: use trait dispatch for array Packable::unpack in card_game_contract
(#21683)
fix(p2p): penalize peers for errors during response reading (#21680)
fix: update nullifier non-inclusion test expectations after early oracle
throw (backport #21600) (#21615)
fix(aztec-nr): fix OOB index with nonzero offset (#21613)
fix(builder): persist contractsDB across blocks within a checkpoint
(#21520)
fix(stdlib): accept null return_type for void Noir functions (#21647)
feat: gas estimations on send (#21646)
fix(validator): process block proposals from own validator keys in HA
setups (backport #21603) (#21659)
fix(p2p): penalize peer on tx rejected by pool (#21677)
fix(sequencer): fix checkpoint budget redistribution for multi-block
slots (#21692)
feat: sync cache invalidation oracle (backport #21459) (#21730)
feat!: make AES128 decrypt oracle return Option (backport #21696)
(#21735)
feat!: include init_hash in private initialization nullifier (backport
#21427) (#21736)
fix(sequencer): extract gas and blob configs from valid requests only
(A-677) (#21747)
chore: backport #21744 — replace dead BOOTSTRAP_TO env var with
bootstrap.sh build arg (#21748)
refactor: revert remove assert_bounded_vec_trimmed (#21758)
END_COMMIT_OVERRIDE
@AztecBot AztecBot added ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR. labels Mar 20, 2026
@AztecBot
Copy link
Collaborator Author

Flakey Tests

🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry.

\033FLAKED\033 (8;;http://ci.aztec-labs.com/f23bc42447bab5c2�f23bc42447bab5c28;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_p2p/duplicate_attestation_slash.test.ts (176s) (code: 0) group:e2e-p2p-epoch-flakes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants