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

Decoupling VM from State machine #161

Closed
DmiSergeev opened this issue Sep 9, 2018 · 1 comment
Closed

Decoupling VM from State machine #161

DmiSergeev opened this issue Sep 9, 2018 · 1 comment
Assignees
Labels
needs review issue may be outdated or wrong refactoring type: refactoring tech debt ~virtual machine component: virtual machine
Milestone

Comments

@DmiSergeev
Copy link
Contributor

Motivation

Currently State machine and VM projects are tightly coupled:

  • Sbt projects: VM is the dependency for State machine.
  • Configuration: wast module filenames are hardcoded in State machine's Main class. There setting should be tunable and provided via some configuration.

As a consequence those 2 projects are not isolated: someone cannot use the State machine without an initialized WASM instance; the State machine behavior cannot be tested in separation from VM. Also, the State machine code would likely be needed to change in case of even minor changes in the VM processing logic.

Proposed change

First, we need to move an integration logic with tests into a dedicated Sbt project. As a result, the State machine should not depend on Asmble-specific logic anymore: it might be even run and tested with some stub instead of real VM instance. Some new, Asmble-'agnostic', tests should be implemented in addition to the current, mostly integrational, State machine tests.
We also need to provide a way to configure the setup of currently used VM implementation flexibly, including the list of WASM modules used and Asmble-specific properties.

@folex folex added needs review issue may be outdated or wrong refactoring type: refactoring and removed ~consensus labels Feb 12, 2019
@alari alari added this to the verification milestone Feb 14, 2019
@alari
Copy link
Member

alari commented Apr 18, 2019

Duplicated in #340

@alari alari closed this as completed Apr 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review issue may be outdated or wrong refactoring type: refactoring tech debt ~virtual machine component: virtual machine
Projects
None yet
Development

No branches or pull requests

4 participants