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

[fastx adapter] Cache the VM to amortise module verification #192

Conversation

gdanezis
Copy link
Collaborator

@oxade this uses your PR #190 as a base, so we can merge or we can look at it separately.

@gdanezis
Copy link
Collaborator Author

Yo @sblackshear and @lxfind -- I am now starting to encroach on the adaptor to get more familiar with it, and be able to help on this side. Do check I am not doing anything too daft, and let me know how you prefer to structure passing in a pre-existing MoveVM to execute.

@oxade
Copy link
Contributor

oxade commented Jan 16, 2022

@oxade this uses your PR #190 as a base, so we can merge or we can look at it separately.

Please give me s short moment to address the comments on the PR w.r.t using Coin::transfer, then we can integrate :)

@gdanezis
Copy link
Collaborator Author

There is no rush to take this. It's just a demo of the kind of change we would need to do to reuse the VM. As you can see it's a small change but I would rather others chip in on how best to do this.

@sblackshear
Copy link
Collaborator

Good catch + this looks very sensible to me!

One thing that comes to mind is the (lack of) eviction policy for the VM's caches. Not a blocker for this, but could bite us going forward, so I filed diem/move#18 to get the Move team thinking about it.

Copy link
Collaborator

@sblackshear sblackshear left a comment

Choose a reason for hiding this comment

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

LGTM modulo deleting the native_functions field.

@@ -43,7 +43,8 @@ pub struct AuthorityState {
pub secret: KeyPair,

/// Move native functions that are available to invoke
native_functions: NativeFunctionTable,
_native_functions: NativeFunctionTable,
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can get rid of this field now, since we only use it to create a VM inside the adapter.

@gdanezis
Copy link
Collaborator Author

Thanks @sblackshear ; @oxade the comments have been addressed so feel free to land this onto your branch whenever you like.

@oxade
Copy link
Contributor

oxade commented Jan 18, 2022

Thanks @sblackshear ; @oxade the comments have been addressed so feel free to land this onto your branch whenever you like.

Cherrypicked the changes. Thank you

@oxade
Copy link
Contributor

oxade commented Jan 19, 2022

Closing this since #190 is merged

@oxade oxade closed this Jan 19, 2022
@huitseeker huitseeker deleted the vm-caching branch April 22, 2022 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants