Skip to content
  • Felix Lange's avatar
    3caf16b1
    core: remove stray account creations in state transition (#16470) · 3caf16b1
    Felix Lange authored
    The 'from' and 'to' methods on StateTransitions are reader methods and
    shouldn't have inadvertent side effects on state.
    
    It is safe to remove the check in 'from' because account existence is
    implicitly checked by the nonce and balance checks. If the account has
    non-zero balance or nonce, it must exist. Even if the sender account has
    nonce zero at the start of the state transition or no balance, the nonce
    is incremented before execution and the account will be created at that
    time.
    
    It is safe to remove the check in 'to' because the EVM creates the
    account if necessary.
    
    Fixes #15119
    3caf16b1
    core: remove stray account creations in state transition (#16470)
    Felix Lange authored
    The 'from' and 'to' methods on StateTransitions are reader methods and
    shouldn't have inadvertent side effects on state.
    
    It is safe to remove the check in 'from' because account existence is
    implicitly checked by the nonce and balance checks. If the account has
    non-zero balance or nonce, it must exist. Even if the sender account has
    nonce zero at the start of the state transition or no balance, the nonce
    is incremented before execution and the account will be created at that
    time.
    
    It is safe to remove the check in 'to' because the EVM creates the
    account if necessary.
    
    Fixes #15119
Loading