EVM: update transaction base cost
Context
The base cost of transactions has a more fine grained cost structure that previously implemented. Specifically, there is a cost associated with the size of transaction input data, and additional costs associated with contract create. This MR goes towards getting the price of contract creation right.
Corresponds to G_txdatazeo
, G_txdatanonzero
and G_create
in Appendix G of Yellow paper.
Transaction data cost is
- 4 per 0 byte
- 16 per non zero byte
Contract creation cost is 32000 (plus the standard 21000).
Manually testing the MR
Price updates should be reflected in updates to unit tests. Run them as part of CI.
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