EIP-6780: SELFDESTRUCT
only in same transaction
#67
Labels
hardfork cancun
EIP's for the Cancun hardfork
London to Prague
London to Pectra
will implement
For those EIP's that will be implemented on Linea
Milestone
EIP-6780: SELFDESTRUCT only in same transaction
Progress
SELFDESTRUCT
only in same transaction #147Impact
This will impact deployments and SELFDESTRUCT:
TX_INIT (for deployment transactions)any CREATE/CREATE2 will have to log its ABS_TX_NUM of the current momentthe account/ perspective (we need a new field "deployed in transaction X"Notes
Read through https://hackmd.io/@vbuterin/selfdestruct. The approach detailed below will likely require a new corset feature.
Approach
We can deal with this in the following way:
account/HAS_CODE_FIRST_IN_TXN
account/HAS_CODE_FIRST_IN_TXN ≡ 0
Thenaccount/HAS_CODE_FIRST_IN_TXN ≡ 1
Then we apply the modified wayrecipient == accountAddress
We cannot use account existence as a criterion since an account which gets deployed in a transaction may have nonzero balance prior to deployment, and would thus exist in the state. We also don't care about nonzero nonce. Indeed, for an account to be able to
SELFDESTRUCT
it must have nonempty code, which means that it was deployed at some stage and has nonzero nonce. In any case, the only criterion that matters is whether the account has code to begin with.Test vectors
The text was updated successfully, but these errors were encountered: