Bitcoin Forum
May 08, 2024, 08:31:04 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 4 »  All
  Print  
Author Topic: The Bitcoin scripting system is purposefully not Turing-complete - why?  (Read 3385 times)
Giulio Prisco (OP)
Full Member
***
Offline Offline

Activity: 173
Merit: 101


View Profile
May 18, 2014, 08:57:06 AM
 #1

Can somebody explain to me why the Bitcoin scripting system is purposefully not Turing-complete? To make malicious programs difficult to develop (I guess)? Or because it was difficult to make it Turing-complete?

Bitcoin uses a scripting system for transactions. Forth-like, Script is simple, stack-based, and processed from left to right. It is purposefully not Turing-complete, with no loops. (https://en.bitcoin.it/wiki/Script)
1715157064
Hero Member
*
Offline Offline

Posts: 1715157064

View Profile Personal Message (Offline)

Ignore
1715157064
Reply with quote  #2

1715157064
Report to moderator
"Bitcoin: mining our own business since 2009" -- Pieter Wuille
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715157064
Hero Member
*
Offline Offline

Posts: 1715157064

View Profile Personal Message (Offline)

Ignore
1715157064
Reply with quote  #2

1715157064
Report to moderator
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
May 18, 2014, 09:00:43 AM
 #2

Can somebody explain to me why the Bitcoin scripting system is purposefully not Turing-complete? To make malicious programs difficult to develop (I guess)? Or because it was difficult to make it Turing-complete?

Bitcoin uses a scripting system for transactions. Forth-like, Script is simple, stack-based, and processed from left to right. It is purposefully not Turing-complete, with no loops. (https://en.bitcoin.it/wiki/Script)

Attack prevention.  With loops and recursion it becomes more difficult to limit the resources required by a script.  It would be possible to create scripts which crash nodes, scripts which take hours to validate, scripts which consume the host memory.   Any looped code can be unrolled.  The execution time of unrolled code is easy to control by limiting the length of the script.
Giulio Prisco (OP)
Full Member
***
Offline Offline

Activity: 173
Merit: 101


View Profile
May 18, 2014, 09:10:46 AM
 #3

Thanks. But I guess there must be tools that convert high level Turing-complete languages to low-level BTCscript code. Right?

One of the main selling point of Ethereum, as I understand, is that their Turing-complete programmable system permits writing complex contracts.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
May 18, 2014, 09:32:00 AM
Last edit: May 18, 2014, 10:31:05 PM by DeathAndTaxes
 #4

I believe Ethereum is backing off from that claim and it will not be Turing complete.   Generally the higher the complexity of the environment the higher the chance of undetected flaws, bugs, and exploits.   The idea that one would want a complex Turing complete (or quasi turing complete) scripting language, combined with the overhead of a decentralized network, to process the transfer of money seems a very dubious proposition.   I want my financial processing engine to be as lightweight and simple as possible.  Higher level functionality can be built on top of the network.
bluemeanie1
Sr. Member
****
Offline Offline

Activity: 280
Merit: 257


bluemeanie


View Profile WWW
May 18, 2014, 10:22:09 PM
 #5

Can somebody explain to me why the Bitcoin scripting system is purposefully not Turing-complete? To make malicious programs difficult to develop (I guess)? Or because it was difficult to make it Turing-complete?

this was discussed here: https://bitcointalk.org/index.php?topic=431513.msg6509979#msg6509979

as is already suggested, they were purposefully made to be non-turing complete.  Actually what it takes to compute a TX is entirely bounded.  See: The Halting Problem, ie. we know the little programs put inside bitcoin scripts must eventually end.

I believe Ethereum is backing off from that claim and it will not be Turing complete.   Generally the higher the complexity of the environment the higher the chance of undetected flaws, bugs, and exploits.   The idea that one would want a highly complex Turing complete scripting language that deals with the irreversible transfer of money seems dubious to me.

well what exactly do they have left as a value proposition?



-bm

Just who IS bluemeanie?    On NXTautoDAC and a Million Stolen NXT

feel like your voice isn't being heard? PM me.   |   stole 1M NXT?
justusranvier
Legendary
*
Offline Offline

Activity: 1400
Merit: 1009



View Profile
May 18, 2014, 11:41:43 PM
 #6

well what exactly do they have left as a value proposition?
Are you suggesting they ever had one to begin with?

Remember that Ethereum's promise from the beginning was allowing you to do computations on a global distributed computer with no privacy and cycle times in the milliHertz range.

Nobody ever bothered to ask if there really was a market for this service in the first place.
bluemeanie1
Sr. Member
****
Offline Offline

Activity: 280
Merit: 257


bluemeanie


View Profile WWW
May 18, 2014, 11:51:03 PM
 #7

well what exactly do they have left as a value proposition?
Are you suggesting they ever had one to begin with?

what's hilarious is they're releasing videos on people using Ethereum?

https://www.youtube.com/watch?v=9WNyupn8pvw

they clearly haven't even worked out the basics yet, but they're advertising all these end-user GUIs and such?

such wow.

-bm

Just who IS bluemeanie?    On NXTautoDAC and a Million Stolen NXT

feel like your voice isn't being heard? PM me.   |   stole 1M NXT?
bluemeanie1
Sr. Member
****
Offline Offline

Activity: 280
Merit: 257


bluemeanie


View Profile WWW
May 18, 2014, 11:54:06 PM
 #8

Also: Aston Kutcher likes it!  can you say, paid-for-PR?

-bm

Just who IS bluemeanie?    On NXTautoDAC and a Million Stolen NXT

feel like your voice isn't being heard? PM me.   |   stole 1M NXT?
jonald_fyookball
Legendary
*
Offline Offline

Activity: 1302
Merit: 1004


Core dev leaves me neg feedback #abuse #political


View Profile
May 19, 2014, 09:59:51 PM
 #9

Thanks. But I guess there must be tools that convert high level Turing-complete languages to low-level BTCscript code. Right?

One of the main selling point of Ethereum, as I understand, is that their Turing-complete programmable system permits writing complex contracts.

Where/what are the use-cases for these complex contracts?


onemorebtc
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250


View Profile
May 19, 2014, 10:42:48 PM
 #10

Thanks. But I guess there must be tools that convert high level Turing-complete languages to low-level BTCscript code. Right?

One of the main selling point of Ethereum, as I understand, is that their Turing-complete programmable system permits writing complex contracts.

Where/what are the use-cases for these complex contracts?



just-dice could be completly onchain (including user deposits for bankroll and interest).
but most know what happend when satoshi-dice was onchain Wink

transfer 3 onemorebtc.k1024.de 1
jonald_fyookball
Legendary
*
Offline Offline

Activity: 1302
Merit: 1004


Core dev leaves me neg feedback #abuse #political


View Profile
May 19, 2014, 11:00:53 PM
 #11

Actually I don't. What happened?

(And if whatever it was doing was done on bitcoin, you didn't answer my original question about ethereum)

onemorebtc
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250


View Profile
May 19, 2014, 11:11:11 PM
 #12

Actually I don't. What happened?

(And if whatever it was doing was done on bitcoin, you didn't answer my original question about ethereum)

too much transaction which bloated the chain.
as many try martingale wth dice sites i think this would happen with this contract.

transfer 3 onemorebtc.k1024.de 1
bluemeanie1
Sr. Member
****
Offline Offline

Activity: 280
Merit: 257


bluemeanie


View Profile WWW
May 19, 2014, 11:23:18 PM
 #13

Actually I don't. What happened?

(And if whatever it was doing was done on bitcoin, you didn't answer my original question about ethereum)

too much transaction which bloated the chain.
as many try martingale wth dice sites i think this would happen with this contract.

and what's going to happen to all these new Block Chain Piggypack schemes(counterparty, color coins, etc.)?

it poses a huge systemic risk to Bitcoin and many other serious dangers I wont get into here.

-bm

Just who IS bluemeanie?    On NXTautoDAC and a Million Stolen NXT

feel like your voice isn't being heard? PM me.   |   stole 1M NXT?
bluemeanie1
Sr. Member
****
Offline Offline

Activity: 280
Merit: 257


bluemeanie


View Profile WWW
May 19, 2014, 11:27:19 PM
 #14

Thanks. But I guess there must be tools that convert high level Turing-complete languages to low-level BTCscript code. Right?

One of the main selling point of Ethereum, as I understand, is that their Turing-complete programmable system permits writing complex contracts.

Where/what are the use-cases for these complex contracts?


that was part of my case in the thread I linked above.

They are(were?) trying to create an environment for scripting a block chain but are ignoring the massive computational complexities that these problems imply.  The only way to achieve these functions is on a case-by-case basis.  Each one has distinct processor/storage/usability requirements.

-bm

Just who IS bluemeanie?    On NXTautoDAC and a Million Stolen NXT

feel like your voice isn't being heard? PM me.   |   stole 1M NXT?
Peter R
Legendary
*
Offline Offline

Activity: 1162
Merit: 1007



View Profile
May 19, 2014, 11:58:00 PM
 #15

just-dice could be completly onchain (including user deposits for bankroll and interest).
but most know what happend when satoshi-dice was onchain Wink
Actually I don't. What happened?

I posted this in another thread, but I think it answers your question:



The above chart is distorted by the "on-chain" gambling bubble of mid 2012 to mid 2013.  Most gambling now takes place off-chain (in fact, just-dice.com processes over 100 bets per second).  If we attempt to remove the "on-chain gambling" bubble to get a better sense of organic growth in the number of transactions per day in the bitcoin economy, we finds its been growing exponentially at approximately 320% per year.  


Run Bitcoin Unlimited (www.bitcoinunlimited.info)
gmaxwell
Staff
Legendary
*
Online Online

Activity: 4158
Merit: 8411



View Profile WWW
May 20, 2014, 12:01:05 AM
 #16

I think we'll never know what really happened there. SD's traffic fell off almost instantly with the change back to private ownership. I believe, and I think that the data supports, that there was activity going on to pump the level of traffic there— though for what exact motivations are anyone's guess. Smiley Hideously inefficient in any case, and not even necessary for security.
bluemeanie1
Sr. Member
****
Offline Offline

Activity: 280
Merit: 257


bluemeanie


View Profile WWW
May 20, 2014, 12:04:31 AM
 #17

also related to the COIN_DUST episode.  It raises the basic question of - what is *clever use* of Bitcoin and what is *abuse* of Bitcoin.

we're about to explore that territory and I dont think some parties are going to like the answer.

-bm

Just who IS bluemeanie?    On NXTautoDAC and a Million Stolen NXT

feel like your voice isn't being heard? PM me.   |   stole 1M NXT?
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
May 20, 2014, 12:10:57 AM
 #18

Actually I don't. What happened?

(And if whatever it was doing was done on bitcoin, you didn't answer my original question about ethereum)

too much transaction which bloated the chain.
as many try martingale wth dice sites i think this would happen with this contract.

Well there is no such thing as too many transactions.  The problem was that the site used a "payment" of a single satoshi as notification that a player lost.  This bloats the UXTO which is a more critical resources.  Spent tx can be pruned but to validate future txs and blocks nodes need to maintain a copy of the UXTO.  Normally most outputs in the UXTO are eventually spent (and create new outputs) so the UXTO grows much slower than the overall blockchain.  The problem with single satoshi outputs is they are never economical to spend so they probably will never spend.  This means the UXTO starts growing on the same order as the overall blockchain.

Site like this are one reason the dust rules were created.  They discourage creating outputs that will probably never be spent to prevent them from remaining in the UXTO forever.
onemorebtc
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250


View Profile
May 20, 2014, 12:15:49 AM
 #19

Actually I don't. What happened?

(And if whatever it was doing was done on bitcoin, you didn't answer my original question about ethereum)

too much transaction which bloated the chain.
as many try martingale wth dice sites i think this would happen with this contract.

Well there is no such thing as too many transactions.  The problem was that the site used a "payment" of a single satoshi as notification that a player lost.  This bloats the UXTO which is a more critical resources.  Spent tx can be pruned but to validate future txs and blocks nodes need to maintain a copy of the UXTO.  Normally most outputs in the UXTO are eventually spent (and create new outputs) so the UXTO grows much slower than the overall blockchain.  The problem with single satoshi outputs is they are never economical to spend so they probably will never spend.  This means the UXTO starts growing on the same order as the overall blockchain.

Site like this are one reason the dust rules were created.  They discourage creating outputs that will probably never be spent to prevent them from remaining in the UXTO forever.

thanks DnT for clarifying.

but i think my point about some (eg dice-like) contracts would create many more transactions still stands. afaik there is no coin which could handle a large  tx volume (though 100 bets/sec might be possible in the future).

transfer 3 onemorebtc.k1024.de 1
bluemeanie1
Sr. Member
****
Offline Offline

Activity: 280
Merit: 257


bluemeanie


View Profile WWW
May 20, 2014, 12:17:35 AM
 #20

Actually I don't. What happened?

(And if whatever it was doing was done on bitcoin, you didn't answer my original question about ethereum)

too much transaction which bloated the chain.
as many try martingale wth dice sites i think this would happen with this contract.

Well there is no such thing as too many transactions.

surely there must be SOME limit there.  We can't be sending terabytes of transactions data to all nodes at all times.  The problem may seem remote until you start to see transactions multiply by number of coin colors + whatever other sorts of trading applications and the like emerge.  You can't just stick anything you want on the blockchain.  This poses a systemic risk to Bitcoin.

transactions don't require a limit for so long as they reflect the value of the currency.  These other 'rider' networks like Color Coins don't necessarily have any relationship to the price of BTC at all and that's going to be the basic problem from which many technological issues will emerge.

-bm

Just who IS bluemeanie?    On NXTautoDAC and a Million Stolen NXT

feel like your voice isn't being heard? PM me.   |   stole 1M NXT?
Pages: [1] 2 3 4 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!