Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Can...

Read only perations with WorldStateViewWorld State View:

  • Execute(IrohaQuery)

Composable types:

...

Execution of Iroha Special Instruction can be successful or can fail. If it was successful it may return changed WorldStateView World State View and return `Output` as a value. 

...

Code Block
Mint(ExecuteQuery(dex::query::getExchangeRate), asset_id)


Alternatives

Smart Contract Runtime with direct API to World State View

Another solution that can be used here is to provide Iroha clients with direct access to World State View API and store all Iroha Special Instructions (out-of-the-box and custom) as WA artifacts.

Pros:

  • High degree of customization
  • Low-level control over execution (programming language control mechanism like loops, mathematical operators, conditions, etc.)
  • Extensibility - new Iroha Special Instructions will not depend on existing ones by any measure

Cons:

  • High level of security risks - direct usage of low-level API (World State View) may give hackers a possibility to execute malicious scenarios
  • Direct dependency on WASM runtime - we make it a part of our public API without possibility to optimize it and tune a lot
  • Low control over custom Iroha Special Instructions - harder to check permissions and more strict requirements to custom Iroha Special Instructions review process
  • Wide spread of client side tools and technologies - with an ability to use low-level API it will be harder to develop and maintain client-side tools, like explorers.

Concerns

  • Set of out-of-the-box instructions should be well-defined, it's also good to have an ability to add new OOB instructions with new versions of Iroha if needed.

Assumptions

Risks

Additional Information

...