evm icon indicating copy to clipboard operation
evm copied to clipboard

feat: support memory copying instruction (EIP-5656)

Open Agusrodri opened this issue 1 year ago • 2 comments

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.

Agusrodri avatar May 06 '24 14:05 Agusrodri

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

RomarQ avatar May 13 '24 08:05 RomarQ

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 b8bfe59

Done in 3f15f922d23df2f7453c626de5ccdc9c3094c270 :)

Agusrodri avatar May 14 '24 13:05 Agusrodri

@Agusrodri please resolve the conflicts

koushiro avatar Jun 03 '24 02:06 koushiro

@Agusrodri please resolve the conflicts

Done :+1:

RomarQ avatar Jun 04 '24 07:06 RomarQ