feat(tests): sign state test transactions with their secret key to prevent bogus sender recovery#2983
Open
felix314159 wants to merge 3 commits into
Open
Conversation
5 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #2983 +/- ##
================================================
Coverage 90.53% 90.53%
================================================
Files 535 535
Lines 32895 32895
Branches 3022 3022
================================================
Hits 29782 29782
Misses 2595 2595
Partials 518 518
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
spencer-tb
approved these changes
Jun 12, 2026
spencer-tb
left a comment
Contributor
There was a problem hiding this comment.
Thanks! LGTM. I think we should wait for #2969 to be merged first, make the changes then merge :)
| ) | ||
|
|
||
| tx = Transaction( | ||
| gas_limit=500_000, |
Contributor
There was a problem hiding this comment.
Suggested change
| gas_limit=500_000, |
Can we remove this? After #2969 is merged?
Co-authored-by: spencer <spencer.tb@ethereum.org>
Co-authored-by: spencer <spencer.tb@ethereum.org>
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
this test is useful for reproduction of a nethtest issue (not relevant for mainnet): currently their state-test runner identifies the sender via
secretKeybut attaches a placeholder signature, so when the sender account is absent from the pre-stateRecoverSenderIfNeededre-recovers a bogus sender from that placeholder and a zero-gas-price transaction then crashes withAccount … is nullwhen incrementing nonce. This signs the transaction with itssecretKeyso recovery yields the correct senderfill with
uv run fill tests/frontier/touch/test_touch.py::test_zero_gas_price_nonexistent_sender --fork=berlin -v -s --clean🔗 Related Issues or PRs
N/A.
✅ 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