Skip to content

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

Draft
AztecBot wants to merge 9 commits intobackport-to-v4-next-stagingfrom
claudebox/75e3470a878bbb37-2
Draft

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

Conversation

@AztecBot
Copy link
Copy Markdown
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.

Build fixes

  • yarn-project/end-to-end/src/e2e_epochs/epochs_missed_l1_slot.test.ts: Updated timestamp() -> lastBlockTimestamp() — this file exists only on v4-next and wasn't in the original PR.

Commit structure

  1. Cherry-pick with conflict markers
  2. Conflict resolution
  3. Build fix for v4-next-only file

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

Maddiaa0 and others added 9 commits March 24, 2026 16:04
Optimized verifier has a templating error - denominator inverses should not have started at the scratch space pointer used in the other bary centric values loop before, rather continued on from pointer

Co-authored-by: Alejo Amiras <alejo.amiras@gmail.com>
Co-authored-by: Alex Gherghisan <alexghr@users.noreply.github.com>
Co-authored-by: Ary Borenszweig <asterite@gmail.com>
Co-authored-by: Charlie <5764343+charlielye@users.noreply.github.com>
Co-authored-by: Charlie Lye <5764343+charlielye@users.noreply.github.com>
Co-authored-by: Ciara Nightingale <ciara.nightingale@sky.com>
Co-authored-by: DanielKotov <159419107+DanielKotov@users.noreply.github.com>
Co-authored-by: DanielKotov <katod.daniel@gmail.com>
Co-authored-by: David Banks <47112877+dbanks12@users.noreply.github.com>
Co-authored-by: Esau <esau@aztecprotocol.com>
Co-authored-by: Facundo <fcarreiro@users.noreply.github.com>
Co-authored-by: Ilyas Ridhuan <ilyas@aztecprotocol.com>
Co-authored-by: IlyasRidhuan <ilyasridhuan@gmail.com>
Co-authored-by: Innokentii Sennovskii <isennovskiy@gmail.com>
Co-authored-by: Jan Beneš <janbenes1234@gmail.com>
Co-authored-by: Jean M <132435771+jeanmon@users.noreply.github.com>
Co-authored-by: Jonathan Hao <jonathan@aztec-labs.com>
Co-authored-by: Jonathan Hao <jonathanpohsianghao@gmail.com>
Co-authored-by: Josh Crites <jc@joshcrites.com>
Co-authored-by: José Pedro Sousa <jose@aztecprotocol.com>
Co-authored-by: José Pedro Sousa <outgoing@zpedro.dev>
Co-authored-by: Khashayar Barooti <khashayar@aztecprotocol.com>
Co-authored-by: LHerskind <16536249+LHerskind@users.noreply.github.com>
Co-authored-by: Lasse Herskind <16536249+LHerskind@users.noreply.github.com>
Co-authored-by: Leila Wang <leizciw@gmail.com>
Co-authored-by: Lucas Xia <lucasxia01@gmail.com>
Co-authored-by: Miranda Wood <miranda@aztecprotocol.com>
Co-authored-by: MirandaWood <58737490+MirandaWood@users.noreply.github.com>
Co-authored-by: MirandaWood <miranda@aztecprotocol.com>
Co-authored-by: Mitch <mitchell@aztecprotocol.com>
Co-authored-by: Mitchell Tracy <mitchellftracy@gmail.com>
Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
Co-authored-by: Phil Windle <philip.windle@gmail.com>
Co-authored-by: PhilWindle <60546371+PhilWindle@users.noreply.github.com>
Co-authored-by: PhilWindle <philip.windle@gmail.com>
Co-authored-by: Ragnar <rodiondenmark@gmail.com>
Co-authored-by: Raju Krishnamoorthy <krishnamoorthy@gmail.com>
Co-authored-by: Rumata888 <isennovskiy@gmail.com>
Co-authored-by: Santiago Palladino <santiago@aztec-labs.com>
Co-authored-by: Santiago Palladino <santiago@aztecprotocol.com>
Co-authored-by: Santiago Palladino <spalladino@gmail.com>
Co-authored-by: Sarkoxed <75146596+Sarkoxed@users.noreply.github.com>
Co-authored-by: Sarkoxed <sarkoxed2013@yandex.ru>
Co-authored-by: Savio <72797635+Savio-Sou@users.noreply.github.com>
Co-authored-by: Savio-Sou <72797635+Savio-Sou@users.noreply.github.com>
Co-authored-by: StoneMac65 <StoneMac65@gmail.com>
Co-authored-by: Suyash Bagad <suyash@aztecprotocol.com>
Co-authored-by: Thunkar <5404052+Thunkar@users.noreply.github.com>
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
Co-authored-by: TomAFrench <15848336+TomAFrench@users.noreply.github.com>
Co-authored-by: alejoamiras <2982991+alejoamiras@users.noreply.github.com>
Co-authored-by: alexghr <3816165+alexghr@users.noreply.github.com>
Co-authored-by: benesjan <13470840+benesjan@users.noreply.github.com>
Co-authored-by: benesjan <janbenes1234@gmail.com>
Co-authored-by: charlielye <5764343+charlielye@users.noreply.github.com>
Co-authored-by: ciaranightingale <52419674+ciaranightingale@users.noreply.github.com>
Co-authored-by: critesjosh <18372439+critesjosh@users.noreply.github.com>
Co-authored-by: danielntmd <danielntmd@nethermind.io>
Co-authored-by: dbanks12 <david@aztec-labs.com>
Co-authored-by: defkit <84741533+defkit@users.noreply.github.com>
Co-authored-by: fcarreiro <facundo@aztecprotocol.com>
Co-authored-by: federicobarbacovi <171914500+federicobarbacovi@users.noreply.github.com>
Co-authored-by: feltroid Prime <96737978+feltroidprime@users.noreply.github.com>
Co-authored-by: guipublic <47281315+guipublic@users.noreply.github.com>
Co-authored-by: iAmMichaelConnor <42943676+iAmMichaelConnor@users.noreply.github.com>
Co-authored-by: iAmMichaelConnor <mike@aztecprotocol.com>
Co-authored-by: iakovenkos <sergey.s.yakovenko@gmail.com>
Co-authored-by: jeanmon <132435771+jeanmon@users.noreply.github.com>
Co-authored-by: jeanmon <jean@aztec-labs.com>
Co-authored-by: jewelofchaos9 <jewelofchaos9@gmail.com>
Co-authored-by: jorem321 <jorgearce321@gmail.com>
Co-authored-by: josh crites <critesjosh@gmail.com>
Co-authored-by: josh crites <jc@joshcrites.com>
Co-authored-by: just-mitch <68168980+just-mitch@users.noreply.github.com>
Co-authored-by: ledwards2225 <98505400+ledwards2225@users.noreply.github.com>
Co-authored-by: ledwards2225 <l.edwards.d@gmail.com>
Co-authored-by: lucasxia01 <lucasxia01@gmail.com>
Co-authored-by: ludamad <163993+ludamad@users.noreply.github.com>
Co-authored-by: ludamad <adam.domurad@gmail.com>
Co-authored-by: ludamad <domuradical@gmail.com>
Co-authored-by: maramihali <mara@aztec-labs.com>
Co-authored-by: mralj <11197201+mralj@users.noreply.github.com>
Co-authored-by: mralj <nikola.mratinic@gmail.com>
Co-authored-by: mverzilli <651693+mverzilli@users.noreply.github.com>
Co-authored-by: nishatkoti <nishatkoti@gmail.com>
Co-authored-by: nventuro <2530770+nventuro@users.noreply.github.com>
Co-authored-by: saleel <13466197+saleel@users.noreply.github.com>
Co-authored-by: saleel <saleel@saleel.xyz>
Co-authored-by: sarkoxed <sarkoxed2013@yandex.ru>
Co-authored-by: sergei iakovenko <105737703+iakovenkos@users.noreply.github.com>
Co-authored-by: signorecello <20129824+signorecello@users.noreply.github.com>
Co-authored-by: signorecello <github@zpedro.dev>
Co-authored-by: sirasistant <5372114+sirasistant@users.noreply.github.com>
Co-authored-by: sirasistant <sirasistant@gmail.com>
Co-authored-by: sklppy <152162806+sklppy88@users.noreply.github.com>
Co-authored-by: sklppy88 <152162806+sklppy88@users.noreply.github.com>
Co-authored-by: spalladino <429604+spalladino@users.noreply.github.com>
Co-authored-by: spypsy <6403450+spypsy@users.noreply.github.com>
Co-authored-by: spypsy <spypsy@outlook.com>
Co-authored-by: suyash67 <suyashnbagad1997@gmail.com>
Co-authored-by: thunkar <gregojquiros@gmail.com>
Co-authored-by: wildjos <13541715+wildjos@users.noreply.github.com>
Co-authored-by: Álvaro Rodríguez <sirasistant@gmail.com>
## Overview

This has been submitted for audit already, so I've attempted to make the changes / optimizations as small as possible. I came across these while reading through it again for the zk verifier.

Commits are squashed to please CI - however ive pushed them to a mirror so they still exist within the repository
- removing a scalar mul which was being multiplied by 1
    - 699c7e2
- LAGRANGE_FIRST is always (1,2), constant_term_acc is always multiplied by (1,2) so add the scalars together
    - 6f2c350
- the remaining are batching all inversions into the same modexp
    - 05217b8
    - f1a5830

This pr will be squashed - see [md/honk-golf-all-commits](https://github.com/AztecProtocol/aztec-packages/tree/md/honk-golf-all-commits) for commit by commit break down

Co-authored-by: Alejo Amiras <alejo.amiras@gmail.com>
Co-authored-by: Alex Gherghisan <alexghr@users.noreply.github.com>
Co-authored-by: Ary Borenszweig <asterite@gmail.com>
Co-authored-by: Charlie Lye <5764343+charlielye@users.noreply.github.com>
Co-authored-by: David Banks <47112877+dbanks12@users.noreply.github.com>
Co-authored-by: Esau <esau@aztecprotocol.com>
Co-authored-by: Facundo <fcarreiro@users.noreply.github.com>
Co-authored-by: IlyasRidhuan <ilyasridhuan@gmail.com>
Co-authored-by: Jean M <132435771+jeanmon@users.noreply.github.com>
Co-authored-by: Jonathan Hao <jonathan@aztec-labs.com>
Co-authored-by: Jonathan Hao <jonathanpohsianghao@gmail.com>
Co-authored-by: Josh Crites <jc@joshcrites.com>
Co-authored-by: José Pedro Sousa <jose@aztecprotocol.com>
Co-authored-by: José Pedro Sousa <outgoing@zpedro.dev>
Co-authored-by: Khashayar Barooti <khashayar@aztecprotocol.com>
Co-authored-by: LHerskind <16536249+LHerskind@users.noreply.github.com>
Co-authored-by: Lasse Herskind <16536249+LHerskind@users.noreply.github.com>
Co-authored-by: Lucas Xia <lucasxia01@gmail.com>
Co-authored-by: MirandaWood <miranda@aztecprotocol.com>
Co-authored-by: Mitch <mitchell@aztecprotocol.com>
Co-authored-by: Mitchell Tracy <mitchellftracy@gmail.com>
Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
Co-authored-by: PhilWindle <60546371+PhilWindle@users.noreply.github.com>
Co-authored-by: PhilWindle <philip.windle@gmail.com>
Co-authored-by: Raju Krishnamoorthy <krishnamoorthy@gmail.com>
Co-authored-by: Rumata888 <isennovskiy@gmail.com>
Co-authored-by: Santiago Palladino <santiago@aztec-labs.com>
Co-authored-by: Sarkoxed <sarkoxed2013@yandex.ru>
Co-authored-by: Savio <72797635+Savio-Sou@users.noreply.github.com>
Co-authored-by: StoneMac65 <StoneMac65@gmail.com>
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
Co-authored-by: benesjan <13470840+benesjan@users.noreply.github.com>
Co-authored-by: benesjan <janbenes1234@gmail.com>
Co-authored-by: critesjosh <18372439+critesjosh@users.noreply.github.com>
Co-authored-by: danielntmd <danielntmd@nethermind.io>
Co-authored-by: dbanks12 <david@aztec-labs.com>
Co-authored-by: fcarreiro <facundo@aztecprotocol.com>
Co-authored-by: federicobarbacovi <171914500+federicobarbacovi@users.noreply.github.com>
Co-authored-by: guipublic <47281315+guipublic@users.noreply.github.com>
Co-authored-by: iAmMichaelConnor <mike@aztecprotocol.com>
Co-authored-by: jeanmon <jean@aztec-labs.com>
Co-authored-by: jewelofchaos9 <jewelofchaos9@gmail.com>
Co-authored-by: josh crites <jc@joshcrites.com>
Co-authored-by: ledwards2225 <98505400+ledwards2225@users.noreply.github.com>
Co-authored-by: ledwards2225 <l.edwards.d@gmail.com>
Co-authored-by: lucasxia01 <lucasxia01@gmail.com>
Co-authored-by: ludamad <163993+ludamad@users.noreply.github.com>
Co-authored-by: ludamad <adam.domurad@gmail.com>
Co-authored-by: ludamad <domuradical@gmail.com>
Co-authored-by: mralj <nikola.mratinic@gmail.com>
Co-authored-by: nventuro <2530770+nventuro@users.noreply.github.com>
Co-authored-by: sergei iakovenko <105737703+iakovenkos@users.noreply.github.com>
Co-authored-by: sirasistant <sirasistant@gmail.com>
Co-authored-by: thunkar <gregojquiros@gmail.com>
BEGIN_COMMIT_OVERRIDE
fix(aztec-up): narrow PATH cleanup regex to avoid removing user PATH
entries (#21828)
fix: consolidate blob source test into single summary log with supernode
detection (#21719)
fix: use anchor block on getL1ToL2MsgWitness (#21872)
fix: make sure queries are not made ahead of the anchor block (#21874)
chore(docs): backport docs infrastructure changes to v4 (#21437)
chore: backport PR #21836 (fix: explicitly handle initial block case for
getBlockHashMembershipWitness) to v4-next (#21891)
chore: backport PR #21813 (fix(aztec-up): strip leading v prefix from
version strings) to v4-next (#21912)
docs: document defi-wonderland immutable macro (#21764)
fix: pin typescript and harden lockfile check in docs examples CI (v4
backport) (#21914)
docs: expand circuit profiling guide and document kernel gate cost
overhead (#21770)
feat: cli-wallet (#21757)
chore: sync backport staging with v4-next HEAD (#21931)
fix: bot gas estimations (backport #21945) (#21947)
refactor(aztec-nr): use logging wrappers in
compute_note_hash_and_nullifier (#21897)
fix: backport v4 next staging (#21934)
fix: make PXE#getSyncedBlockHeader a concurrency=1 job to prevent IDB tx
liveness issues (#21944)
feat: add error page mapping for incompatible oracles (#21943)
fix(aztec-up): validate semver in uninstall to prevent path traversal
(#21892)
chore: merge v4-next into backport staging (fix ancestry) (#21954)
fix(aztec-up): add truncation protection to install scripts (#21896)
fix: noir format in compute_note_hash_and_nullifier.nr (#21956)
fix(stdlib): decode `EthAddress`, `FunctionSelector` and wrapped field
structs in `AbiDecoder` (#21926)
chore: update noir to nightly-2026-02-12-patch.1 (#21960)
fix: ensure empty docs examples does not populate yarn lock backport
(#21963)
fix: docs examples does not build on simple bootstrap backport (#21964)
fix: add rc/testnet version detection to API reference pages (#21966)
docs: document EmbeddedWallet automatic gas estimation and private
authwits (#21790)
fix(pxe): robust error handling in message processing (backport #21093)
(#21981)
chore: manually recreate backport (#21969)
chore: (A-779) load all accounts before calling
LogService.#getSecretsForSenders (#21923)
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 25, 2026
@AztecBot
Copy link
Copy Markdown
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/40702364f54dc443�40702364f54dc4438;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_epochs/epochs_l1_reorgs.parallel.test.ts "updates L1 to L2 messages changed due to an L1 reorg" (66s) (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