zkevm-specs icon indicating copy to clipboard operation
zkevm-specs copied to clipboard

MCOPY spec

Open curryrasul opened this issue 10 months ago • 2 comments

Issue Link

Closes #510

curryrasul avatar Apr 09 '24 15:04 curryrasul

It's not directly related to MCOPY, but I'm working on this, and looking through RETURNDATACOPY, which we discussed before @ChihChengLiang It is said, that RETURNDATACOPY copies from memory to memory: https://github.com/privacy-scaling-explorations/zkevm-specs/blob/4f272c2b6ddfaf2b0815d1b93a6b32e38f5d8fb8/specs/tables.md?plain=1#L276-L279

I read about RETURNDATACOPY, it's said that it copies from so-called return data buffer, that acts like a temporary place, where's the return value from contract-call is stored. Is it still memory? Or maybe it doesn't belong to memory , stack or storage?

curryrasul avatar Apr 16 '24 20:04 curryrasul

I read about RETURNDATACOPY, it's said that it copies from so-called return data buffer, that acts like a temporary place, where's the return value from contract-call is stored. Is it still memory? Or maybe it doesn't belong to memory , stack or storage?

I was confused about returndata not present in CopyDataType, but it seems returndatacopy copies from the memory of child call's memory to the current call's memory. So this memory to memory copy of returndatacopy makes sense to me now and mcopy is pretty much similar apart from it is a memory to memory copy for the same call.

zemse avatar Apr 18 '24 05:04 zemse