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

Runtime Implementation #323

Merged
merged 51 commits into from
Apr 7, 2020
Merged

Runtime Implementation #323

merged 51 commits into from
Apr 7, 2020

Conversation

ec2
Copy link
Member

@ec2 ec2 commented Mar 30, 2020

Summary of changes
Changes introduced in this pull request:

  • implemented runtime
  • Change interfaces for actors to take mutable references
  • naive interpreter

Reference issue to close (if applicable)

Closes
#67

Other information and links

There are still a few things that need to be done. Namely, we still need to implement gas calculations. Until we have that, there we obviously cannot calculate the gas cost of calls. Also, we won't be able to verify some of the things that need to be verified. I have marked these as TODO.

Also, I have left the Runtime package in because that is where the Runtime trait lives. It is debatable as to whether we need a Runtime trait and I am heavily leaning on removing it altogether. The initial reason we had the Runtime trait is to create different Runtime for testing, for example. However, we can mock those, which might actually make things a lot more easier. I figured that I'll leave the trait in here meanwhile, and possibly remove it when we start doing the Actors testing... But as an FYI, the VM is currently using the DefaultRuntime struct instead of referencing the trait. It is a LOT more easier to do it like this...

The logic for the Lotus' send functions are in runtime.go and vm.go here https://github.com/filecoin-project/lotus/tree/testnet/3/chain/vm
@austinabell @dutterbutter

Copy link
Contributor

@austinabell austinabell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please write some tests for this logic, seems it isn't doing what you think it is

vm/actor/src/builtin/multisig/mod.rs Outdated Show resolved Hide resolved
vm/actor/src/builtin/init/mod.rs Outdated Show resolved Hide resolved
vm/actor/src/builtin/paych/mod.rs Outdated Show resolved Hide resolved
vm/actor/src/builtin/paych/mod.rs Outdated Show resolved Hide resolved
vm/actor/src/builtin/power/mod.rs Outdated Show resolved Hide resolved
vm/default_runtime/src/lib.rs Show resolved Hide resolved
vm/default_runtime/src/lib.rs Outdated Show resolved Hide resolved
vm/default_runtime/src/lib.rs Outdated Show resolved Hide resolved
vm/default_runtime/src/lib.rs Outdated Show resolved Hide resolved
vm/runtime/Cargo.toml Outdated Show resolved Hide resolved
vm/state_tree/src/lib.rs Show resolved Hide resolved
vm/default_runtime/src/lib.rs Show resolved Hide resolved
vm/actor/src/builtin/init/mod.rs Outdated Show resolved Hide resolved
vm/actor/src/builtin/system/mod.rs Show resolved Hide resolved
@ec2 ec2 merged commit 5f81a1d into master Apr 7, 2020
@ec2 ec2 deleted the ec2/rt branch April 7, 2020 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants