AlacrisIO / meta

Internal management of Legicash/Legilogic/Alacris
0 stars 0 forks source link

Design our Contract VM #59

Open skaushik98 opened 5 years ago

skaushik98 commented 5 years ago

If we want to run arbitrary DApps on our side-chains, these side-chains themselves need a universal contract VM. Our solution will be to adopt the lowest portable representation of our compiler itself as the VM, with some concrete byte-wise representation that is itself optimized for verification on the parent chain. Thus, for instance a side-chain on Ethereum would implement a variant of our VM where keccak256 is used as a hash function, and numbers are represented as per the Solidity ABI or RLP, whichever is the cheaper.

We will then implement not just a compiler from this VM to the existing other target languages, but also an interpreter for the VM in the DSL itself, so that it can be used as the contract VM for a side-chain for any parent chain targeted by the compiler (including side-chains using our VM itself!).

This task is blocked by the design and implementation of our DSL. On the other hand, we don't need this feature at first: we can first provide application-specific side-chains that are not universal.

fare commented 5 years ago

Are #60 and #131 duplicates?