Our SELFDESTRUCT operator is different from the EVM's. Necessarily so because we have additional semantics on accounts (and this is documented as part of EVM compatibility.). But some of those restrictions came about at the initial implementation of SELFDESTRUCT are are still enforced even though it seems likely they are unnecessary.
For example, you are allowed to sweep a balance (hbar or token) to the contract's own account. Because, if you just destructed the account, where is the hbar or token to go? But that restriction came about before we had EVM aliases and hollow accounts. Conceivably it could be lifted now.
Suggestion is to look at the current restrictions - mostly in DispatchingEvmFrameState and mostly there in the method tryTrackingSelfDestructBeneficiary) - and see which can, with some work, be lifted.
Reason to do this: SELFDESTRUCT, even post-Cancun, is still used in various interesting patterns by various services, and one of them may run into one of these limitations, which, if we didn't actually need it, would be unfortunate.
[ ] Investigate current restrictions on SELFDESTRUCT that Hedera has over EVM networks and determine which are now unnecessary
Our
SELFDESTRUCT
operator is different from the EVM's. Necessarily so because we have additional semantics on accounts (and this is documented as part of EVM compatibility.). But some of those restrictions came about at the initial implementation ofSELFDESTRUCT
are are still enforced even though it seems likely they are unnecessary.For example, you are allowed to sweep a balance (hbar or token) to the contract's own account. Because, if you just destructed the account, where is the hbar or token to go? But that restriction came about before we had EVM aliases and hollow accounts. Conceivably it could be lifted now.
Suggestion is to look at the current restrictions - mostly in
DispatchingEvmFrameState
and mostly there in the methodtryTrackingSelfDestructBeneficiary
) - and see which can, with some work, be lifted.Reason to do this:
SELFDESTRUCT
, even post-Cancun, is still used in various interesting patterns by various services, and one of them may run into one of these limitations, which, if we didn't actually need it, would be unfortunate.SELFDESTRUCT
that Hedera has over EVM networks and determine which are now unnecessary