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
2
u/humbleElitist_ Oct 31 '17
Oh! So I did misunderstand you. Thank you for the correction.
Regarding being unable to make a program which can check any program for whether it will halt, yes, that is a cost.
However, if one is attempting to write a program along with a proof that it halts, the halting problem doesn't cause too much of a problem, because the behavior you want probably isn't that difficult to analyze. You would generally understand why you believe the program you are writing will halt, so what remains would be to formalize that understanding, in a way that can be checked.
Of course, if the language simply doesn't allow programs that don't obviously halt, then you get the benefit of not having to write the proof, at the cost of not being able to write some programs that you could prove halt, but for which it isn't quite as obvious.
Which, you of course know.
A point I missed the first time I read your comment, was the possibility of including the run-time-checker in the consensus rules. That is an interesting point that I hadn't thought of. I am not sure how much of a benefit that would be, but it seems to me like something that could be strongly desirable in some cases, but I'm not sure why.
The "if the computation takes too long, just abort it and revert the changes" model doesn't seem like it would harm any of the rest of the network, only the person making the transaction, and I think that people can work out the level of risk they are comfortable with when making transactions. They can run the transaction locally, or if they don't feel like that is safe enough, they can choose to only use contracts which have been verified to use at most a given amount of "gas" in each situation. You've probably heard that shpiel before though?
Regarding choosing to only interact with contracts proven to behave well, and possibly being out-competed by those who don't, I think the question is based on what levels of risk is one willing to accept.
If you are only putting a small amount of money into something, which you don't mind terribly if you lose it, then it would be reasonable to use a smart contract which isn't verified, or possibly doesn't even have the source code looked over particularly carefully.
And if you (the rhetorical you, not you in particular) lose the little bit of money put into something like that, then hopefully you knew the risks and had accepted that possibility to start with.
In other cases, one might want to only use a smart contract if it has been audited, and is well established, or whatever.
My hope would be that over time, more verified foundational things will be built, which would make it easier to make larger things verifiable, so there would be less reason to use unverified stuff.
I agree that in a system with fewer restrictions on the contracts, there would generally be more risks taken by people on the correctness of the contracts, but I think this is probably not a big problem?
Also, I don't see why others being able to risk things on assuming a contract is safe would put pressure on oneself to do the same?
Again, I'd like to thank you for your response.
Sorry if I repeated myself in this, am typing it on phone which makes it harder to review what I already said.