What runtime executor should be allowed to do?
After merge of #3634, validator became executor it will be possible to execute additional isi during validation and make changes to wsv.
However executor still isn't responsible for running triggers, smart-contracts, updating parameters in wsv.
We should define scope of what executor should be able to do.
there is a performance implication of encoding/decoding big pieces of data when sending it to executor. Smart contracts could be quite hefty in size
isn't responsible for running triggers
Regarding triggers:
- executor already can execute
ExecuteTriggerisi (so run any by-call trigger) - for event based triggers there isn't much executor can do about them
- if someone want to disable triggers it's also possible by deny every
Register<Trigger>isi
updating parameters
This point is not entirely clear to me, currently our on-chain parameters are controlled by SetParameter isi which could be executed by trigger at migration stage or during transaction or isi execution.
smart-contracts
Here i can see issue in that executor doesn't directly interact with the smart-contract transactions which payload is not isis but wasm.
Instead wasm is compiled directly and executor observes only instructions emitted by the smart contract.
Atm i'm not sure would it be useful to pass wasm transaction in the executor?
And also more general qustion do we need wasm transactions at all?
Currently the same behaviour could be acheived by combination or registration by call trigger and executing it.
@mversic any opinion on whatever executor should receive wasm transactions?
- if someone want to disable triggers it's also possible by deny every
Register<Trigger>isi
though it's rather disabling new triggers appearance, not stopping execution of the existing ones;
it feels the executor is isi-processor/executor; thus imposes validation around an ISI which is a smallest unit of manipulating the WSV; even if WASM contracts are present, they rely on the ISI inside, if those calls are being processed by the executor we're fine.
And also more general qustion do we need wasm transactions at all?
what do you mean by wasm transactions?
by wasm transactions i mean that right now use can send as transaction payload not series of transactions but the wasm blob which would be executed
However executor still isn't responsible for running triggers, smart-contracts
IMO this is fine as it is since every smart contract is translated into a sequence of ISIs which do go through executor.
But what about queries, from what I see, queries don't go through executor at all
But what about queries, from what I see, queries don't go through executor at all
Yeah, we only check permissions for them
closed in favor of #4865