We are planning to do some research on EVM at my company, such as adding new opcodes related to vector computations and deep learning. We have an engineer who just has been assigned to this task and starting to learn.
I wonder whats the best way for someone that does not know all bells and whistles of the current EVM impelementation to learn the basics and start “tweaking it”.
We are looking at at a Python-based EVM implementation. Would py-evm be a good starting point, or there are simpler implementations?
What would a good, time-saving development strategy to run py-evm off-chain and start tweaking it? Are there any tools/scripts/documentation within py-evm that can help?
It seems a bit strange though that they are using essentially C-headers as a compatibility tool, having the industry trends one would expect more of a microservice API approach in this case …
The best way for me to learn something is to implement it yourself. It helps to understand all caveats and to feel the code better. It’s not required to implement every behaviour but a parts. Also it’s very helpful to read and understand source code. It’s the only way to became a pro in short term.
EVM probably has zillions of cornercases not included in the yellow paper, so if we have our own thing, what the chance of it being really compatible ?)
On the other hand if we take a production EVM and slowly inject our stuff into it we will be guaranteed to have all the bugs the production EVM has, so we will get really really compatible
It seems that the EVM has this forks directory, which specifies alternative opcodes, so if we want to introduce an opcode, then we just need to add another fork there …
There’s also K-EVM which is used for verifying the EVM. But the Yellow paper is a good place to start, and Py-EVM is easiest to read and play around with.
It’s merged into develop branch of cpp-ethereum, so theoretically to make it work you need only to build with EIP_616 flag enabled. (and cpp-ethereum doesn’t have official releases lately)