Bitcoin Forum
May 02, 2024, 04:33:43 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin is programmable, just not Turing complete, correct?  (Read 202 times)
MoneyBomber (OP)
Jr. Member
*
Offline Offline

Activity: 105
Merit: 6


View Profile
January 10, 2023, 12:50:55 PM
Merited by BlackHatCoiner (4), Welsh (1), ABCbits (1)
 #1

As far as I understand, Bitcoin is programmable, just not Turing complete.
But what's the point of Turing completeness if the gas limits everything already? Why not just repeat the statement in code? Or "Goto" and "Label"?
Are you telling me the EVM's only reason for success is that it was just more palatable to developers and what they believed about how smart contract ought to be?
"Bitcoin: the cutting edge of begging technology." -- Giraffe.BTC
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714667623
Hero Member
*
Offline Offline

Posts: 1714667623

View Profile Personal Message (Offline)

Ignore
1714667623
Reply with quote  #2

1714667623
Report to moderator
1714667623
Hero Member
*
Offline Offline

Posts: 1714667623

View Profile Personal Message (Offline)

Ignore
1714667623
Reply with quote  #2

1714667623
Report to moderator
1714667623
Hero Member
*
Offline Offline

Posts: 1714667623

View Profile Personal Message (Offline)

Ignore
1714667623
Reply with quote  #2

1714667623
Report to moderator
NotATether
Legendary
*
Offline Offline

Activity: 1596
Merit: 6722


bitcoincleanup.com / bitmixlist.org


View Profile WWW
January 10, 2023, 12:59:41 PM
Merited by pooya87 (2), Welsh (2), ABCbits (1)
 #2

I guess you're wondering why alt developers decided to add smart contracts, right?

Well for whatever reason, they think they will "enhance" their blockchain, but the problem with that thinking is, you have full-fledged Turing complete programming languages, some backed by tech giants (e.g. Dart by Google) that just fail, because most people aren't interested in using them. So at the end of the day, it always comes down to the willingness of users (or in this case, developers) to use them.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
January 10, 2023, 04:09:47 PM
Merited by Welsh (2)
 #3

Bitcoin is programmable in that it has a fixed number of scripts that can be used for sending transactions.

It also has a part of the transaction left unassigned which could be filled with an identifier (such as for storing tokens) and there are more advanced things normal bitcoin scripts can do when put together (such as how the lightning network works).

If "the gas limits everything" switch chains or get the developer to. Harmony seemed cheap last time i used it (and it's what eth seems to want to become). Solana and eos are also cheap - don't trust anything but bitcoin for long term storage though.
mendace
Sr. Member
****
Offline Offline

Activity: 462
Merit: 613


Pizza Maker 2023 | Bitcoinbeer.events


View Profile WWW
January 10, 2023, 07:42:14 PM
Merited by Welsh (1)
 #4

You are correct that Bitcoin is programmable but it is not Turing-complete. This means that the Bitcoin script has a limited set of capabilities compared to a Turing-complete language. One of the main differences is that Bitcoin script does not support loops, which can make it more difficult to create complex programs.
Regarding the gas limits, it is true that gas is used as a mechanism to prevent infinite loops or other computations that could cause the Ethereum network to slow down or crash. Each operation in the EVM requires a certain amount of gas, and the total amount of gas that can be used by a smart contract is limited by the block gas limit. However, Turing completeness allows for more flexibility in the design of smart contract, it allows programmers to write code that has much more capability of doing complicated tasks that can be more flexible for different use cases.
AverageGlabella
Legendary
*
Offline Offline

Activity: 1232
Merit: 1080


View Profile
January 12, 2023, 08:50:19 PM
Merited by Welsh (4), BlackHatCoiner (4), ABCbits (1)
 #5

It probably was created that way to prevent malicious attacks. Infinite loops is just one of the most known type of attacks but turing compelte scripting languages allow for more than just infinite loop attacks. DDOS attacks could be executed with turing complete languages as well smart contract attacks which are self-executing contracts with terms hard coded. Reentrancy attacks[1] are another thing that turing complete languages allow to execute that Bitcoin does not make possible.

Altcoins which are turing complete might cause more problems than it is worth security wise.


[1] https://hackernoon.com/hack-solidity-reentrancy-attack
BitDane
Sr. Member
****
Offline Offline

Activity: 1372
Merit: 348


View Profile WWW
January 13, 2023, 11:21:19 AM
 #6

As far as I understand, Bitcoin is programmable, just not Turing complete.

You are right Bitcoin scripting language is not turing complete which means some application won't run in Bitcoin Network.  I believe this is done to make the network more stable and secure.

Quote
But what's the point of Turing completeness if the gas limits everything already? Why not just repeat the statement in code? Or "Goto" and "Label"?

Gas limits the infinite loop as the early reply stated, furthermore the use of Goto and Label can cause infinite loops and other problems that can be exploited by hackers to attack the network.

Are you telling me the EVM's only reason for success is that it was just more palatable to developers and what they believed about how smart contract ought to be?

EVM has a significant impact  on the development of blockchain technology and smart contracts, it also enable developers to build complex decentralized application or what we called dapps.

EVM is clearly explained here: https://cointelegraph.com/news/what-is-an-ethereum-virtual-machine-evm-and-how-does-it-work
BlackHatCoiner
Legendary
*
Online Online

Activity: 1512
Merit: 7340


Farewell, Leo


View Profile
January 13, 2023, 12:39:02 PM
Merited by ABCbits (1)
 #7

You can extend smart contract compatibility off-chain. What I like about Bitcoin is that we're safe from attackers who wish to have us execute arbitrary code. Script is limited on purpose. The main layer is a living giant that can't be exploited to known (and yet unknown) Turing-complete weaknesses.

Rootstock is a sidechain that allows you to develop your DeFi applications, with EVM compatibility. I like how they put it:
Quote
EVM-compatible smart contracts platform designed for a freer, fairer, and more decentralized world.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
n0nce
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5818


not your keys, not your coins!


View Profile WWW
January 13, 2023, 02:42:56 PM
 #8

As far as I understand, Bitcoin is programmable, just not Turing complete.
But what's the point of Turing completeness if the gas limits everything already? Why not just repeat the statement in code? Or "Goto" and "Label"?
Are you telling me the EVM's only reason for success is that it was just more palatable to developers and what they believed about how smart contract ought to be?
I believe your question (which most answers actually completely missed) is: 'why don't we consider Bitcoin's scripting language and EVM's scripting language equally powerful, since neither is Turing complete due to Ethereum's gas limit?.
You do have a point, but having the ability to execute loops (while also limiting the execution time using gas) makes the contract much more compact and thus cheaper to deploy on the blockchain, than copying the loop's contents over and over (as you'd need using Bitcoin Script).

Also keep in mind that (sticking with the loop example) the number of loop executions may not be known at the time of writing the contract and depend on the user's interaction with it. So, loop unrolling is not as powerful as an actual loop made from a label and a jump instruction.

Basically, Bitcoin Script is more limited compared to cryptocurrencies tailored to smart contracts, meanwhile neither is fully Turing complete due to limited execution time. Makes sense?

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
MoneyBomber (OP)
Jr. Member
*
Offline Offline

Activity: 105
Merit: 6


View Profile
January 14, 2023, 03:51:11 PM
 #9

thank you for the answers.
This definitely makes me a BTC maxi.
n0nce
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5818


not your keys, not your coins!


View Profile WWW
January 15, 2023, 01:37:09 AM
 #10

This definitely makes me a BTC maxi.
Care to elaborate? Cheesy I mean; why do our answers about this topic make you a Bitcoin maximalist?

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
AverageGlabella
Legendary
*
Offline Offline

Activity: 1232
Merit: 1080


View Profile
January 15, 2023, 04:03:59 PM
Merited by ABCbits (1), BlackHatCoiner (1)
 #11

This definitely makes me a BTC maxi.
Care to elaborate? Cheesy I mean; why do our answers about this topic make you a Bitcoin maximalist?
I guess because our answers show that btc priorities security over features or speed? That is the only thing I can think why this would make someone prefer btc over another altcoin based on our answers.
hZti
Hero Member
*****
Offline Offline

Activity: 952
Merit: 642

Magic


View Profile
January 15, 2023, 06:37:50 PM
 #12


I guess because our answers show that btc priorities security over features or speed?

I think thats it, because why would you need features build in, if you can just implement the features off-chain. If the off-chain solutions have a rock solid foundation that is what will make bitcoin last and will make alt coins fail.
Pages: [1]
  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!