So i’ve recently started to develop a minimal pure python Virtual Machine tailored specifically for counterparty. I’m starting this thread to keep note of development and design decisions, and also to get input from the community regarding what should the VM do.
- Why not use EVM?
- EVM was designed with ethereum blocktimes and specifics in mind. CP has already a lot of groundwork regarding tokens, bets and a lot of useful functions that don’t need to be recoded in a smart contract.
- Isn’t a VM a very large and complicated endeavor?
- A general purpose VM is a very complex piece of software. A domain specific one isn’t. The target of the CPVM is to have the least amount of instructions available to give enough functionality to contract writers to operate over CP without breaching security or leaving gaping security holes for anyone to exploit.
- Assembler! Really?
- It isn’t as bad as it looks, look at the examples and you’ll see that there are several high level functions in the assembly language of CPVM to allow any new contract writer to learn quickly.
- Why pure python? wouldn’t C or C++ would be a better implementation language because of it’s speed?
- Any piece of code that you make on C/C++ is prone to throw certain exceptions out of the python code that could kill the CP server without letting it first catch exceptions inside the python code.
More info on the next post.