PVM FFI-able library for JAM Implementers #89
sourabhniyogi
started this conversation in
Ideas
Replies: 1 comment
-
Will adjust pvm.h to match @koute's model https://docs.rs/polkavm/latest/polkavm/struct.RawInstance.html and reduce to practice in our recompiler (C/X86) by end of December. If anyone else has a pvm.h that does this well with their recompiler, please share. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
JAM Implementations in lower performance languages (Python/Typescript/...) can more effectively compete with a PVM FFI written in a higher performance language (C/C++/Rust). Initial performance data makes the performance difference between lower performance languages obvious, motivating a PVM FFI-able library for JAM Implementers.
The JAM prize already contemplates 2+ paths, which may use such a library:
Below is a code-complete
pvm.houtlining a library for the above two types of teams to publish vs use on 2 different paths. Critically, the PVM API contains registration of a host function callback supporting the keyecalliPVM instruction, which would interface to the host functions. Note that both a high-performance PVM interpreter (for Mac/X86) and a high-performance recompiler (for X86 only at first, but not necessarily only later) can conform to the same API.The source code for the underlying PVM library can be made open-source upon request by teams on the "Non-PVM Validating Node Path" of the "Validating Node Path", though this may naturally preclude the "Non-PVM Validating Node Path" team from pursuing the "Validating Node Path" later. The key idea is that the PVM interpreters are merely temporary scaffolding for a recompiler anyway, and in our early M1 largely educational: Teams will use this interpreter as a source of ground truth (hopefully accurate!) for their recompiler. We would hope that teams on the Non-PVM Validating Node Path using an PVM library of teams on the Validating Node Path would report PVM-related bugs in the course of PVM fuzzing.
Alternatively, instead of source code being made available, a "libpvm.a" form of the library (for Mac/Linux) could continue to support present M1/M2 clean room requirements.
Beta Was this translation helpful? Give feedback.
All reactions