Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculate refunds on VM side #413

Closed
1 task
chfast opened this issue Aug 22, 2019 · 3 comments · Fixed by #666
Closed
1 task

Calculate refunds on VM side #413

chfast opened this issue Aug 22, 2019 · 3 comments · Fixed by #666

Comments

@chfast
Copy link
Member

chfast commented Aug 22, 2019

It should be VM's responsibility to calculate and aggregate refunds.

  • Add "refund" filed to evmc_result.
@axic
Copy link
Member

axic commented Dec 10, 2019

daytona depends on this.

@jlokier
Copy link

jlokier commented Sep 6, 2021

Nowadays refunds depend on information only known by the Host when the EVM calls setStorage, and I think that's quite a neat separation of concerns and knowledge. So perhaps this issue should be closed.

@chfast
Copy link
Member Author

chfast commented Sep 10, 2021

We are providing a lot of information about the SSTORE status to allow proper gas counting inside VM: https://github.com/ethereum/evmc/blob/master/include/evmc/evmc.h#L510-L536. There may be cases not handled by this where gas cost is the same but the refund is different, but I don't think we need very different mechanism to handle it fully.

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

Successfully merging a pull request may close this issue.

3 participants