Base gas costs for function calls are too high #7741
Labels
A-contract-runtime
Area: contract compilation and execution, virtual machines, etc
A-transaction-runtime
Area: transaction runtime (transaction and receipts processing, state transition, etc)
T-contract-runtime
Team: issues relevant to the contract runtime team
Between unpacking a function call action from a receipt and when we start executing the WASM code, there is a bunch of constant fixed overhead. The way we are charging this today is through several parameters.
The sum of all parameters seems to be approximately right but some of the individual values are completely off. Most importantly, we do not scale properly with the number of bytes in the code and instead rely on high base fees.
Reshuffling the costs to scale properly with the code size could help users with small contracts a lot. We are talking about roughly halving the base cost per function call based on today's available data.
Detailed numbers are available in this comment #7227 (comment) and the comment right below it has some more detailed explanation. Further, there is table of which parameters we can play with in this comment #6992 (comment).
A slide deck with even more details on how exactly we charge gas and which places need fixing is available here:
https://docs.google.com/presentation/d/10nqplCDpmLdzeZbVx9POwBqEYH6aSFcZOgZPA2vMK_g/edit#slide=id.g13c377cb935_0_432
The text was updated successfully, but these errors were encountered: