refactor(test-support): unify StateTest/BlockchainTest tx execution (#127)#133
Merged
Conversation
…kchainTest runners Closes #127. Both runners had a near-identical validate → bump-nonce → execute → settle-fees pipeline. This commit extracts that pipeline into EEVM.TestSupport.TxExecutor and rewrites both runners on top of it. Net effect: - test/support/state_test_runner.ex: 181 → 80 lines - test/support/blockchain_test_runner.ex: 362 → 295 lines - test/support/tx_executor.ex: new, 105 lines One source of truth means CREATE support, blob-base-fee handling, and fee settlement edge cases can no longer drift between the two runners. StateTestRunner now goes through EEVM.Handler.Execution.run_top_level instead of EEVM.execute, picking up CREATE support that the BlockchainTest path already had. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #127.
Both
StateTestRunnerandBlockchainTestRunnercarried a near-identical validate → bump-nonce → execute → settle-fees pipeline. Drift between them was a bug factory (CREATE support, blob-base-fee handling, fee-settlement edge cases). Extracts the shared pipeline intoEEVM.TestSupport.TxExecutor; both runners now sit on top of it.Net effect:
state_test_runner.exblockchain_test_runner.extx_executor.ex(new)The
StateTestRunnernow goes throughEEVM.Handler.Execution.run_top_levelinstead ofEEVM.execute, picking up CREATE support that the BlockchainTest path already had — its previous:unsupported_creationearly-return is gone.Test plan
mix compile— cleanmix credo --strict— no issuesmix test— 4 doctests + 613 tests, 0 failures🤖 Generated with Claude Code