kakarot icon indicating copy to clipboard operation
kakarot copied to clipboard

feat: add an `init` method to the interpreter to assign opcode to address

Open ClementWalter opened this issue 8 months ago • 0 comments

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

ClementWalter avatar Jun 10 '24 12:06 ClementWalter