-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[fastx adapter] Cache the VM to amortise module verification #192
Conversation
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 |
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. |
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. |
There was a problem hiding this 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.
fastpay_core/src/authority.rs
Outdated
@@ -43,7 +43,8 @@ pub struct AuthorityState { | |||
pub secret: KeyPair, | |||
|
|||
/// Move native functions that are available to invoke | |||
native_functions: NativeFunctionTable, | |||
_native_functions: NativeFunctionTable, |
There was a problem hiding this comment.
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.
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 |
Closing this since #190 is merged |
@oxade this uses your PR #190 as a base, so we can merge or we can look at it separately.