-
Notifications
You must be signed in to change notification settings - Fork 128
Closed
Description
In EVM the caller must define the available space for return values.
In the current EVM2 design this is carried over, however it could be improved:
calldoesn't defines the return value spacereturndoesn't writes the value to the caller's memory space (I understand this today can depend on the VM anyway)returnplaces the values into an intermediate, in-memory storage (callstore) and the contract is charged according to the size of this- a new opcode,
callResultCopyis introduced for copying betweencallstoreand the caller's memory space (andcallResultSizeto retrieve the total size) - the
callstoreis erased when acallis executed
It is a rough design, but it could be ironed out.
Reactions are currently unavailable