Zilliqa / scilla

Scilla - A Smart Contract Intermediate Level Language
https://scilla-lang.org
GNU General Public License v3.0
240 stars 78 forks source link

Generalise gas monad to track any state #865

Open ilyasergey opened 4 years ago

ilyasergey commented 4 years ago

At the moment, Scilla interpreter has the gas-monad hard coded, and the set of its effects is not extensible to track, e.g., state-collecting semantics. This proposal suggest to generalise the state monad to account for multiple ways to do state-tracking:

As the type-safe embedding is not possible to do in a type-safe way the framework (due to the nature of literals that have to be monomorphic), we are going to rely on the in-place module substitution during the building phase via dune facilities, namely the Virtual libraries & variants feature, which lets one to compile parameterized libraries and delay the selection of concrete implementations until linking an executable.

jjcnn commented 2 years ago

Moving to v0.14 due to lack of time.