Skip to content

Bug report: get_block_header_at off-by-one in archive membership proof#252

Closed
critesjosh wants to merge 2 commits intonextfrom
fix/get-block-header-at-archive-off-by-one
Closed

Bug report: get_block_header_at off-by-one in archive membership proof#252
critesjosh wants to merge 2 commits intonextfrom
fix/get-block-header-at-archive-off-by-one

Conversation

@critesjosh
Copy link
Collaborator

Summary

  • get_block_header_at() always fails in private functions on 4.0.0-devnet.2-patch.1 with "Proving membership of a block in archive failed"
  • Root cause: off-by-one in aztec-node/server.ts#getWorldState() — resolves BlockHash to getSnapshot(N) (post-block archive) instead of getSnapshot(N-1) (pre-block / last_archive)
  • Includes a self-contained reproduction script (scripts/repro_block_header.ts) and detailed report (scripts/REPORT.md)

Test plan

  • Run yarn repro:block-header against local network to reproduce
  • Run AZTEC_ENV=devnet yarn repro:block-header against devnet to reproduce
  • Verify the suggested one-line fix in aztec-packages resolves the issue

🤖 Generated with Claude Code

critesjosh and others added 2 commits March 16, 2026 17:15
… bug

Demonstrates that the Noir oracle's archive membership proof always fails
because the node's #getWorldState resolves a BlockHash to getSnapshot(N)
(post-block archive) instead of getSnapshot(N-1) (pre-block / last_archive).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant