iroha icon indicating copy to clipboard operation
iroha copied to clipboard

What runtime executor should be allowed to do?

Open Erigara opened this issue 2 years ago • 4 comments

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.

Erigara avatar Jun 28 '23 09:06 Erigara

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

mversic avatar Jan 17 '24 09:01 mversic

isn't responsible for running triggers

Regarding triggers:

  • executor already can execute ExecuteTrigger isi (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?

Erigara avatar Apr 26 '24 08:04 Erigara

  • 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?

Mingela avatar Jun 12 '24 07:06 Mingela

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

Erigara avatar Jun 20 '24 06:06 Erigara

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

mversic avatar Jul 08 '24 11:07 mversic

But what about queries, from what I see, queries don't go through executor at all

Yeah, we only check permissions for them

Erigara avatar Jul 08 '24 11:07 Erigara

closed in favor of #4865

mversic avatar Jul 19 '24 11:07 mversic