-
Notifications
You must be signed in to change notification settings - Fork 5
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
Replace VM2 with isolated-vm #8
Conversation
@techcoderx Can you pull from master & resolve merge conflicts? |
Done, please double check to make sure all the latest methods are being passed in correctly. |
this is required for async functions to work
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.
Contract execution stalls and never completes on my end. Doesn't produce an output or any meaningful output
stateMerkle = state.finish().stateMerkle | ||
}) | ||
const compiled = await isolate.compileScript(code) | ||
await compiled.run(context) |
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.
await compiled.run(context)
Stalls and fails to execute
Apologies for the delay. Missed a few commas in the template which was why it did not compile. |
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.
Will do more tests locally
Due to patriksimek/vm2#533, the execution engine will have to be replaced with isolated-vm.
The replacement package allows for setting a memory limit (in MB). This may be useful to define a "memory limit" on a transaction basis to calculate a max tx fee for contract calls.
Tested working on my node so far with some contract calls.