Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazy queries inside WASM #3929

Closed
Arjentix opened this issue Sep 27, 2023 · 2 comments
Closed

Lazy queries inside WASM #3929

Arjentix opened this issue Sep 27, 2023 · 2 comments
Assignees
Labels
Enhancement New feature or request iroha2-dev The re-implementation of a BFT hyperledger in RUST QA-confirmed This bug is reproduced and needs a fix

Comments

@Arjentix
Copy link
Contributor

Arjentix commented Sep 27, 2023

We support lazy (kind-of) queries for basic clients, but it's not supported for WASM.

This creates some problems. For example because of that we cannot move our queries execution into Executor causing stragne divergence: transctions and instructions are executed, but queries are not.

Need to implement lazy evaluation for WASM as well

@Arjentix Arjentix added the iroha2-dev The re-implementation of a BFT hyperledger in RUST label Sep 27, 2023
@Arjentix Arjentix self-assigned this Sep 27, 2023
@Arjentix Arjentix added the Enhancement New feature or request label Sep 27, 2023
@mversic
Copy link
Contributor

mversic commented Sep 28, 2023

This creates some problems. For example because of that we cannot move our queries execution into Executor causing stragne divergence: transctions and instructions are executed, but queries are not.

This is not the reason to implement lazy queries in wasm. If query is executed from Executor the result should be cached on the host (i.e. not returned to the Executor) during validation because there is no point in dragging the result through Executor again

@mversic
Copy link
Contributor

mversic commented Sep 28, 2023

not to mention that it's a security issue to allow references to flow from host into smartcontract. A malicious smartcontract could execute several such queries until it induces OOM on the host

Arjentix added a commit to Arjentix/iroha that referenced this issue Oct 9, 2023
Arjentix added a commit to Arjentix/iroha that referenced this issue Oct 11, 2023
Arjentix added a commit to Arjentix/iroha that referenced this issue Oct 11, 2023
Arjentix added a commit to Arjentix/iroha that referenced this issue Oct 11, 2023
Arjentix added a commit to Arjentix/iroha that referenced this issue Oct 11, 2023
Arjentix added a commit to Arjentix/iroha that referenced this issue Oct 11, 2023
Arjentix added a commit to Arjentix/iroha that referenced this issue Oct 12, 2023
Arjentix added a commit to Arjentix/iroha that referenced this issue Oct 13, 2023
Arjentix added a commit to Arjentix/iroha that referenced this issue Oct 18, 2023
Arjentix added a commit to Arjentix/iroha that referenced this issue Oct 20, 2023
Arjentix added a commit that referenced this issue Oct 20, 2023
@timofeevmd timofeevmd self-assigned this Nov 3, 2023
@timofeevmd timofeevmd added the QA-confirmed This bug is reproduced and needs a fix label Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request iroha2-dev The re-implementation of a BFT hyperledger in RUST QA-confirmed This bug is reproduced and needs a fix
Projects
None yet
Development

No branches or pull requests

3 participants