Skip to content

fix(context): keep is_empty on EIP-7702 account in load_account_delegated#3802

Open
cuiweixie wants to merge 1 commit into
bluealloy:mainfrom
cuiweixie:fix/host-load-account-delegated-is-empty
Open

fix(context): keep is_empty on EIP-7702 account in load_account_delegated#3802
cuiweixie wants to merge 1 commit into
bluealloy:mainfrom
cuiweixie:fix/host-load-account-delegated-is-empty

Conversation

@cuiweixie

Copy link
Copy Markdown
Contributor

Summary

  • Stop overwriting AccountLoad::is_empty with the EIP-7702 delegate account's emptiness in Host::load_account_delegated.
  • Align the Host default with JournalInner::load_account_delegated, so empty-account / creation-cost checks use the caller account.
  • Add a regression test: non-empty EIP-7702 account delegating to an empty account must keep is_empty == false.

Test plan

  • cargo test -p revm-context-interface --lib load_account_delegated_keeps_caller_is_empty_not_delegate -- --nocapture
  • Confirm the test fails if account_load.data.is_empty = delegate_account.is_empty is restored

…ated

Do not overwrite AccountLoad::is_empty with the delegate account's flag.
Empty-account / creation-cost checks must reflect the caller account,
matching JournalInner::load_account_delegated.
@codspeed-hq

codspeed-hq Bot commented Jul 15, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 3.59%

⚠️ 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
✅ 180 untouched benchmarks
⏩ 1 skipped benchmark1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation blake2/2_rounds 3.4 µs 3.2 µs +3.59%

Tip

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


Comparing cuiweixie:fix/host-load-account-delegated-is-empty (c790572) with main (a094a93)

Open in CodSpeed

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports.

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.

1 participant