Migrate from vm2 to isolated-vm
Prerequisites
- [ ] Are you running the latest version(s)?
- [ ] Have you searched the documentation for your issue?
- [ ] Did you search for an existing issue or pull request?
Description
vm2 has been discontinued the development, author suggested isolated-vm as the successor
Details
These details can help to reproduce the environment the issue is occurring
Local Environment: [You can get this information from executing subql version.]
Query Version: [What is the version of the query service?]
Indexer Version: [What is the version of the indexer service?]
Network Details:
- [Network]
- [Block height, a block height where the issue is happening]
- [Dictionary endpoint, if used]
Steps to Reproduce
- [First Step]
- [Second Step]
- [and so on...]
Example project: [A link to a minimal example that can reproduce the issue]
Expected behavior: [What you expected to happen]
Actual behavior: [What actually happened]
Any other information
Is there any other information you would like to add?
This is a non-trivial change. isolated-vm provides a vanilla JS VM without any Nodejs features. Things like setTimeout and any requires are not supported.
If we did switch to this we could introduce it as a breaking change and slowly expand on features. But making it more like nodejs is going to produce a lot of potential security issues.