-
Notifications
You must be signed in to change notification settings - Fork 686
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
Implementing VMState
and Refactoring Computation
#244
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…eState` to `BaseVMState`
Closed
pipermerriam
approved these changes
Dec 29, 2017
|
6 tasks
Looks great, thanks for considering my suggestions! |
NIC619
added a commit
to NIC619/py-evm
that referenced
this pull request
Jan 5, 2018
NIC619
added a commit
to NIC619/py-evm
that referenced
this pull request
Jan 6, 2018
NIC619
added a commit
to NIC619/py-evm
that referenced
this pull request
Jan 6, 2018
hwwhww
pushed a commit
to hwwhww/py-evm
that referenced
this pull request
Jan 24, 2018
hwwhww
pushed a commit
to hwwhww/py-evm
that referenced
this pull request
Feb 1, 2018
hwwhww
pushed a commit
to hwwhww/py-evm
that referenced
this pull request
Feb 2, 2018
hwwhww
pushed a commit
to hwwhww/py-evm
that referenced
this pull request
Feb 6, 2018
hwwhww
pushed a commit
to hwwhww/py-evm
that referenced
this pull request
Feb 18, 2018
hwwhww
pushed a commit
to hwwhww/py-evm
that referenced
this pull request
Feb 22, 2018
hwwhww
pushed a commit
to hwwhww/py-evm
that referenced
this pull request
Feb 23, 2018
hwwhww
pushed a commit
to hwwhww/py-evm
that referenced
this pull request
Mar 2, 2018
hwwhww
pushed a commit
that referenced
this pull request
Mar 2, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What was wrong?
State
object #236 - ImplementVMState
object.Computation
class.How was it fixed?
VMState
class - class represents the VM state while the VM is at restAccountStateDB
fromBaseVM
toVMState
class.VMState.get_ancestor_hash()
coinbase
/timestamp
/block_number
/difficulty
/gas_limit
)Computation
refactoring - represents the VM state while the VM is runningComputation
configurable and specified for each VM.VM
toComputation
. I found thatmessage
andvm_state
could be just assigned in initialization function:Computation.__init__(vm_state, message, opcodes, precompiles)
@classmethod Computation.apply_computation(vm_state, message, opcodes, precompiles)
: Modify it to be a classmethod. Hope @pipermerriam can take a look if it's a weird anti pattern…?Computation.apply_message()
Computation.apply_create_message()
Computation.opcodes
Computation.precompiles
Computation.get_opcode_fn()
apply_child_computation(child_msg)
.Computation.generate_child_computation(vm_state, child_msg, opcodes, precompiles)
to generate thechild_compuation
and then callComputation.add_child_computation(child_computation)
.StateDB
toAccountStateDB
.TODO
VM.apply_transaction(transaction)
function toVMState.apply_transactionn(transaction)
VM.execute_transaction(transaction)
function toVMState.execute_transaction(transaction)
Block.add_transaction(transaction, computation)
toVMState.execute_transaction(transaction, computation)
Block.make_receipt(transaction, computation)
toVMState.make_receipt(transaction, computation)
Cute Animal Picture