Skip to content

Comments

chore: helper caller_touch_and_change added#3032

Merged
rakita merged 6 commits intomainfrom
rakita/helper-caller-touch-and-change
Oct 2, 2025
Merged

chore: helper caller_touch_and_change added#3032
rakita merged 6 commits intomainfrom
rakita/helper-caller-touch-and-change

Conversation

@rakita
Copy link
Member

@rakita rakita commented Sep 30, 2025

Refactor account changed from validate_against_state_and_deduct_caller into one function. Split from PR #2991

@rakita rakita requested review from klkvr and mattsse September 30, 2025 21:13
@codspeed-hq
Copy link

codspeed-hq bot commented Sep 30, 2025

CodSpeed Performance Report

Merging #3032 will not alter performance

Comparing rakita/helper-caller-touch-and-change (c0e764f) with main (248af3a)

Summary

✅ 173 untouched

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

makes sense, one idea and doc nit

Comment on lines -169 to -173
// Bump the nonce for calls. Nonce for CREATE will be bumped in `make_create_frame`.
if tx.kind().is_call() {
// Nonce is already checked
caller_account.info.nonce = caller_account.info.nonce.saturating_add(1);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

wondering if we could bump call nonces in make_call_frame too? right now the flow is not very intuitive and moving it into caller_touch_and_change just makes it harder to reason about

Copy link
Member Author

Choose a reason for hiding this comment

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

Caller nonce is not bumped for CALL/STATICCALL/etc, while the caller of CREATE/CREATE opcode is bumped. That is why nonce bump is here.

In future i would even like to add the value deduction here, but this requires changing more senstive code, so I am delaying it for later.

@rakita rakita force-pushed the rakita/helper-caller-touch-and-change branch from 4356d99 to 5b968ff Compare October 1, 2025 22:06
@rakita rakita requested review from klkvr and mattsse October 1, 2025 22:11
@rakita rakita merged commit 1c91a12 into main Oct 2, 2025
31 checks passed
@github-actions github-actions bot mentioned this pull request Oct 2, 2025
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Jan 21, 2026
* chore: helper caller_touch_and_change added

* move caller_touch_and_change to Account

* rn artifact from merge

* rename to caller_initial_modification
@rakita rakita deleted the rakita/helper-caller-touch-and-change branch February 16, 2026 10:15
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.

3 participants