Skip to content

feat(tests): sign state test transactions with their secret key to prevent bogus sender recovery - #2983

Merged
spencer-tb merged 4 commits into
ethereum:forks/amsterdamfrom
felix314159:nethtest-crash-repro-test
Jun 15, 2026
Merged

feat(tests): sign state test transactions with their secret key to prevent bogus sender recovery#2983
spencer-tb merged 4 commits into
ethereum:forks/amsterdamfrom
felix314159:nethtest-crash-repro-test

Conversation

@felix314159

@felix314159 felix314159 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

🗒️ Description

this test is useful for reproduction of a nethtest issue (not relevant for mainnet): currently their state-test runner identifies the sender via secretKey but attaches a placeholder signature, so when the sender account is absent from the pre-state RecoverSenderIfNeeded re-recovers a bogus sender from that placeholder and a zero-gas-price transaction then crashes with Account … is null when incrementing nonce. This signs the transaction with its secretKey so recovery yields the correct sender

fill 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

  • All: Ran fast static checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    just static
  • All: PR title adheres to the repo standard - it will be used as the squash commit message and should start type(scope):.
  • All: Considered updating the online docs in the ./docs/ directory.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.
  • Tests: For PRs implementing a missed test case, update the post-mortem document to add an entry the list.
  • Ported Tests: All converted JSON/YML tests from ethereum/tests or tests/static have been assigned @ported_from marker.

Cute Animal Picture

Cute Animal Picture

@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.52%. Comparing base (49f4697) to head (880fb54).
⚠️ Report is 3 commits behind head on forks/amsterdam.

Additional details and impacted files
@@                 Coverage Diff                 @@
##           forks/amsterdam    #2983      +/-   ##
===================================================
- Coverage            90.53%   90.52%   -0.02%     
===================================================
  Files                  535      535              
  Lines                32895    32895              
  Branches              3022     3022              
===================================================
- Hits                 29782    29778       -4     
  Misses                2595     2595              
- Partials               518      522       +4     
Flag Coverage Δ
unittests 90.52% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@spencer-tb spencer-tb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM. I think we should wait for #2969 to be merged first, make the changes then merge :)

Comment thread tests/frontier/touch/test_touch.py Outdated
Comment thread tests/frontier/touch/test_touch.py Outdated
Comment thread tests/frontier/touch/test_touch.py Outdated
felix314159 and others added 2 commits June 12, 2026 16:03
Co-authored-by: spencer <spencer.tb@ethereum.org>
Co-authored-by: spencer <spencer.tb@ethereum.org>
@felix314159

Copy link
Copy Markdown
Contributor Author

I will wait until 2969 is merged

@spencer-tb

Copy link
Copy Markdown
Contributor

Thx Felix! Merged :)

@spencer-tb
spencer-tb merged commit b1a898f into ethereum:forks/amsterdam Jun 15, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-test Category: test P-low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants