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

Replace VM2 with isolated-vm #8

Merged
merged 13 commits into from Nov 2, 2023
Merged

Replace VM2 with isolated-vm #8

merged 13 commits into from Nov 2, 2023

Conversation

techcoderx
Copy link
Collaborator

@techcoderx techcoderx commented Jul 15, 2023

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.

@sag333ar sag333ar requested a review from vaultec81 July 15, 2023 12:11
@vaultec81 vaultec81 added bug Something isn't working enhancement New feature or request labels Aug 23, 2023
@vaultec81
Copy link
Member

@techcoderx Can you pull from master & resolve merge conflicts?

@techcoderx
Copy link
Collaborator Author

Done, please double check to make sure all the latest methods are being passed in correctly.

Copy link
Member

@vaultec81 vaultec81 left a 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)
Copy link
Member

@vaultec81 vaultec81 Oct 12, 2023

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

@techcoderx
Copy link
Collaborator Author

Apologies for the delay. Missed a few commas in the template which was why it did not compile.

Copy link
Member

@vaultec81 vaultec81 left a 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

@vaultec81 vaultec81 merged commit 6982e4a into main Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants