見出し画像

[和訳] Bitcoin vs Ethereum Smart Contracts: Part 2 - Why Ethereum is never needed

ビットコイン vs イーサリアム

イーサリアムが必要とされない理由

原著:https://xiaohuiliu.medium.com/bitcoin-vs-ethereum-smart-contracts-part-2-4866ed64b9fd

The entire reason for Ethereum’s existence is to overcome Bitcoin scripting language’s “limitations”. There are four limitations listed in the Ethereum whitepaper. We analyze each of them and show all claims of the supposed limitations are false, calling its existence into question.

イーサリアムの存在意義は、ビットコインのスクリプト言語の「制限」を克服することにあります。イーサリアムのホワイトペーパーには4つの制限が記載されています。私たちはそれぞれを分析し、想定される制限の主張がすべて誤りであることを示し、その存在を疑問視しています。

画像1

参考:https://gettotext.com/frankfurt-thoughts-on-a-possible-flippening/

Lack of Turing-completeness / チューリング完全性の欠如

while there is a large subset of computation that the Bitcoin scripting language supports, it does not nearly support everything. The main category that is missing is loops.
Bitcoin スクリプト言語がサポートしている計算のサブセットは数多くありますが、すべてをサポートしているわけではありません。欠けている主なカテゴリーはループです。
Contrary to popular belief, Bitcoin is Turing complete. Not only are there peer-reviewed theoretical¹ proofs², but it is also empirically verified on the Bitcoin blockchain³.

一般的な考えとは異なり、ビットコインはチューリング完全です。ピアレビューされた理論的な¹証明²があるだけでなく、ビットコインのブロックチェーン上で経験的に検証されています³。

The main misconception lies in that Bitcoin script is a low-level instruction set (a.k.a., opcodes) of a virtual machine. It does not need looping instructions in itself. Loops can and should be constructed at higher level using programming languages such as sCrypt, like all modern programming languages. If the same logic is applied to the Ethereum Virtual Machine, it is also Turing-incomplete since there is no loop in its opcodes. So is Java, since its virtual machine JVM also lacks loop opcodes, which is obviously false because Java is known to be Turing complete.

主な誤解は、ビットコイン・スクリプトが仮想マシンの低レベルの命令セット(通称:オペコード)であることにあります。それ自体にループ命令は必要ありません。ループは、現代の他のプログラミング言語と同様に、sCryptのようなプログラミング言語を使って、より高いレベルで構築することができますし、そうすべきです。同じ論理をEthereum仮想マシンに適用すると、そのオペコードにはループがないため、チューリング不完全でもあります。また、Javaの仮想マシンJVMにもループのオペコードがないので、Javaも同様ですが、Javaはチューリング完全であることが知られているので、これは明らかに誤りです。

Value-blindness / 価値観の相違

there is no way for a UTXO script to provide fine-grained control over the amount that can be withdrawn.
UTXOスクリプトでは、引き出し可能な金額を細かく制御する方法がありません。
There IS a way for a UTXO script to fully control the amount to be withdrawn at any granularity, using a technique called OP_PUSH_TX. It allows a script to access the amount in its UTXO and to specify how it could be spent into various outputs. There are scripts/contracts already developed to only allow certain amount to be withdrawn such as this one.

OP_PUSH_TXと呼ばれる技術を使用して、UTXOスクリプトが引き出し量を任意の粒度で完全に制御する方法があります。これにより、スクリプトはUTXO内の金額にアクセスし、その金額をさまざまな出力に使用する方法を指定できます。このように、特定の金額の引き出しのみを許可するスクリプトや契約書がすでに開発されています。

Lack of state / 状態の欠如

there is no opportunity for multi-stage contracts or scripts which keep any other internal state beyond that.
マルチステージの契約や、それ以上の内部状態を維持するスクリプトの機会はありません。
There are ways to maintain internal state in a Bitcoin contract, using OP_PUSH_TX. There are many multi-stage contracts developed such as Tic-Tac-Toe⁴ and auction.

ビットコインのコントラクトでは、OP_PUSH_TXを使って内部状態を維持する方法があります。Tic-Tac-Toe⁴やオークションなど、多くのマルチステージコントラクトが開発されています。

Blockchain-blindness / ブロックチェーンの盲点

UTXO are blind to blockchain data such as the nonce, the timestamp and previous block hash.
UTXOは、ノンセ、タイムスタンプ、前のブロックのハッシュなどのブロックチェーンのデータに対して盲目です。(ノンスは、暗号通信で用いられる、使い捨てのランダムな値のこと)
There is a strong reason for Bitcoin UTXO/Script to not allow access to blockchain data: security. If Script can access external information, an attacker can manipulate this information to gain unfair advantages. Ironically, it is exactly these kinds of vulnerabilities that enabled many attacks on Ethereum such as SWC-116 and SWC-120, which is impossible on Bitcoin.

Bitcoin UTXO/Scriptがブロックチェーンデータへのアクセスを許可しないのには、セキュリティという強い理由があります。Scriptが外部の情報にアクセスできると、攻撃者はこの情報を操作して不当な利益を得ることができます。皮肉なことに、SWC-116やSWC-120といったEthereumでの多くの攻撃を可能にしたのは、まさにこの種の脆弱性であり、ビットコインでは不可能なのです。

[1] Craig S. Wright: A Proof of Turing Completeness in Bitcoin Script. IntelliSys (1) 2019: 299–313
[2] Craig S. Wright: Bitcoin: A Total Turing Machine. IntelliSys (1) 2019: 237–252
[3] Bitcoin script is Turing Complete: sCrypt’s ‘Game of Life’ is Proof
[4] Play Tic-Tac-Toe on Bitcoin: https://scrypt.io/tic-tac-toe

あとがき

著者は現在もっともビットコイン作者の近くで、ビットコインスクリプトに触れている一人です。分かりにくいビットコインスクリプトをjavascriptのように記述し、コンバートするETHで言うところのSolidityのようなサービスを構築しています。本和訳はDeepLで簡単に翻訳したものですが、日本のかた向けに読んでもらえる機会が増えたらいいなと思い、noteにて掲載しております。文中のリンクなどが細かく設定されているので、詳細が気になる方は原書をご確認ください。

※ 本記事はBTC,ETH,BSVなどの投機に関する記事ではなく、当然ETHが今後下落するといった類の示唆ではありません。
※ あくまでスマコンの将来性に対して現状の設計を評価したものを和訳しただけです。

この記事が気に入ったらサポートをしてみませんか?