[Ethereum] How were gas costs chosen for the Ethereum Virtual Machine instructions

evmgashistoryyellow-paper

Different instructions of the EVM have different associated gas costs — you can look at the list of the gas-prices in the appendix G of the yellow paper.

While the rough magnitudes of those numbers look quite reasonable, the exact values still look like they were chosen somewhat arbitrarily. On the other hand some values look strangely specific. Is there any deeper reason for choosing those exact values?

Best Answer

I share with you the spreadsheet which explains the formula behind the gas cost of each OPCODE.

Version 1.0 was created by Core Devs of Ethereum. I look forward how to articulate future updates of it. It is a meta-consensus challenge to resolve.