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

Upload file unification #212

Closed
tomusdrw opened this issue Nov 18, 2024 · 1 comment
Closed

Upload file unification #212

tomusdrw opened this issue Nov 18, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@tomusdrw
Copy link
Contributor

We currently support uploading a file in two places:

  1. JSON
  2. Bytecode.

Instead, there should only be one option to upload a file and we should auto-detect if it's a JSON test file or PVM program (decodeStandardProgram).

The file should also be validated before being imported:

  1. If we detect JSON, but it does not have all required fields - we should given an error about invalid JSON file.
  2. If we detect binary, but it can't be decoded - we should display error that occured during decoding.

Over time uploading binary files will be much more common so it should be a more streamlined input method.

@tomusdrw tomusdrw added the enhancement New feature or request label Nov 18, 2024
@tomusdrw
Copy link
Contributor Author

Jam Service (1).pvm.zip

Here is a file in the SPI format (coming from paritytech/polkavm#190) that can be loaded now in the debugger (using RAW Bytecode tab).

However it seems that from the SPI we only use the raw program code and we don't use it to initialize the memory.

The file should most likely be just passed directly to resetJAM function of a PVM: #132 and we should let the PVM initialize itself.

@wkwiatek wkwiatek added this to the 2024-12 Roadmap milestone Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants