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

Move all expression evaluation from host into Executor #3941

Closed
mversic opened this issue Oct 2, 2023 · 0 comments
Closed

Move all expression evaluation from host into Executor #3941

mversic opened this issue Oct 2, 2023 · 0 comments
Assignees
Labels
iroha2-dev The re-implementation of a BFT hyperledger in RUST QA-confirmed This bug is reproduced and needs a fix

Comments

@mversic
Copy link
Contributor

mversic commented Oct 2, 2023

Executor should be the only entity that knows how to evaluate expressions. Host should have no reference to expressions, expressions are strictly an Executor concept and can be changed at runtime by updating Executor.

As a consequence evaluation step will now happen entirely before the validation step.
Currently, Validator/Executor traverses syntax tree and evaluates any expression encountered along the way. That is not good because it results in repeated evaluation of expressions in both executor and on the host. Executor should first evaluate every expression (such as InstructionExpr) into a concrete instruction (such as InstructionBox) and only then call visit_instruction.

This means that visit_* method signatures should be modified to operate on evaluated instructions

@mversic mversic added the iroha2-dev The re-implementation of a BFT hyperledger in RUST label Oct 2, 2023
@mversic mversic changed the title Separate expression evaluation and validation Move all expression evaluation from host into Executor Oct 4, 2023
Arjentix added a commit to Arjentix/iroha that referenced this issue Dec 13, 2023
Arjentix added a commit to Arjentix/iroha that referenced this issue Dec 14, 2023
Arjentix added a commit that referenced this issue Dec 14, 2023
Asem-Abdelhady pushed a commit to Asem-Abdelhady/iroha that referenced this issue Jan 9, 2024
@timofeevmd timofeevmd self-assigned this Jan 10, 2024
@timofeevmd timofeevmd added the QA-confirmed This bug is reproduced and needs a fix label Jan 10, 2024
Asem-Abdelhady pushed a commit to Asem-Abdelhady/iroha that referenced this issue Jan 22, 2024
Asem-Abdelhady pushed a commit to Asem-Abdelhady/iroha that referenced this issue Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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