evm
evm copied to clipboard
feat: support memory copying instruction (EIP-5656)
This PR adds an adaptation to EIP-5656 which introduces the MCOPY opcode.
By using this new instruction, it is possible to copy parts of the memory in a cheaper and easier way, everything done with one opcode.
Note
All the Cancun ethereum-tests related to MCOPY pass with this implementation.
We could add a new flag eip_5656_enabled to the config for reverting when MCOPY is used in forks that should not support it.
Similar change for eip-1153 https://github.com/rust-ethereum/evm/pull/278/commits/b8bfe595de0c351c18a17546e6b9475d093fba99
We could add a new flag
eip_5656_enabledto the config for reverting whenMCOPYis used in forks that should not support it.Similar change for eip-1153 b8bfe59
Done in 3f15f922d23df2f7453c626de5ccdc9c3094c270 :)
@Agusrodri please resolve the conflicts
@Agusrodri please resolve the conflicts
Done :+1: