With the release a new feature called custom improvement proposals has been introduced in the Cosmos EVM framework. Custom improvement proposals allow protocol developers to modify the behavior of the EVM opcodes to tailor their functionalities to the specific needs.
SetExecute
: update the execution logic for the opcode.
SetConstantGas
: update the value used for the constant gas cost.
SetDynamicGas
: update the function used to compute the dynamic gas cost.
SetMinStack
: update the minimum number of items in the stack required to execute the operation.
SetMaxStack
: update the maximum number of items that will be in the stack after executing the operation.
SetMemorySize
: the memory size required by the operation.
evmos_XXXX
. This allows each chain to define their improvements without having to worry about existing or future ID clashes between different chains. Additionally, the ability to start enumeration at 0 is better for chain developers and allows having a better overview of the historical progress for each chain.
Below, you will find an example of how the Cosmos EVM chain uses this functionality to modify the behavior of the CREATE
and CREATE2
opcodes. First, the modifier function has to be defined: