EIP-7904: Gas Cost Repricing to reflect computational complexity

Discussion topic for EIP-7904: Gas Cost Repricing to reflect computational complexity

This EIP revises the gas cost schedule for opcodes, precompiles, memory expansion, and data access, prioritizing computational complexity, while excluding network-related costs such as state persistence. The adjustments aim to enhance gas cost accuracy and rebalance the cost structure.

Update Log

External Reviews

None as of 2025-03-05.

Outstanding Issues

None as of 2025-03-05.

1 Like

After quick scan of the proposal, one item caught my attention - opcodes DIV through MULMOD seem very modestly priced compared to rest of arithmetic. Did you ensure that the values of arguments were non-zero when doing the measurements? I recall that these opcodes were consistently much more (eg. ~5 times for DIV, very roughly) costly to run than the ADD thought SUB ones, as measured on the earlier stage of the project (see “expensive_cost” rows at the table bottom).

Also the proposed values align well with the zero argument measurements of these DIV-MULMOD opcodes obtained earlier (top of that linked table), which makes me think that indeed zero arguments might have been used here.