fix(test-client-clis): write empty trace placeholder for rejected txs#2772
Open
leolara wants to merge 1 commit intoethereum:forks/amsterdamfrom
Open
fix(test-client-clis): write empty trace placeholder for rejected txs#2772leolara wants to merge 1 commit intoethereum:forks/amsterdamfrom
leolara wants to merge 1 commit intoethereum:forks/amsterdamfrom
Conversation
…d txs Extends ethereum#2709. When a tx produces a receipt but no TransactionEnd tracer event fires (e.g. EIP-3607 collisions), the in-memory collect_traces appends an empty TransactionTraces, but no matching file was written to --evm-dump-dir. A later --verify-traces run loaded a different shape from disk and reported spurious transaction-count mismatches for the entire class of failed-during- execution tests. Write a zero-byte placeholder when debug_output_path is set, and make TransactionTraces.from_file tolerant of empty files so the loader produces a matching empty TransactionTraces. Fixes ethereum#2758.
7 tasks
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.
🗒️ Description
Extends #2709 to fix a disk/in-memory asymmetry that caused
--verify-tracesto report spurious divergences for transactions that produce a receipt but noTransactionEndtracer event (e.g. EIP-3607 collisions, CREATE-into-non-empty failures duringprocess_transaction).#2709 made the in-memory
collect_tracestolerant of a missingtrace-N-<hash>.jsonlby appending an emptyTransactionTraces. The same placeholder was not written to--evm-dump-dir, so a later--verify-tracesrun loaded a different shape from disk and the comparator's outer length check fired aTransactionCountMismatchfor every affected test.This PR makes the on-disk representation symmetric with the in-memory one (Option A from the issue):
TransitionTool.collect_traces: when the missing-file branch runs anddebug_output_pathis set, write a zero-bytetrace-{i}-{hash}.jsonlplaceholder.TransactionTraces.from_file: return an emptyTransactionTracesfor empty files (the loader path used by_load_traces_from_dump_dir).Verification
The issue's reproducer (the three EIP-3607 / CREATE-collision tests) now compares clean:
Unit coverage added:
test_transition_tool.py: placeholder is written whendebug_output_pathis set; not written when it isNone(in-memory padding still happens).test_verify_traces.py: loader reads an empty placeholder file as an emptyTransactionTracesslot.🔗 Related Issues or PRs
Fixes #2758. Extends #2709.
✅ Checklist
just statictype(scope):.mkdocs servelocally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.@ported_frommarker.Cute Animal Picture
Quokka at Rottnest (cropped) — Pikuan, CC BY-SA 3.0, via Wikimedia Commons