4 ms·
Actually you could. Just limit the max. number of instructions that are allowed to be executed in order for a script to be valid.
by gst 13y ago
Actually you could. Just limit the max. number of instructions that are allowed to be executed in order for a script to be valid.
- nullc 13y agoIndeed, you can, but then you have a very exact requirement on exactly how the interpreter is implemented which can never be optimized, and any disagreement between implementations can cause a world ending consensus failure. By not having looping or recursion script naturally gets an operation limit by virtue of having a size limit, and this is _relatively_ easy to get right between implementations. (Though, so far several of the alt implementations have gotten it wrong).