Exactly what sorts of syscalls would we need? So far, I can think of the following:
- Optimized cryptographic operations: elliptic curve operations, hash functions, etc. These could all be implemented in rv32im directly and are just more efficient as specially optimized operations (this is very similar to jets in Nock). Each environment would support a subset of these (probably all of them for browser/desktop/mobile, limited for zkVM/EVM/SVM).
- Local storage operations: read from, write to, and scan “local” storage (persistent memory).
- Implemented by localStorage or similar in the browser enviroment.
- Implemented by persistent storage on EVM/SVM environments.
- Not supported by zkVM environment.
- Implemented by persistent DB storage on desktop/mobile.
- Network communication: send message to Anoma network address, send message to pub/sub topic (maybe these can be combined, maybe not).
- Implemented by relay from the browser environment.
- Implemented by relay from EVM/SVM environments (log an event which a listening node will pick up and relay the message).
- Implemented by direct network communications on desktop/mobile.
- Not supported by zkVM environment.
- Distributed storage operations: scry distributed storage (with scry-properties).
- Implemented by the zkVM/browser/desktop/mobile runtimes (this is the most complicated syscall).
- Not supported by EVM/SVM (except for maybe very simple scries).