EVM on WASM: Let storing a contract cost gas
Context
Storing contract code costs gas - just like storing anything else on Ethereum.
Related #5119
Thomas' comment
This MR needs additional testing, but is otherwise good.
Hantang's comment
thomas implem is not correct we should pay 200 gas for every byte in storage of code, cf page 27 of yellow paper
There are still some uncovered gas costs around contract creation. MR !10349 (merged) adds the remaining parts.
Manually testing the MR
Existing tests of contract creation have been updated.
Specific tests for contract creation gas cost added.
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 Pierre-Emmanuel CORNILLEAU