Skip to content

state: Charge the recipient creation before resolving the delegation - #1740

Merged
chfast merged 1 commit into
masterfrom
state/recipient-charge-first
Sep 28, 2026
Merged

chfast merged 1 commit into
masterfrom
state/recipient-charge-first

Conversation

@chfast

@chfast chfast commented Sep 27, 2026

Copy link
Copy Markdown
Member

Follow the execution-specs order, where the recipient's NEW_ACCOUNT state-gas is charged before the delegation target of tx.to is resolved. The order is not observable: only a nonexistent recipient is charged and a delegated recipient has code, so it exists. The new assert pins the latter.

Peeled from #1733.

🤖 Generated with Claude Code

Follow the execution-specs order, where the recipient's NEW_ACCOUNT
state-gas is charged before the delegation target of tx.to is resolved.
The order is not observable: only a nonexistent recipient is charged and
a delegated recipient has code, so it exists. Assert the latter.
@codecov

codecov Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.98%. Comparing base (d9e925a) to head (5029db7).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1740   +/-   ##
=======================================
  Coverage   97.98%   97.98%           
=======================================
  Files         183      183           
  Lines       16856    16857    +1     
  Branches     3856     3856           
=======================================
+ Hits        16516    16517    +1     
  Misses        250      250           
  Partials       90       90           
Flag Coverage Δ
eest-develop 81.77% <50.00%> (+<0.01%) ⬆️
eest-develop-gmp 25.88% <50.00%> (+<0.01%) ⬆️
eest-legacy 17.10% <33.33%> (-0.01%) ⬇️
eest-libsecp256k1 28.08% <50.00%> (+<0.01%) ⬆️
eest-stable 81.77% <50.00%> (+<0.01%) ⬆️
evmone-unittests 94.41% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
core 95.95% <100.00%> (+<0.01%) ⬆️
tooling 94.29% <ø> (ø)
tests 99.81% <ø> (ø)
Files with missing lines Coverage Δ
test/state/state.cpp 98.66% <100.00%> (+<0.01%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed

codspeed Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will improve performance by 2.71%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
✅ 898 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ baseline/analyse/main/sha1_shifts 11.5 µs 11.2 µs +2.71%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing state/recipient-charge-first (5029db7) with master (d9e925a)

Open in CodSpeed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The focused ordering change matches the stated execution semantics without introducing observable regressions.

Review effort: Balanced
Findings: None

What changed in this PR

Reorders EIP-8037 recipient-creation charging to match execution-specs before delegation resolution.

Changes:

  • Moves NEW_ACCOUNT state-gas charging before delegation lookup.
  • Asserts that delegated recipients exist.
File Description
test/​state/​state.cpp Reorders top-level state-gas charging and pins the delegation invariant.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@chfast
chfast merged commit 875ac7f into master Sep 28, 2026
31 checks passed
@chfast
chfast deleted the state/recipient-charge-first branch September 28, 2026 07:09
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.

2 participants