kakarot
kakarot copied to clipboard
feat: add an `init` method to the interpreter to assign opcode to address
Feature Request
Describe the Feature Request
Currently, the mapping address => opcode implementation is hardcoded in the big jumptable of the interpreter.
It shouldn't cost a lot (few hundred steps) to use instead of segment of opcode codeoffset
stored in the evm
object.
The default initialization would set the current eth mainnet default layout.
Adding an opcode would then only consist in doing an assert evm.opcodes[index] = impl
.
Related Code
interpreter.cairo