[WIP] spec: add <static> cell for flagging execution mode#100
[WIP] spec: add <static> cell for flagging execution mode#100
<static> cell for flagging execution mode#100Conversation
|
How Looks like the one tricky case is that I like the idea of using the namespace concept to implement the static concept because it integrates nicely with ewasm (in terms of just providing the list of "allowed imported eei methods"), and makes it clear what is allowed in which modes. |
|
Still you have to check if you have the access to non-static namespace at runtime, right? The call separation sounds good to me. At the moment the cost is different depending if it transfers a value. How about names like |
|
Yeah, the EEI would make the check if the current namespace allows for accessing those methods, and the namespace The same namespacing trick would allow for limiting the opcodes that either |
As @pepyakin pointed out, we will need a
<static>flag for capturing which EEI methods the current execution is allowed to access.We could also think of implementing this as a
<eeiNamespace>cell, which contains the list of EEI methods the current execution can access. This nicely encapsulates both thestaticnotion, as well as the namespace notion we have discussed for having different methods available to the EVM engines vs the ewasm engines vs the evm2wasm engines.@chfast and @axic what do you think? Basically, we would have two EVM namespaces, one which is
evm, and one which isevm_static, the second not allowing access to the various EEI methods which cannot be accessed during aSTATICCALL.Also tagging @poemm for thoughts.