Skip to content

Incorrect production of "final state" #885

@chfast

Description

@chfast

The (77) defines transaction's final state σ′ where both selfdestructed and empty-but-touched accounts are deleted. This is not how this is implemented in practice.

What YP suggests is the following workflow:

for tx in transactions:
    execute(state, tx)
    delete_selfdestructed(state)
    delete_empty_but_touched(state)

apply_coinbase_reward()
apply_withdrawals()

Practical implementations are done as the following:

for tx in transactions:
    execute(state, tx)
    delete_selfdestructed(state)

apply_coinbase_reward()
apply_withdrawals()
delete_empty_but_touched(state)

The difference is subtle: in case we apply 0 block reward or 0 withdrawal to an empty account this account will be deleted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions