比特币学习-图灵不完备的脚本语言

The bitcoin transaction script language contains many operators, but is deliberately limited in one important way - there are no loops or complex flow control capabilities other than conditional flow control. This ensures that the language is not Turing Complete, meaning that scripts have limited complexity and predictable execution times. Script is not a general-purpose language. These limitations ensure that the language cannot be used to create an infinite loop or other form of "logic bomb" that could be embedded in a transaction in a way that causes a denial-of-service attach against the bitcoin network. Remember, every transaction is validated by every full node on the bitcoin network. A limited language prevents the transaction validation mechanism from being used as a vulnerability. 


比特币脚本语言不是图灵完备的,具有一定的局限性,它没有循环语句和复杂的条件控制语句。由于语言存在这种局限性,我们也就没办法使用这种语言写一些死循环或者一些能够导致DOS攻击的恶意代码,从而也就避免了比特币网络受到DOS攻击。每一个全节点,都会对交易进行验证。具有这种局限性的脚本语言,使人们无法把这种验证机制看成一个攻击比特币网络的缺陷。


Note:有翻译不但的地方,还望提出,谢谢。

没有更多推荐了,返回首页