Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Redesign VM output management #3318

Closed
chfast opened this issue Sep 28, 2016 · 4 comments
Closed

Redesign VM output management #3318

chfast opened this issue Sep 28, 2016 · 4 comments
Assignees

Comments

@chfast
Copy link
Member

chfast commented Sep 28, 2016

I would like to propose change in the VM-related API. Now the user have to provide the output buffer where the VM will copy the output (it comes from current CALL semantics).
I want to change that to return the output buffer reference with attached virtual destructor to the user. The user is responsible to copy whatever it wants and release the buffer.

This should be aligned with:

  1. The way how CREATE works.
  2. EIP 5: Gas costs for return values EIPs#8.
  3. Changes planned in EVM-C: aligning external and internal calls.
@chfast
Copy link
Member Author

chfast commented Sep 28, 2016

@chriseth @gcolvin can you review this? Details will come with a PR.

@chfast chfast self-assigned this Sep 28, 2016
@gcolvin
Copy link
Contributor

gcolvin commented Sep 28, 2016

Can't get to Github for some reason.  Will review tomorrow or
  Saturday.  Thanks.


On 9/28/16 7:36 PM, Paweł Bylica wrote:


  @chriseth @gcolvin
    can you review this? Details will come with a PR.
  —
    You are receiving this because you were mentioned.
    Reply to this email directly, view
      it on GitHub, or mute
      the thread.







  {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/ethereum/cpp-ethereum","title":"ethereum/cpp-ethereum","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/ethereum/cpp-ethereum"}},"updates":{"snippets":[{"icon":"PERSON","message":"@chfast in #3318: @chriseth @gcolvin can you review this? Details will come with a PR."}],"action":{"name":"View Issue","url":"https://github.com/ethereum/cpp-ethereum/issues/3318#issuecomment-250142623"}}}

@chriseth
Copy link
Contributor

chriseth commented Oct 4, 2016

Sounds good! The question would be: How much will be retained? The full memory of the callee or will the return part be copied somewhere else in between? I think it should be quite safe to retain the full memory because it will be deleted in the next step.

@chfast
Copy link
Member Author

chfast commented Oct 5, 2016

Exactly. You return full memory and the reference to the output buffer
within this memory. The user frees the memory as soon as it does not need
the output any more.

On Wed, Oct 5, 2016, 00:37 chriseth [email protected] wrote:

Sounds good! The question would be: How much will be retained? The full
memory of the callee or will the return part be copied somewhere else in
between? I think it should be quite safe to retain the full memory because
it will be deleted in the next step.


You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
#3318 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAi_xNe17aEbp6s3cor2RptBJ3PynQFGks5qwtU9gaJpZM4KItlj
.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants