iroha
iroha copied to clipboard
refactor(wasm): make wasm execution part of Instruction
First part of #5147 (Draft)
This PR refactors the following:
- Previously, in a transaction, a single wasm executable can be submitted instead of instructions. Here, WASM execution was transferred from the transaction level to the instruction level.
As a result:
- Multiple WASM can be submitted in contrast to a single executable.
- Custom executor can handle wasm-related call
visit_execute_wasm_smartcontract.
Breaking changes:
- Replace
Executable::WasmtoExecutable::Instruction(WasmExecutable<WasmSmartContract>). - The errors related to the error in the WASM execution will be associated with
Instructionin contrast toTransaction. - Genesis transaction accepts WASM.
Issues to be addressed:
- Since WASM execution is now at the instruction level, the runtime (fuel) should be reused from the transaction (see smartcontract and trigger). It is planned to be addressed in https://github.com/hyperledger-iroha/iroha/issues/5494.