Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: CristianOff on December 02, 2019, 09:41:12 PM



Title: Why don't we have bitcoin smart contract?
Post by: CristianOff on December 02, 2019, 09:41:12 PM
I'm really thinking on how I can improve Bitcoin to project it to "the next stage"
I'm so jealous Ethereum has smart contracts. I want Bitcoin DAPPS. Can we not have a Layer 3 running an
EVM machine on top of both Bitcoin and lightening network?

It sounds achievable. Any criticism on what would be the problem with this from a technical point of view?
Anyone want to join as core team members?


Title: Re: Why don't we have bitcoin smart contract?
Post by: pooya87 on December 03, 2019, 03:53:28 AM
I'm so jealous Ethereum has smart contracts. I want Bitcoin DAPPS.
i honestly don't see the attraction in what ethereum has. specially since so far in the past 5 years of ethereum's existence i have not seen even a single DApps that were remotely interesting or were doing anything meaningful!
so if you want to expand bitcoin's script language, you first have to show us where the attraction or need for it is. Vitalik tried for a couple of years to do that in bitcoin and failed...

answer these questions first:
- what would more complex smart contracts (than what bitcoin can currently create) solve?
- what would be the use case of it in real world?
remember that just creating scam ICOs like ethereum is not a reason to do it!

Quote
Can we not have a Layer 3 running an EVM machine on top of both Bitcoin and lightening network?
we already have sidechains and there is at least one project i know of called Rootstock


Title: Re: Why don't we have bitcoin smart contract?
Post by: buwaytress on December 03, 2019, 11:24:55 AM
There is definitely one smart contract I'd like for Bitcoin: escrow. We're talking about Bitcoin as a payment tool and (trustless) escrow has got to be one of the things left to develop properly for Bitcoin. I remember first reading about Rootstock (mentioned by Pooya) at some point even in 2016/17 said that they were developing it for that precise usage. Think even Counterparty was supposed to have something like this.

A simple Ethereum script for it has existed for some time. But not for Bitcoin (to my knowledge). I can see that smart contract being put to use daily on this forum, for example. Or for inheritance (if I don't sign my wallet for 7 years, it releases to an heir, for example).

Or do these already exist?


Title: Re: Why don't we have bitcoin smart contract?
Post by: pooya87 on December 03, 2019, 11:36:57 AM
There is definitely one smart contract I'd like for Bitcoin: escrow.

Code:
OP_2 <Alice_pubkey><Bob_pubkey><Escro_pubkey> OP_3 OP_CHECKMULTISIGVERIFY
This "smart contract" has existed in bitcoin for a very long time! you can also add additional conditions to it such as time with a locktime (OP_CHECKLOCKTIMEVERIFY)

is there anything specific you have in mind?

Or for inheritance (if I don't sign my wallet for 7 years, it releases to an heir, for example).
Code:
OP_DUP OP_HASH160 <hash_of_your_pubkey> OP_EQUAL
OP_IF
    OP_CheckSig
OP_ELSE
   <locktime=7years> OP_CheckLocktimeVerify OP_DROP OP_DUP OP_HASH160 <hash_of_your_heir's_pubkey>
   OP_EQUALVERIFY OP_CheckSig
OP_ENDIF

if "you" wanted to spend it, you simply provide a <signature><pubkey> using your own private key. if your heir wanted to claim this they have to first wait for the locktime to be reached then provide their own <signature><pubkey>.


Title: Re: Why don't we have bitcoin smart contract?
Post by: HeRetiK on December 03, 2019, 01:30:46 PM
I think OP might be interested in Simplicity:
https://github.com/ElementsProject/simplicity

It's still a long way out but should eventually offer the capabilities of Ethereum-like smart-contracts without the pitfalls that turing-completeness brings.

(keeping in mind that a language does not necessarily need to be turing-complete to be powerful and expressive. matter of fact most critical infrastructure such as military and aeronautical applications follow code conventions that explicitely try to avoid patterns usually associated with turing-completeness such as recursion)


Title: Re: Why don't we have bitcoin smart contract?
Post by: mda on December 03, 2019, 04:25:52 PM
There is definitely one smart contract I'd like for Bitcoin: escrow. We're talking about Bitcoin as a payment tool and (trustless) escrow has got to be one of the things left to develop properly for Bitcoin. I remember first reading about Rootstock (mentioned by Pooya) at some point even in 2016/17 said that they were developing it for that precise usage. Think even Counterparty was supposed to have something like this.

A simple Ethereum script for it has existed for some time. But not for Bitcoin (to my knowledge). I can see that smart contract being put to use daily on this forum, for example. Or for inheritance (if I don't sign my wallet for 7 years, it releases to an heir, for example).

Or do these already exist?
A sort of escrow could be 2-of-2 multisig where seller puts one price and buyer puts two prices. But for it to be efficient both funding transactions should be included in the same block. Meaning that besides the usual transaction hash its counter-party transaction hash also should appear in the Merkle tree.


Title: Re: Why don't we have bitcoin smart contract?
Post by: CristianOff on December 03, 2019, 08:26:15 PM
Thanks everyone for sharing so much meaningful information. I really feel that I got more information that I really wanted to be
aware of, yet it is not as promoted / marketed to the masses. I didn't know about Bitcoin already implementing the escrow thing,
nor did I know about RKS, Omni layer , simplicity and scripts.

What do you think is the next step in this industry? I don't believe it is "mature" yet and there is such a big gap left. We should really
start working on user experience. A Steve Jobs mind would help this be more than just peer to peer cash or an asset. I really think
users coming from backgrounds are not really interested in the "hashing" and all the logic, they just want something to work and this
bitcoin has everything to work, we just need to make people "enjoy it".

Or do you guys believe that my "view" on bitcoin is not as realist and in reality bitcoin is actually working as expected? I just want it
massively adopted! MASSIVELY. Billions of people.


Title: Re: Why don't we have bitcoin smart contract?
Post by: Tramirostronix on December 03, 2019, 08:56:46 PM
Thanks everyone for sharing so much meaningful information. I really feel that I got more information that I really wanted to be
aware of, yet it is not as promoted / marketed to the masses. I didn't know about Bitcoin already implementing the escrow thing,
nor did I know about RKS, Omni layer , simplicity and scripts.

What do you think is the next step in this industry? I don't believe it is "mature" yet and there is such a big gap left. We should really
start working on user experience. A Steve Jobs mind would help this be more than just peer to peer cash or an asset. I really think
users coming from backgrounds are not really interested in the "hashing" and all the logic, they just want something to work and this
bitcoin has everything to work, we just need to make people "enjoy it".

Or do you guys believe that my "view" on bitcoin is not as realist and in reality bitcoin is actually working as expected? I just want it
massively adopted! MASSIVELY. Billions of people.

I can understand your vision but I don't get why smart contracts for bitcoin will help the adoption ? you are talking of billions of people so lambda people I guess.
People do not need to know that bitcoin has smart contracts and they even don"t need to know what a smart contract is.
To use internet you don't need to know the OSI structure  ;)


Title: Re: Why don't we have bitcoin smart contract?
Post by: HeRetiK on December 03, 2019, 10:08:26 PM
Thanks everyone for sharing so much meaningful information. I really feel that I got more information that I really wanted to be
aware of, yet it is not as promoted / marketed to the masses. I didn't know about Bitcoin already implementing the escrow thing,
nor did I know about RKS, Omni layer , simplicity and scripts.

Most of this is still highly experimental technology so there's no sense in marketing it to the masses (yet). Also, once these technologies are ready for the masses (in terms of maturity and usability), if all goes well they won't be aware that they are using these technologies to begin with.

Case in point: You have never heard of OMNI but you're probably aware of Tether. Well, it's an OMNI token.


We should really start working on user experience.

Lots of wallet projects working on that front. And it makes sense, because that's the part that is facing the user. Smart contracts, DApps? Your average user couldn't care less.



To use internet you don't need to know the OSI structure  ;)

Well one should be aware of at least layer 1 if the router is supposed to work ;D


Title: Re: Why don't we have bitcoin smart contract?
Post by: cryptied on December 04, 2019, 02:41:50 AM
I remember there was one more language (besides Solidity and Bitcoin script) for writing Bitcoin smart contracts. They often referred to it when Solidity came. Can't for the life of me recall the name or even find it anywhere but it was some sort of 3-letter acronym. Does anyone know?


Title: Re: Why don't we have bitcoin smart contract?
Post by: pooya87 on December 04, 2019, 04:16:01 AM
i honestly don't see the attraction in what ethereum has. specially since so far in the past 5 years of ethereum's existence i have not seen even a single DApps that were remotely interesting or were doing anything meaningful!

You don't find DEX and Casino interesting ?

as far as i can tell you can not trade altcoins in any of these so called DEXes built on top of ethereum. the only thing you can trade is tokens that are created on that platform aka ERC20 tokens. i don't see the point in such exchange apart from letting people dump their ICO tokens!
i don't have much information about casinos, i have only seen them on Byteball and the idea seemed interesting. so i'll give you that.

What do you think is the next step in this industry? I don't believe it is "mature" yet and there is such a big gap left.
one thing about bitcoin that you should keep in mind is that it is a currency and as a payment system it has no need for very complicated and feature rich smart contracts.


Title: Re: Why don't we have bitcoin smart contract?
Post by: Wind_FURY on December 04, 2019, 06:35:02 AM
OP, Lightning channels are essentially smart contracts between users that serves the biggest use-case for cryptocurrencies. Payments.

Ethereum "DAPPS" are "show and tell" things you can use, but will not replace their centralized counterparts.


Title: Re: Why don't we have bitcoin smart contract?
Post by: amishmanish on December 04, 2019, 07:36:33 AM
While bitcoin may not have "smart-contract" implementation, there have been multiple initiatives in implementing smart contract as a bitcoin sidechain. Rootstock was talked about a lot once. Then there was the language Simplicity. I am not sure what is the progress on these concepts.

These were meaningful extensions of the bitcoin network. Although, we seem to have gone full "Bitcoin should only be used as SoV", a lot of original developers are the ones who diversified this vision too. In a way, they are all part of bitcoin.
The best scenario for crypto-economy would be to have the Pro-Dapp community and the maximalist community on the same page.
Links:
RSK Smart contracts  (https://www.rsk.co/)
 Simplicity whitepaper  (https://blockstream.com/simplicity.pdf)


Title: Re: Why don't we have bitcoin smart contract?
Post by: buwaytress on December 04, 2019, 08:13:46 AM
Thank you pooya for that! As usual you have a lot to share=) See, all the other times I've actually asked, I don't ever recall getting the answer, but I think the arguments some have presented stand.

What you shared, again, are scripts, and not the sort of straightforward smart contract (and as someone pointed out not Turing complete either).

Don't get me wrong, I love those solutions but as a very low-end Bitcoiner, I would be far from confident enough to attempt those scripts, much less hope the same for someone else I intend to pass my inheritance to. I consider myself the highest level technical knowledge you could possibly expect from a mainstream user: we know how to sign and broadcast txs, we know how to spend particular inputs, we know RBF, CPFP, and we're just starting to get used to LN.

But the smart contract platforms people talk about make escrow smart contracts just easy to use, safe, simple. IF the scripts you just shared are so easy to use (they're not for me), why isn't it brought up to be used more often in the p2p trades this forum sees every day? We're still heavily reliant on hiring forum escrowers for big trades.



Title: Re: Why don't we have bitcoin smart contract?
Post by: Tramirostronix on December 04, 2019, 09:53:12 AM
While bitcoin may not have "smart-contract" implementation, there have been multiple initiatives in implementing smart contract as a bitcoin sidechain. Rootstock was talked about a lot once. Then there was the language Simplicity. I am not sure what is the progress on these concepts.

These were meaningful extensions of the bitcoin network. Although, we seem to have gone full "Bitcoin should only be used as SoV", a lot of original developers are the ones who diversified this vision too. In a way, they are all part of bitcoin.
The best scenario for crypto-economy would be to have the Pro-Dapp community and the maximalist community on the same page.
Links:
RSK Smart contracts  (https://www.rsk.co/)
 Simplicity whitepaper  (https://blockstream.com/simplicity.pdf)

Thanks for the links I will take a look too.
You don't hear a lot about project based on Bitcoin because of Ethereum.
And the last project (even if it is different ) Bitcoin based I heard about was "stratis" but ... They are dead , right ?


Title: Re: Why don't we have bitcoin smart contract?
Post by: ABCbits on December 04, 2019, 01:10:32 PM
But the smart contract platforms people talk about make escrow smart contracts just easy to use, safe, simple. IF the scripts you just shared are so easy to use (they're not for me), why isn't it brought up to be used more often in the p2p trades this forum sees every day? We're still heavily reliant on hiring forum escrowers for big trades.

pooya87's script is about 2-of-3 multi signature address and you already can use it easily (without need to know about scripting) by using wallet which support multi signature wallet such as Electrum.

And obviously hiring escrow is still needed.


Title: Re: Why don't we have bitcoin smart contract?
Post by: Tramirostronix on December 04, 2019, 06:08:37 PM
But the smart contract platforms people talk about make escrow smart contracts just easy to use, safe, simple. IF the scripts you just shared are so easy to use (they're not for me), why isn't it brought up to be used more often in the p2p trades this forum sees every day? We're still heavily reliant on hiring forum escrowers for big trades.

pooya87's script is about 2-of-3 multi signature address and you already can use it easily (without need to know about scripting) by using wallet which support multi signature wallet such as Electrum.

And obviously hiring escrow is still needed.

Of course, escrow is a huge + of blockchain so no reason to stop it  :)
After you just need to be careful when you choose your escrow guy ..
But be careful when you put your trust in someone is what we do everyday ..


Title: Re: Why don't we have bitcoin smart contract?
Post by: pooya87 on December 05, 2019, 03:50:40 AM
Don't get me wrong, I love those solutions but as a very low-end Bitcoiner, I would be far from confident enough to attempt those scripts, much less hope the same for someone else I intend to pass my inheritance to. I consider myself the highest level technical knowledge you could possibly expect from a mainstream user:

even if you were high-end expert you still shouldn't have to be using scripts that you write by hand. there should always be a user friendly tool where it takes the inputs needed for creation of the script and then returns the  final transaction. for example to use the escrow (m of n multisig) script you can use the user friendly wallet called Electrum where you just import your master keys and m, the wallet does everything else.

otherwise it would not only take a lot of time but also you may easily make a lot of mistakes. for example  as an experiment and also to answer a question i recently created a script using OP_CLV and send some funds to it on testnet and then spent them. the whole thing took me about 1.5 hours and i messed up the first time and lost the first coins, they are now locked forever!!! here is the link: https://bitcointalk.org/index.php?topic=5205451.msg53211121#msg53211121


Title: Re: Why don't we have bitcoin smart contract?
Post by: Tramirostronix on December 05, 2019, 10:30:10 AM
Don't get me wrong, I love those solutions but as a very low-end Bitcoiner, I would be far from confident enough to attempt those scripts, much less hope the same for someone else I intend to pass my inheritance to. I consider myself the highest level technical knowledge you could possibly expect from a mainstream user:

even if you were high-end expert you still shouldn't have to be using scripts that you write by hand. there should always be a user friendly tool where it takes the inputs needed for creation of the script and then returns the  final transaction. for example to use the escrow (m of n multisig) script you can use the user friendly wallet called Electrum where you just import your master keys and m, the wallet does everything else.

otherwise it would not only take a lot of time but also you may easily make a lot of mistakes. for example  as an experiment and also to answer a question i recently created a script using OP_CLV and send some funds to it on testnet and then spent them. the whole thing took me about 1.5 hours and i messed up the first time and lost the first coins, they are now locked forever!!! here is the link: https://bitcointalk.org/index.php?topic=5205451.msg53211121#msg53211121


And of course if you don't understand something or are afraid, you will not use it. Cryptocurrencies need to be easy to use if we want to get an adopation....
Thanks for the other link too :)


Title: Re: Why don't we have bitcoin smart contract?
Post by: buwaytress on December 05, 2019, 07:22:48 PM
@ETF BTC but that's... the thing. I can't expect my heir to learn multisig, and the whole point was to avoid hiring an escrow =)


even if you were high-end expert you still shouldn't have to be using scripts that you write by hand. there should always be a user friendly tool where it takes the inputs needed for creation of the script and then returns the  final transaction. for example to use the escrow (m of n multisig) script you can use the user friendly wallet called Electrum where you just import your master keys and m, the wallet does everything else.

otherwise it would not only take a lot of time but also you may easily make a lot of mistakes. for example  as an experiment and also to answer a question i recently created a script using OP_CLV and send some funds to it on testnet and then spent them. the whole thing took me about 1.5 hours and i messed up the first time and lost the first coins, they are now locked forever!!! here is the link: https://bitcointalk.org/index.php?topic=5205451.msg53211121#msg53211121

I guess, this process is what I mean by a "smart contract" or dapp (trust me I hate using those words)... I have used such an escrow smart contract (not on Bitcoin but on an alt client) and it was breathtakingly straightforward, the whole thing gave instructions so I never even needed a manual...

But you're right, and that's why, even if it is quite simple to see and achieve as you and others demonstrate, it is still risky enough for someone like me to attempt with serious amounts. As it is, even simple transactions take me some minutes to double triple check!;)


Title: Re: Why don't we have bitcoin smart contract?
Post by: malevolent on December 06, 2019, 08:59:41 PM
I remember there was one more language (besides Simpicity and Bitcoin script) for writing Bitcoin smart contracts. They often referred to it when Solidity came. Can't for the life of me recall the name or even find it anywhere but it was some sort of 3-letter acronym. Does anyone know?

Maybe Miniscript is what you're thinking about?

http://bitcoin.sipa.be/miniscript/

Or OTX (Open Transactions)

https://github.com/FellowTraveler/opentxs

Or colored coins (that one didn't pan out, IIRC).


Title: Re: Why don't we have bitcoin smart contract?
Post by: TechPriest on December 08, 2019, 12:12:32 PM
@ETF BTC but that's... the thing. I can't expect my heir to learn multisig, and the whole point was to avoid hiring an escrow =)

It's easy to create such contract without multisig

Code:
<needed time> OP_CLTV OP_DROP <pubkey> OP_CHECKSIG

With ordinary locktime, your heir must keep signed transaction and also his (recepient) privatekey. In example above he's only need to keep privatekey (if he generate redeem script by himself) or privatekey + redeem script (if it was generated by you).

But in case above you can forget about your money before needed time and even if you don't want to give away your money to your heir. So, we need to create script where you can spend your money in some cases.

pooya87's example is the closest one to such conditions. But without multisig, of course. BUT: his script is for P2PKH address (pub key hash, in P2SH we must provide pubkey), so i woud not recommend to use it. We have such conversation in our local russian topic, and one user, Balthazar, said that most of bitcoin core nodes will reject P2PKH non standard scripts, so without mining powers or at least without friends in a big mining pool you're not will be able to confirm such transaction.


Title: Re: Why don't we have bitcoin smart contract?
Post by: pooya87 on December 08, 2019, 03:03:51 PM
@ETF BTC but that's... the thing. I can't expect my heir to learn multisig, and the whole point was to avoid hiring an escrow =)

It's easy to create such contract without multisig

Code:
<needed time> OP_CLTV OP_DROP <pubkey> OP_CHECKSIG

With ordinary locktime, your heir must keep signed transaction and also his (recepient) privatekey. In example above he's only need to keep privatekey (if he generate redeem script by himself) or privatekey + redeem script (if it was generated by you).

But in case above you can forget about your money before needed time and even if you don't want to give away your money to your heir. So, we need to create script where you can spend your money in some cases.

pooya87's example is the closest one to such conditions. But without multisig, of course. BUT: his script is for P2PKH address (pub key hash, in P2SH we must provide pubkey), so i woud not recommend to use it. We have such conversation in our local russian topic, and one user, Balthazar, said that most of bitcoin core nodes will reject P2PKH non standard scripts, so without mining powers or at least without friends in a big mining pool you're not will be able to confirm such transaction.

let's not confuse P2SH with multi-sig, the latter is only a subcategory of a wider range of scripts called pay to script hash. also your script will lock up his funds and can ONLY be unlocked by the heir. when inheritance is involved you want to continued having control over your own money until you are alive and only give it up after you pass away. if you lock it up with this script you are giving it up NOW.

Quote
his script is for P2PKH address (pub key hash, in P2SH we must provide pubkey)
there is no "address" for uncommon scripts. addresses are only defined for the most common scripts.
additionally the script i posted was not P2PKH, it can't be since it is not OP_DUP HASH160 <> EQUALVERIFY CHECKSIG! it is a "scriptpub".
and finally there is no "must" in scripts, you can provide whatever you like. not to mention that the script included hash of pubkey not the pubkey itself. you can change the hashes with pubkeys and use it as a redeem script for a P2SH scriptpub


Title: Re: Why don't we have bitcoin smart contract?
Post by: CristianOff on December 08, 2019, 04:33:58 PM
Thanks everyone for sharing so much meaningful information. I really feel that I got more information that I really wanted to be
aware of, yet it is not as promoted / marketed to the masses. I didn't know about Bitcoin already implementing the escrow thing,
nor did I know about RKS, Omni layer , simplicity and scripts.

Most of this is still highly experimental technology so there's no sense in marketing it to the masses (yet). Also, once these technologies are ready for the masses (in terms of maturity and usability), if all goes well they won't be aware that they are using these technologies to begin with.

Case in point: You have never heard of OMNI but you're probably aware of Tether. Well, it's an OMNI token.


We should really start working on user experience.

Lots of wallet projects working on that front. And it makes sense, because that's the part that is facing the user. Smart contracts, DApps? Your average user couldn't care less.



To use internet you don't need to know the OSI structure  ;)

Well one should be aware of at least layer 1 if the router is supposed to work ;D

I merited because of last joke which put a huge smile on my face as I am studying data-link and network layer for my last year exam on Friday 13th  :o
 Also because of the OMNI. I never heard about OMNI and yet is so interesting. This is such a powerful project, I don't know how it's not super famous yet. Thank you so much for sharing
For anyone interested here is the link https://www.omnilayer.org/


Title: Re: Why don't we have bitcoin smart contract?
Post by: Tramirostronix on December 09, 2019, 10:49:48 AM
Thanks everyone for sharing so much meaningful information. I really feel that I got more information that I really wanted to be
aware of, yet it is not as promoted / marketed to the masses. I didn't know about Bitcoin already implementing the escrow thing,
nor did I know about RKS, Omni layer , simplicity and scripts.

Most of this is still highly experimental technology so there's no sense in marketing it to the masses (yet). Also, once these technologies are ready for the masses (in terms of maturity and usability), if all goes well they won't be aware that they are using these technologies to begin with.

Case in point: You have never heard of OMNI but you're probably aware of Tether. Well, it's an OMNI token.


We should really start working on user experience.

Lots of wallet projects working on that front. And it makes sense, because that's the part that is facing the user. Smart contracts, DApps? Your average user couldn't care less.



To use internet you don't need to know the OSI structure  ;)

Well one should be aware of at least layer 1 if the router is supposed to work ;D

I merited because of last joke which put a huge smile on my face as I am studying data-link and network layer for my last year exam on Friday 13th  :o
 Also because of the OMNI. I never heard about OMNI and yet is so interesting. This is such a powerful project, I don't know how it's not super famous yet. Thank you so much for sharing
For anyone interested here is the link https://www.omnilayer.org/
Good luck with your exams  ;)
after omni was famous years ago I think but not so much now and the copyright in the footer is 2017 so ...
But they still have some github activity and still working on it it seems


Title: Re: Why don't we have bitcoin smart contract?
Post by: TechPriest on December 09, 2019, 12:25:10 PM
additionally the script i posted was not P2PKH, it can't be since it is not OP_DUP HASH160 <> EQUALVERIFY CHECKSIG! it is a "scriptpub".


Code:
OP_DUP OP_HASH160 <hash_of_your_pubkey> OP_EQUAL
OP_IF
    OP_CheckSig
OP_ELSE
   <locktime=7years> OP_CheckLocktimeVerify OP_DROP OP_DUP OP_HASH160 <hash_of_your_heir's_pubkey>
   OP_EQUALVERIFY OP_CheckSig
OP_ENDIF

Maybe i get something wrong, because i'm not very good in english.

Edit: I have understood what you're talking about. You're right, but i'm right too: such script will not be mined with very high probability.

and finally there is no "must" in scripts, you can provide whatever you like.

Yes, but if other nodes will not retranslate it (transaction) and miners will not mine it - there is no much sense to "provide whatever i want". And my message was about that.
In theory, you can add to ScriptPubKey whatever you want (i'm about active Op codes). But in practice, we have something like that:

B peaлизaции пpoвepки нa cтaндapтнocть чёткo oпpeдeлён шaблoн cкpиптa P2PKH:

https://github.com/bitcoin/bitcoin/blob/master/src/script/standard.cpp#L60
https://github.com/bitcoin/bitcoin/blob/master/src/script/standard.cpp#L138

If transaction doesn't match this standards when it's "nonstandard" with all it problems.


Title: Re: Why don't we have bitcoin smart contract?
Post by: malevolent on December 09, 2019, 08:00:59 PM
Colored coins isn't language to make Bitcoin script

No, I was just mentioning it in the context of smart contracts, maybe it would ring a bell to the OP.


Title: Re: Why don't we have bitcoin smart contract?
Post by: pooya87 on December 10, 2019, 03:17:18 AM
If transaction doesn't match this standards when it's "nonstandard" with all it problems.

that is a very good point.
i honestly am not so sure which scripts bitcoin core considered non-standard by default. i may be misunderstanding the c++ code of it but it seems like it could consider OP_CLV as non-standard which is weird because i have seen people make this type of transaction.


Title: Re: Why don't we have bitcoin smart contract?
Post by: TechPriest on December 14, 2019, 09:01:54 AM
i honestly am not so sure which scripts bitcoin core considered non-standard by default. i may be misunderstanding the c++ code of it but it seems like it could consider OP_CLV as non-standard which is weird because i have seen people make this type of transaction.

I read few articles, and it looks like that every P2PKH output will be considered as "nonstandard" if it not following standard scheme (which i linked above)

Here some explaining from Achow101: https://bitcoin.stackexchange.com/questions/81623/non-standard-transaction-scripts-broadcasting

OP_CLTV is nonstadard in P2PKH. But standard in P2SH. Ordinary locktime is standard too, but it's not an opcode, just a special field (just a number) in transaction.


Title: Re: Why don't we have bitcoin smart contract?
Post by: hv_ on January 02, 2020, 11:17:10 AM
Bitcoin is mostly complete

This guy has proven a lot

https://mobile.twitter.com/clemensley

And that


https://mobile.twitter.com/oudekaas3/status/1212704501804781568