Custom wasm runtime
All WebAssembly modules must execute in a highly performant and fully deterministic WebAssembly virtual machine. The WebAssembly specification has made some non-deterministic design choices, because of which the default runtimes are insufficient for a blockchain use-case.
Psibase therefore defines a custom WebAssembly run-time based on a battle-tested and deterministic runtime called EOS VM. The psibase VM specification adds further requirements above and beyond the EOS VM implementation.
Goals
- Support bulk memory operations
- Support sign extension operators
- Better generated code optimization
- Add non-trapping float-to-int conversions
- Support 128-bit SIMD instructions to accelerate some wasm computation such as cryptographic operations
- Support using the latest WASI SDK (Currently wasi-sdk-20)
- Maintain full determinism developed for EOS VM
Reference implementation
The reference implementation for the custom Psibase WebAssembly runtime currently satisfies all goals. It can be found here.