[Chapter 0] Solidity : Turing-Complete Language

m0nd2y·2022년 8월 15일
1

What is Blockchain?

목록 보기
1/6
post-thumbnail

How Solidity been Turing-Complete Language?

text

When we consider this problem, we have to know
1. what is Turing-Complete.
2. what is Turing-Complete-language.
3. Bitcoin's programming language "Script"


text[Turing-machine]

First, Turing-Complete means "It has the same computing power as a Turing-machine". Turing-machine has infinite resource space, so It can solve every problem.

Second, Turing-Complete-Language is "language that can make algorithm input to a Turing-Machine".
It has to match two condition.

1. It must be small unit enough to split the process
2. It can use conditional statement and loop statement.

Until here you can think the language of C, JAVA also Turing-Complete-Language, but It's not.
C, JAVA is Loose Turing Completeness beacause low practical.
I will not explain here why they are low practical here.

text

Third, Bitcoin use Script (programming language for Bitcoin)
Script has no conditional statement and loop statement. (One of Turing-Complete-Lauguage's condition.) If script has loop statement, then It can attack by DDOS.

So Script is not Turing-Complete-Language.


Solidity is the programming language for Ethereum.

text

It satisfies up these two conditions.

1. It must be a small unit enough to split the process
2. It can use conditional statement and loop statement.

Solidity has Solved DDOS problem with a new concept : GAS.

In Solidity when we excute programming we have to paid GAS for every line of code.
So This system can prevent DDOS attack.

Solidity is Turing-Complete-Language


0개의 댓글