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

Implement missing bits in gas mechanics #13

Closed
vaivaswatha opened this issue Oct 12, 2020 · 2 comments · Fixed by #52
Closed

Implement missing bits in gas mechanics #13

vaivaswatha opened this issue Oct 12, 2020 · 2 comments · Fixed by #52
Labels
gas Anything to do with charging gas missing functionality Functionality present in the interpreter but not in VM

Comments

@vaivaswatha
Copy link
Contributor

vaivaswatha commented Oct 12, 2020

In continuation to #12 , there are few things that still need to be implemented:

  1. Support for gas_charge elements ListLength, DivCeil and LogOf. The latter two needs code generation in the compiler as well.
  2. The interpreter scales the gas limit before beginning execution and later scales it back down. This should be performed in the VM as well (Scale down gas consumption scilla#877)
  3. There are some fixed costs such as contract size + init file size charging during deployment, and message JSON size during transition execution that are missing in the VM.
@vaivaswatha vaivaswatha added gas Anything to do with charging gas missing functionality Functionality present in the interpreter but not in VM labels Oct 12, 2020
@vaivaswatha
Copy link
Contributor Author

vaivaswatha commented Jun 21, 2021

  1. Dynamic type check costs must be charged too. Note: This can't be done by introducing gas-charge statements in the transition body because the check must happen before the body executes, not potentially doing a lot of operations (and failing) before the gas charge statement gets executed. So it must be handled separately, as is done in the runner.

@vaivaswatha
Copy link
Contributor Author

There are some fixed costs such as contract size + init file size charging during deployment, and message JSON size during transition execution that are missing in the VM.

This will be done by the blockchain code henceforth, to ensure uniformity b/w interpreted and compiled Scilla.

vaivaswatha added a commit that referenced this issue Aug 5, 2021
* Scale gas limit.

Point 2. in #13.

Reference: Zilliqa/scilla#877

* Gas charge for dynamic typecheck

* Initialize a variable to avoid warning

* Specify RTLD_LOCAL in SharedObject explicitly
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
gas Anything to do with charging gas missing functionality Functionality present in the interpreter but not in VM
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant