fix(context): keep is_empty on EIP-7702 account in load_account_delegated#3802
Open
cuiweixie wants to merge 1 commit into
Open
fix(context): keep is_empty on EIP-7702 account in load_account_delegated#3802cuiweixie wants to merge 1 commit into
cuiweixie wants to merge 1 commit into
Conversation
…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.
Merging this PR will improve performance by 3.59%
|
| 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)
Footnotes
-
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. ↩
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.
Summary
AccountLoad::is_emptywith the EIP-7702 delegate account's emptiness inHost::load_account_delegated.JournalInner::load_account_delegated, so empty-account / creation-cost checks use the caller account.is_empty == false.Test plan
cargo test -p revm-context-interface --lib load_account_delegated_keeps_caller_is_empty_not_delegate -- --nocaptureaccount_load.data.is_empty = delegate_account.is_emptyis restored