EVM: contracts that SELFDESTRUCT deleted at end of transaction
Context
Discovered this bug when trying to fix stExtCodeHash
.
For SELFDESTRUCT
, as specified on https://www.evm.codes/#ff?fork=shanghai, "The current account is registered to be destroyed, and will be at the end of the current transaction. "
Currently, the address would be deleted as soon as the SELFDESTRUCT
opcode is executed, which is not the correct behaviour. This MR makes it so that all the deletion happens at the end of the top-level transaction
Manually testing the MR
Run the evaluation test. Number of successful test increase from to 16073 to 16090
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rst
for the protocol and the environment,CHANGES.rst
at the root of the repository for everything else). -
Select suitable reviewers using the Reviewers
field below. -
Select as Assignee
the next person who should take action on that MR
Edited by Hantang Sun