Repository navigation
fix(context): keep is_empty on EIP-7702 account in load_account_delegated - #3802
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 PR is more correct in CALL type of opcodes you use target is_empty to decide if account is going to be created or not. This function is not used in revm so this is not a consensus issue, |
…lloy#3746 bluealloy#3802 bluealloy#3864 (#54) Co-authored-by: Prajjwal Chittori <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> Co-authored-by: Anders Brownworth <[email protected]> Co-authored-by: Ivan Wang <[email protected]> Co-authored-by: cui <[email protected]>
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