Skip to content

fix(e2e): wait for first checkpoint in fee_asset_price_oracle_gossip test#22719

Merged
alexghr merged 1 commit intomerge-train/spartanfrom
mt_spartan_fix
Apr 22, 2026
Merged

fix(e2e): wait for first checkpoint in fee_asset_price_oracle_gossip test#22719
alexghr merged 1 commit intomerge-train/spartanfrom
mt_spartan_fix

Conversation

@alexghr
Copy link
Copy Markdown
Contributor

@alexghr alexghr commented Apr 22, 2026

Summary

  • e2e_p2p/fee_asset_price_oracle_gossip.test.ts was failing with TypeError: Cannot read properties of undefined (reading 'checkpoint').
  • Root cause: setupAccount() no longer sends an L2 tx (it just registers a hardcoded account in PXE), so targetBlock = aztecNode.getBlockNumber() is 0 and the existing retryUntil is trivially satisfied. The test then queries dataStore.getCheckpoints(...) before any checkpoint has been published/indexed, gets [] back, and crashes on destructure.
  • Fix: wrap the getCheckpoints call in a retryUntil (120s timeout, ample for a ~48s checkpoint cadence at slotDuration=24 × 2 blocks) that waits until the archiver has indexed the first published checkpoint. Query CheckpointNumber(0) directly — fromBlockNumber is deprecated and any published checkpoint is sufficient to validate the attestation signers.

Failure: https://ci.aztec-labs.com/logs/acab993c3a6c25c5

Test plan

  • CI run of e2e_p2p/fee_asset_price_oracle_gossip.test.ts passes

🤖 Generated with Claude Code

@alexghr alexghr enabled auto-merge (squash) April 22, 2026 10:10
…test

setupAccount() no longer sends a tx, so targetBlock was 0 and the existing
retryUntil was trivially satisfied before any checkpoint had been published.
The test then queried the archiver for checkpoints, got an empty array, and
crashed dereferencing publishedCheckpoint.checkpoint. Wait for the archiver
to index the first published checkpoint before reading attestations.
@alexghr alexghr merged commit 8e1a96e into merge-train/spartan Apr 22, 2026
12 checks passed
@alexghr alexghr deleted the mt_spartan_fix branch April 22, 2026 11:15
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.

2 participants