subql icon indicating copy to clipboard operation
subql copied to clipboard

Migrate from vm2 to isolated-vm

Open ianhe8x opened this issue 2 years ago • 1 comments

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

  1. [First Step]
  2. [Second Step]
  3. [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?

ianhe8x avatar Sep 12 '23 05:09 ianhe8x

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.

stwiname avatar Feb 23 '24 03:02 stwiname