evmone icon indicating copy to clipboard operation
evmone copied to clipboard

Add more tests for EIP-7610 (create address collistion)

Open chfast opened this issue 1 year ago • 0 comments

EIP-7610.

A comment from the code:

bool is_create_collision(const Account& acc) noexcept
{
    // - what if an account had storage but is destructed?
    // - what if an account had cold storage but it was emptied?
    // - what if an account without cold storage gain one?
    if (acc.nonce != 0)
        return true;
    if (acc.code_hash != Account::EMPTY_CODE_HASH)
        return true;
    if (acc.has_cold_storage)
        return true;

    // The hot storage is ignored because it can contain elements from access list.
    // TODO: Is this correct for destructed accounts?
    assert(!acc.destructed && "untested");
    return false;
}

chfast avatar Sep 28 '24 15:09 chfast