Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Could individual miners change the cost they charge for individual opcodes, or perhaps even disable specific opcodes alltogether?


The developers were thinking of doing this at the beginning but decided against it.

Currently, when you send a transaction, the transaction includes a gas price that you are willing to pay for a unit of gas. The miners then decide if they want to mine your transaction, or not. Each opcode in the Ethereum Virtual Machine requires a different amount of gas, which is hard coded (look at this spreadsheet: https://docs.google.com/spreadsheets/d/1m89CVujrQe5LAFJ8-YAU... the opcode that is causing trouble today is EXTCODESIZE which has a gas cost of 20, which is apparently too low).

Initially, there were ideas where you could specify in the transaction the gas price you are willing to pay for each opcode. But this would make transactions very large (in terms of bytes).


Yes, but if some other miner decides to actually build on top of the other block, the miner that chooses not to will get orphaned and lose their block reward.

In addition, the cost of the expensive blocks is a burden on the entire network, not just the miners.

Bitcoin has a soft fork process (BIP9) where a rule can be enforced among all nodes at the same time. Of course, it is necessarily slow to activate and currently requires 95% of miners to signal support to minimize the number of blocks produced using the old rules.


   disable specific opcodes alltogether
That would be network censorship and kind of ruin the point of a "trustless network".




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: