I don’t think that’s a problem because we don’t need to trust the servers that store our data and we can use transaction fees to incentivize them. Actually my proposal is mostly about the usage of ZK-EDBs (zero knowledge elementary databases). If you were interested you could check this section:
https://github.com/aybehrouz/AVM/blob/main/proposal.md#implementation
For using ZK-EDBs effectively, we need to have a unified memory structure in the node software. We should use the same memory model for smart contracts and users balance record. In my point of view, the best way for doing so is to have a VM and run everything (including ALGO transfer logic) on that VM. Then, we may use different methods for persisting the memory of our VM, it could be a normal data base or a distributed ZK-EDB or anything else…
Why shouldn’t we provide general purpose (i.e turing complete) computations on a blockchain platform? Is it because we have limited computational and memory resources? If that’s the case then the conventional way for controlling the resource usage of a program is to use a VM. Currently, the main use case for Vmware and KVM is resource management in cloud platforms. With a VM you can precisely control the amount of memory or even the number of clock cycles a program is using, and if you can control the execution time and memory usage of a program why do you need to limit the programming language capabilities? (i.e. TEAL capabilities)
In terms of performance, it should be noted that Limiting the programming language capabilities will not give us any performance gains while we are running our programs on a general purpose hardware. If we had a specialized hardware optimized for our programming language that could be helpful… but we don’t have that hardware.
Current design of TEAL is not performance friendly at all. TEAL uses a map data structure as its memory module, it has type-aware instructions so you always have to perform run-time type checking, it has instructions of arbitrary length (byteC and IntC) and, last but not least, TEAL uses an abstract stack machine. A stack machine is easier for code generation but its not good for performance. Its performance is much worse than a register machine specially when your underlying hardware is a register machine.
In my point of view, the best justification for having a limited PL (programming language) is security. For example, we could design a PL which can easily be verified by formal methods. This is really a good idea, but we can have such languages on a general purpose platform too. We could have both a limited PL and a general purpose PL and developers can choose the language that is more suitable for their needs.
Side-chains is not a smart solution for a problem. Its not a solution at all. Its just a way for ignoring a problem. If you can run your program on a side chain with a considerably less security, why don’t you run your program on an efficient centralized server?