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
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/api/api.abc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ ExecutionContextAPI
:members:


ComputationAPI
MessageComputationAPI
--------------

.. autoclass:: eth.abc.ComputationAPI
.. autoclass:: eth.abc.MessageComputationAPI
:members:


Expand Down
4 changes: 2 additions & 2 deletions docs/api/vm/api.vm.computation.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Computation
===========

BaseComputation
MessageComputation
---------------

.. autoclass:: eth.vm.computation.BaseComputation
.. autoclass:: eth.vm.computation.MessageComputation
:members:

4 changes: 2 additions & 2 deletions docs/guides/creating_opcodes.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Creating Opcodes
================

An opcode is just a function which takes a :class:`~eth.vm.computation.BaseComputation`
An opcode is just a function which takes a :class:`~eth.vm.computation.MessageComputation`
instance as it's sole argument. If an opcode function has a return value, this
value will be discarded during normal VM execution.

Expand Down Expand Up @@ -52,7 +52,7 @@ Usage of the :func:`~eth.vm.opcode.as_opcode` helper:
def custom_op(computation):
... # opcode logic here

class ExampleComputation(BaseComputation):
class ExampleComputation(MessageComputation):
opcodes = {
b'\x01': as_opcode(custom_op, 'CUSTOM_OP', 10),
}
Expand Down
4 changes: 2 additions & 2 deletions docs/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,8 @@ Internal Changes - for Contributors
- Fix for creating a duplicate "ghost" Computation that was never used. It didn't
break anything, but was inelegant and surprising to get extra objects created
that were mostly useless. This was achieved by changing
:meth:`eth.abc.ComputationAPI.apply_message` and
:meth:`eth.abc.ComputationAPI.apply_create_message` to be class methods. (`#1921 <https://github.com/ethereum/py-evm/issues/1921>`__)
:meth:`eth.abc.MessageComputationAPI.apply_message` and
fselmo marked this conversation as resolved.
Show resolved Hide resolved
:meth:`eth.abc.MessageComputationAPI.apply_create_message` to be class methods. (`#1921 <https://github.com/ethereum/py-evm/issues/1921>`__)


py-evm 0.3.0-alpha.14 (2020-02-10)
Expand Down
Loading