aionnetwork / AVM

Enabling Java code to run in a blockchain environment
https://theoan.com/
MIT License
49 stars 25 forks source link

[CLOSED] Runtime metering - other improvements / considerations #224

Closed aionbot closed 5 years ago

aionbot commented 5 years ago

Issue created by nancyaion (on Tuesday Sep 04, 2018 at 17:44 GMT)

Other than #221 #222 #223 , other pending topics include,

  1. Probable improvements to the current model that we charge a flat rate to native JCL method invocations.
  2. Probable improvements to the current approach to "charge the sum-up cost if the method has multiple blocks". It has problems such as 1) this is not always the maximum cost because some blocks may be executed multiple times, e.g. for loop; 2) maximum cost may be too much for some methods.
  3. Exceptions are not charged in a consistent way. We are currently not charging the generated exceptions (CommonGenerators.java); however, we do charge the written exceptions in internal folder. The approach can be,1) charge the generated exception methods by inserting the energy-charging bytecode into the generated bytecode; 2) do not charge at all for all avm exceptions.
aionbot commented 5 years ago

Comment by nancyaion (on Thursday Sep 06, 2018 at 21:17 GMT)

Covered by #248. Closing