Skip to content

fix(txe): await using for world state fork#21555

Open
Maddiaa0 wants to merge 1 commit intomerge-train/spartanfrom
fix/141-txe-advance-block-state-root
Open

fix(txe): await using for world state fork#21555
Maddiaa0 wants to merge 1 commit intomerge-train/spartanfrom
fix/141-txe-advance-block-state-root

Conversation

@Maddiaa0
Copy link
Member

@Maddiaa0 Maddiaa0 commented Mar 13, 2026

part of: #21514

Summary

  • mineBlock in the TXE oracle was closing forked world trees before calling handleL2Block, which is inconsistent with every other block-building flow in the codebase
  • Uses await using for the forked trees, ensuring automatic cleanup and guaranteeing handleL2Block completes before dispose

Test plan

  • Unit test verifies handleL2Block is called before the fork is closed
  • Test confirms world state is properly updated after mining a block

🤖 Generated with Claude Code

…ed world trees

The mineBlock method was closing the forked world trees before calling
handleL2Block. Reorder so handleL2Block runs while the fork is still open,
and use `await using` for automatic cleanup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Maddiaa0 Maddiaa0 changed the title fix(txe): reorder mineBlock to call handleL2Block before closing forked world trees fix(txe): await using for world state fork Mar 13, 2026
@Maddiaa0 Maddiaa0 requested a review from nventuro March 13, 2026 19:05
@Maddiaa0
Copy link
Member Author

@AztecBot run prettier in yarn project on this then squash

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