Closed frisitano closed 2 years ago
For EVM, some backwards compatibility testing is required (ie. will the contract terminations refund storage deposit correctly).
I am currently in the process of exploring contract terminations. Contract termination via evm.selfdestruct
extrinsic seems reasonable. My main concern is when a selfdestruct
OPCODE is sent via an evm.call
extrinsic as in this instance the destruction is handled by the EVM handler rather then the extrinsic logic. Will report back with findings.
TODO:
evm.call
SUICIDE opcodeevm.call
(SUICIDE OPCODE) + evm.selfdestruct
use the same contract destruction logic (https://github.com/reef-defi/reef-chain/blob/master/modules/evm/src/lib.rs#L890-L924). Currently evm.call (SUICIDE) does not update CodeInfos
and hence it could result in stale data being left behind which contributes to state bloat. Additionally evm.call
uses a different storage refund mechanic. TODO:
This was not ready for merge - still had bugs relating to event queue not being purged properly.
This PR standardises the cost of storage (per byte) across the different pallets that charge for storage usage in the reef runtime. This includes transactions, evm and multisig. The cost per byte has been standardised at 10 mREEF.
closes: #62