-
Notifications
You must be signed in to change notification settings - Fork 146
NVM Extension Proposals #176
Comments
@erikzhang I think NVM was dettached from Neo, at the moment IScriptContainer was removed. This was a great step indeed. However, I think a blockchain-inspired vm should be able to perform elaborate blockchain-related computation. |
what is the difference with syscalls? |
Good question Shargon. I think that syscalls are meant for interoperability with upper levels, not covered by NeoVM itself. On Neo Blockchain, this represents access to transactions, blocks, etc. On our neoresearch.io/nvm-learn tutorial,it allows to plot on browser canvas, emit javascript alerts, etc. So NeoVM is not affected by.choices on syscall. |
I think we should use |
Erik, Interop layer is meant for interoperability with the blockchain level (for any other Neo-based blockchain). In this sense, Extensions is meant to allow disabling unsupported features (on lightweight devices or even other Neo chains), but MainNet will have common accepted extensions (this extension number should be perhaps added to block itself, or after voting). What I propose here is a NeoVM mask, that may initially occupy an Extensions mask: We need a strong NeoVM, focused on deterministic/verifiable and cryptographic computation, this is not the role of an Interop layer. This is very important for Neo, we need to defend its VM. I don't think this is clear for everyone, why NeoVM is so important for Neo, and for blockchain ecosystem itself. NeoVM is far superior to WASM or any other general-purpose computing VM that I know, as all of these technologies can be implemented directly on NeoVM. |
Useful for Industry Standards: neo-project/neo#972 |
Erik, another practical way to implement this, is to separate all opcodes from 0xaa - 0xbf as extension opcodes. These can be easily disabled, and this way, we can take back CHECKSIG and CHECKMULTISIG for an Unified Entry Point, fully compatible to Neo2. |
I'm here to propose an NVM Extension Proposals (like a NEP in fact), that will allow us to introduce new features, in the future NVM3, in a very controlled way.
I think that after NeoVM 3 is released, not much changes will happen on its opcodes in a near future, it should be very stable. However, there will always appear new ideas and extensions that would better fit here on NVM, than on the ApplicationEngine.
I propose a single new opcode
EXTENSIONS
, that receives two bytes as parameter, allowing up to 65k possible extensions, grouped by category (first byte), and another one for specifics (otherwise 0x00).This will work like SYSCALLS, but in a very lightweight manner, and constrained to NeoVM project itself (not mentioning specific Neo Blockchain capabilities). In order to create an EXTENSION, a new NEP must be created declaring it, and after that, it could be implemented on NVM project.
Versioning is not proposed here, meaning that it is the responsibility of upper layer and dependent projects to care how they manage their NVM usage. The only thing NVM will provide is disable specific extensions, in a map format.
I think that NVM 3 fulfilled it's intention of being a lightweight virtual machine, however I think it should embed capabilities related to a verifiable execution engine, meaning that it should be able to embed some elaborate verifiable data structures, hashing and cryptography.
This should allow NVM to become a standard lightweight vm for blockchain and verifiable computation, as there's no such existing vm nowadays.
Therefore, my first proposal would be to embed the following extensions:
0x0101
-> SHA2560x0201
-> secp256r1 verificationWe could start a NEP with that.
The text was updated successfully, but these errors were encountered: