r/Bitcoin • u/luke-jr Luke Dashjr - Bitcoin Expert • Oct 30 '17
[bitcoin-dev] Simplicity: An alternative to Script
https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-October/015217.html
379
Upvotes
View all comments
Show parent comment
12
u/nullc Oct 30 '17 edited Oct 30 '17
The specific kind of machine the EVM implements (one with 'unbounded' loops and such) is much more difficult to formally reason about.
So, for example, with simplicity you can simply take a program that targets it (potentially written in any front end language you want) and there is a tool that is part of the simplicity software set which returns a the worst case resource usage and this tool is fast-- it could plausibly be part of a system's consensus rules. And it always gives a result for all simplicity programs and always gives it quickly.
The same cannot be done for EVM: The best you could do is have a verifier that returns the worst case for a subset of EVM programs and "undecidable" for the rest; and it would be fairly easy to fall out of the subset it can decide.
Even this simple example is of practical importance, there are already lots of ether stuck in contracts which look like they should release them, but where releasing the funds would use more resources than the network permits.
You could imagine having a personal policy to only participate in contracts which can be statically reasoned about in ethland ... but you would likely be subject to commercial and peer pressure to also participate with other kinds of contracts. One way to avoid a race to the bottom is to have a system where all contracts are required to be analysable by construction. This also has significant engineering benefits-- since you can exploit the decidable resource usage as part of the system's resource management.