Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

state: Only mark touch of empty accounts #785

Merged
merged 1 commit into from
Jan 9, 2024

Commits on Jan 9, 2024

  1. state: Only mark touch of empty accounts

    If an account is being touched but is not empty it doesn't make sense
    to mark it as touched. Touching only affects deleting empty accounts
    but an account cannot become empty later during transaction execution
    (except for selfdestruct, but this is tracked separately).
    
    When executing all state tests from https://github.com/ethereum/tests,
    this optimization reduces number of registered touch events by 99.2%
    (from 1673250 to 13806) and number of reverted touch events by 99.7%
    (from 1345463 to 401).
    
    Moreover, considering current Mainnet status and
    [EIP-7523: Empty accounts deprecation](https://eips.ethereum.org/EIPS/eip-7523)
    empty accounts cannot be encountered after the Paris revision.
    Therefore, this change total disables unnecessary touch handling
    in current PoS networks.
    chfast committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    b66de4d View commit details
    Browse the repository at this point in the history