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

Refactor current VM computations to be message computations #2097

Merged
merged 4 commits into from
Apr 21, 2023

Commits on Apr 19, 2023

  1. Refactor BaseComputation to be simpler and subclass ``MessageComp…

    …utation``:
    
    - The current implementation of the computation classes (and the base computation class) will become stale when EOF is introduced because it always assumes a "message" which has transaction fields. We should refactor the actual base computation class to have only the inherent properties of base computations.
    
    - The ``MessageComputation`` class then inherits from a simpler, stripped-down ``BaseComputation`` class. Existing VM computation classes are now ``MessageComputation`` classes since they inherently require a ``message`` and ``transaction_context`` starting at the ``__init__()`` method and stretching across some of its methods and properties.
    
    - This hierarchy paves the way for EOF computations, and possibly other computations, to exist within a more flexible model. EOF computations are likely to be properties of message computations since an EOF computation cannot be executed without a message / transaction.
    fselmo committed Apr 19, 2023
    Configuration menu
    Copy the full SHA
    aa82dfb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0c4c4da View commit details
    Browse the repository at this point in the history
  3. Refactor computation children to BaseComputation class

    - Define computation children in the ``BaseComputation`` class and narrow the type as needed for subclasses - e.g. for ``MessageComputation`` narrow the children to be ``MessageComputationAPI``.
    - Some minor cleanup along the way.
    - Add newsfragment
    fselmo committed Apr 19, 2023
    Configuration menu
    Copy the full SHA
    c7bc4cf View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2023

  1. Configuration menu
    Copy the full SHA
    0c30193 View commit details
    Browse the repository at this point in the history