Bitcoin Forum
November 06, 2024, 02:19:00 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Port EVM Livetree #Collective smart contracts to Bitcoin network -  (Read 143 times)
Ashley.Livetree (OP)
Copper Member
Jr. Member
*
Offline Offline

Activity: 50
Merit: 3

Livetree - social network of #Collectives, founder


View Profile
December 23, 2022, 12:23:32 PM
 #1

Hi

What is the best way to port EVM based smart contracts (solidity) to Bitcoin?

Is the best way to do to use the lighting network?

Please find my repo on Github, full disclosure I am the founder of Livetree.com the app is designed for mass adoption.

The smart contracts are currently deployed to 6 EVM chains (Ethereum, Moonbeam, Moonriver, Celo, Unique, Quartz) and I think it could potentially really add traction to the mass adoption of Bitcoin - if we can support it, however, I am not sure if it is even possible.  Any technical advise and guidance would be appreciated.

Thank you.
Ashley
Pmalek
Legendary
*
Offline Offline

Activity: 2940
Merit: 7540


Playgram - The Telegram Casino


View Profile
December 23, 2022, 12:42:00 PM
 #2

I am certainly not the person to talk to about this, but I don't think it's doable on layer 1. You mentioned yourself that Ethereum uses Solidity and Bitcoin uses Bitcoin Script. So you can't import something written in Solidity on Bitcoin's layer 1 chain. Layer 2 is something totally different though. RSK, for example, supports Ethereum-native smart contracts that can be imported onto a layer 2 bitcoin chain.   

▄▄███████▄▄███████
▄███████████████▄▄▄▄▄
▄████████████████████▀░
▄█████████████████████▄░
▄█████████▀▀████████████▄
██████████████▀▀█████████
████████████████████████
██████████████▄▄█████████
▀█████████▄▄████████████▀
▀█████████████████████▀░
▀████████████████████▄░
▀███████████████▀▀▀▀▀
▀▀███████▀▀███████

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
 
Playgram.io
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

▄▄▄░░
▀▄







▄▀
▀▀▀░░
▄▄▄███████▄▄▄
▄▄███████████████▄▄
▄███████████████████▄
▄██████████████▀▀█████▄
▄██████████▀▀█████▐████▄
██████▀▀████▄▄▀▀█████████
████▄▄███▄██▀█████▐██████
█████████▀██████████████
▀███████▌▐██████▐██████▀
▀███████▄▄███▄████████▀
▀███████████████████▀
▀▀███████████████▀▀
▀▀▀███████▀▀▀
██████▄▄███████▄▄████████
███▄███████████████▄░░▀█▀
███████████░█████████░░
░█████▀██▄▄░▄▄██▀█████░
█████▄░▄███▄███▄░▄█████
███████████████████████
███████████████████████
██░▄▄▄░██░▄▄▄░██░▄▄▄░██
██░░░░██░░░░██░░░░████
██░░░░██░░░░██░░░░████
██▄▄▄▄▄██▄▄▄▄▄██▄▄▄▄▄████
███████████████████████
███████████████████████
 
PLAY NOW

on Telegram
[/
Ashley.Livetree (OP)
Copper Member
Jr. Member
*
Offline Offline

Activity: 50
Merit: 3

Livetree - social network of #Collectives, founder


View Profile
December 23, 2022, 01:08:03 PM
 #3

@Pmalek thank you that's what I thought but I was wondering if there is some way that perhaps I could use the #Collective's Treasury instead of the native token (ETH, GLMR etc) but backed by Bitcoin?

The requirements would be:

Deposit Bitcoin into a Treasury type structure (or wallet)
ERC20 tokens (perhaps wrapped?) to be able to redeem a fractional percentage

Maybe that way we dont port the entire set of smart contracts just the underlying store of value? 

Shooting in the dark here tbh.  Thanks for the help.
NotATether
Legendary
*
Offline Offline

Activity: 1778
Merit: 7362


Top Crypto Casino


View Profile WWW
December 23, 2022, 02:06:07 PM
 #4

You can't directly do this on Bitcoin because our Layer 1 does not support smart contracts at all. You need to wait for a smart-contract layer to be created for Bitcoin and then port your scripts to that.

███████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████

███████████████████████
.
BC.GAME
▄▄▀▀▀▀▀▀▀▄▄
▄▀▀░▄██▀░▀██▄░▀▀▄
▄▀░▐▀▄░▀░░▀░░▀░▄▀▌░▀▄
▄▀▄█▐░▀▄▀▀▀▀▀▄▀░▌█▄▀▄
▄▀░▀░░█░▄███████▄░█░░▀░▀▄
█░█░▀░█████████████░▀░█░█
█░██░▀█▀▀█▄▄█▀▀█▀░██░█
█░█▀██░█▀▀██▀▀█░██▀█░█
▀▄▀██░░░▀▀▄▌▐▄▀▀░░░██▀▄▀
▀▄▀██░░▄░▀▄█▄▀░▄░░██▀▄▀
▀▄░▀█░▄▄▄░▀░▄▄▄░█▀░▄▀
▀▄▄▀▀███▄███▀▀▄▄▀
██████▄▄▄▄▄▄▄██████
.
..CASINO....SPORTS....RACING..


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Ashley.Livetree (OP)
Copper Member
Jr. Member
*
Offline Offline

Activity: 50
Merit: 3

Livetree - social network of #Collectives, founder


View Profile
December 23, 2022, 11:58:09 PM
 #5

Gotcha thank you @NotATeacher I agree with you.

I think the only way to do it is with a wrapped BTC coin. I found this https://moonbeam.network/announcements/interlay-integrates-with-moonbeam/

I don’t see why we can’t pay royalties in xciBTC

I’ve not used interlay or heard of them before are they connected to the real BTC community - do you or anyone know of them and the validity of interlay? I’ll connect with the interlay team and see what they think.
pooya87
Legendary
*
Offline Offline

Activity: 3626
Merit: 11010


Crypto Swap Exchange


View Profile
December 24, 2022, 03:58:19 AM
Merited by Pmalek (1), n0nce (1)
 #6

our Layer 1 does not support smart contracts at all.
Every single bitcoin script IS a smart contract! Only certain functionalities that a "currency" does not really need are not available in bitcoin scripts.

The smart contracts are currently deployed to 6 EVM chains (Ethereum, Moonbeam, Moonriver, Celo, Unique, Quartz) and I think it could potentially really add traction to the mass adoption of Bitcoin
I disagree because none of those platforms have any adoption whatsoever except gamblers (who invest in tokens hoping profit) and scammers (who create tokens to empty other people's pockets). They have shown no real world applications so far.

█▀▀▀











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











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

Activity: 2940
Merit: 7540


Playgram - The Telegram Casino


View Profile
December 24, 2022, 07:59:26 AM
 #7

@Pmalek thank you that's what I thought but I was wondering if there is some way that perhaps I could use the #Collective's Treasury instead of the native token (ETH, GLMR etc) but backed by Bitcoin?
Sorry, I can't help you there. I have no idea what the Collective Treasury is.

I think the only way to do it is with a wrapped BTC coin.
Wrapped bitcoin and similar bitcoin-pegged tokens already exist in various forms and blockchains, but they are not bitcoin. You will hear different opinions about these assets ranging from how extremely useful they are to them being a scam, altcoin, or shit token. Locking up real bitcoin to get a bitcoin-pegged token can result in the loss of your real bitcoin if the issuers stop swapping them back. I don't think this will ever get much popularity among bitcoiners.

Every single bitcoin script IS a smart contract! Only certain functionalities that a "currency" does not really need are not available in bitcoin scripts.
That's correct. Bitcoin has limited capabilities when it comes to its smart contract functions. It's not turing complete like Ethereum's Solidity is.   

▄▄███████▄▄███████
▄███████████████▄▄▄▄▄
▄████████████████████▀░
▄█████████████████████▄░
▄█████████▀▀████████████▄
██████████████▀▀█████████
████████████████████████
██████████████▄▄█████████
▀█████████▄▄████████████▀
▀█████████████████████▀░
▀████████████████████▄░
▀███████████████▀▀▀▀▀
▀▀███████▀▀███████

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
 
Playgram.io
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

▄▄▄░░
▀▄







▄▀
▀▀▀░░
▄▄▄███████▄▄▄
▄▄███████████████▄▄
▄███████████████████▄
▄██████████████▀▀█████▄
▄██████████▀▀█████▐████▄
██████▀▀████▄▄▀▀█████████
████▄▄███▄██▀█████▐██████
█████████▀██████████████
▀███████▌▐██████▐██████▀
▀███████▄▄███▄████████▀
▀███████████████████▀
▀▀███████████████▀▀
▀▀▀███████▀▀▀
██████▄▄███████▄▄████████
███▄███████████████▄░░▀█▀
███████████░█████████░░
░█████▀██▄▄░▄▄██▀█████░
█████▄░▄███▄███▄░▄█████
███████████████████████
███████████████████████
██░▄▄▄░██░▄▄▄░██░▄▄▄░██
██░░░░██░░░░██░░░░████
██░░░░██░░░░██░░░░████
██▄▄▄▄▄██▄▄▄▄▄██▄▄▄▄▄████
███████████████████████
███████████████████████
 
PLAY NOW

on Telegram
[/
n0nce
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5918


not your keys, not your coins!


View Profile WWW
December 25, 2022, 03:09:52 AM
Last edit: December 25, 2022, 03:22:08 AM by n0nce
Merited by BlackHatCoiner (4), pooya87 (2)
 #8

I think the only way to do it is with a wrapped BTC coin.
No Bitcoiner cares about, wants or would even exchange their actual BTC for wrapped BTC to then interact with a smart contract.

The right way to do that is building on RGB.
RGB is a scalable & confidential smart contracts system for Bitcoin & lightning network. They embrace concepts of private & mutual ownership, abstraction and separation of concerns and represent "post-blockchain", Turing-complete form of trustless distributed computing which does not require introduction of "tokens".

Here you have the implementation for backend and frontend:
https://github.com/RGB-WG/rgb-node
https://github.com/RGB-WG/rgb-sdk

There's a client for RGB protocol assets in MyCitadel.

You will just need to port your contract to Contractum language.



There is a very similar, second such project and to my knowledge, they're also somewhat working together (might be wrong?), called Taro.
While I'm a critic of the Lightning Labs team myself, I just found out that their latest blog post is about Taro and they have an alpha release out since September.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
garlonicon
Copper Member
Legendary
*
Offline Offline

Activity: 921
Merit: 2206


Pawns are the soul of chess


View Profile
December 25, 2022, 12:50:09 PM
 #9

Quote
No Bitcoiner cares about, wants or would even exchange their actual BTC for wrapped BTC to then interact with a smart contract.
Lightning Network is a BTC wrapped in a multisig. And yes, "wrapped" is the correct word for that, because if you "wrap" it in one channel, you cannot "wrap" it in another at the same time, and on-chain interaction is needed for each wrapping and unwrapping operation. Also note that in LN there are millisatoshis, so if you execute something on a single millisatoshi, then it would not exist outside of LN (so million users having 1 millisatoshi each will have zero BTC on-chain, there could be 1000000-of-1000000 multisig with 1000 sats, but it cannot be unwrapped and splitted between million UTXOs, because of standardness and dust limit).

Also note that each Taproot address is potentially wrapped N-of-N multisig. Because from the on-chain perspective, you can have 1000-of-1000 multisig, and it will be expressed as a single Schnorr signature. And then, you can have this N-of-N "everyone agrees" signature as a base for any Turing-complete contract you want.

BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1694
Merit: 8324


Bitcoin is a royal fork


View Profile WWW
December 25, 2022, 01:06:17 PM
 #10

The smart contracts are currently deployed to 6 EVM chains (Ethereum, Moonbeam, Moonriver, Celo, Unique, Quartz) and I think it could potentially really add traction to the mass adoption of Bitcoin
Explain me how. What need does these smart contracts satisfy to help on achieving global adoption? None, as far as anyone can tell. Mass adoption is rather not happening due to responsibility issues, misinformation and not really big need for bitcoin.

if we can support it, however, I am not sure if it is even possible.  Any technical advise and guidance would be appreciated.
It is technically possible with sidechain. The one with the most development is RGB that is mentioned above.

And then, you can have this N-of-N "everyone agrees" signature as a base for any Turing-complete contract you want.
Can you give us an example?

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
garlonicon
Copper Member
Legendary
*
Offline Offline

Activity: 921
Merit: 2206


Pawns are the soul of chess


View Profile
December 25, 2022, 02:05:57 PM
 #11

Quote
Quote
And then, you can have this N-of-N "everyone agrees" signature as a base for any Turing-complete contract you want.
Can you give us an example?
Well, N-of-N multisig means that "everyone agrees" on everything what happened on some second layer. Then, Bitcoin Script can be as complex as it is needed, because it can be splitted into many transactions. It is just a matter of cost. We have opcodes like OP_NOT, OP_TRUE, OP_FALSE and OP_EQUAL. There are also more complex opcodes, but it is possible to express any loops and other operations as a sequence of opcodes, repeated the maximum times it can execute (the more complex it will be, the more bytes it will take, for example "OP_2DUP OP_ADD OP_2DUP OP_ADD ..." will produce Fibonacci sequence). And then, you just need two things: one is the chain of Script operations, that will move all coins into fees, and another is the final transaction that takes the end of that chain (the last coins before being converted to fees), and the coins of all participants.

Then, all participants have a choice: execute everything off-chain, and reach agreement (the cheapest and the most private option), or execute everything on-chain (that is costly, it requires revealing parts that are signed upfront (to protect Script from being stopped or altered in the middle by some third party), and requires taking TapScript path, that pushes the whole chain of transactions, to execute for example "SHA-3(something)==hash".

So, yes, Bitcoin can be Turing-complete even today, but then you have to be ready for spending for example 100 BTC for executing some contract on-chain. Or you can try it on regtest or testnet3 to be convinced. But in general, it is better to reach off-chain agreement, or propose a soft-fork to add OP_SOMETHING, than to use that costly method to do it today.

n0nce
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5918


not your keys, not your coins!


View Profile WWW
December 26, 2022, 02:31:57 PM
 #12

Quote
No Bitcoiner cares about, wants or would even exchange their actual BTC for wrapped BTC to then interact with a smart contract.
Lightning Network is a BTC wrapped in a multisig. And yes, "wrapped" is the correct word for that, because if you "wrap" it in one channel, you cannot "wrap" it in another at the same time, and on-chain interaction is needed for each wrapping and unwrapping operation.
I was speaking of wrapped BTC as in WBTC, e.g. defined here (completely relying on a custodian who promises the 1:1 peg - again, something I will continue to say is completely anti-Bitcoin). https://trustwallet.com/blog/what-is-wrapped-wbtc

Maybe you call lightning-BTC 'wrapped', someone else will call it 'sandwiched' or 'hot-dogged'.. Tongue These are all no common definitions for Lightning, at all.
Nobody would call Ethereum locked in a smart contract 'wrapped'. What are they? Eth wrapped in Eth? Makes no sense.

Also note that in LN there are millisatoshis, so if you execute something on a single millisatoshi, then it would not exist outside of LN (so million users having 1 millisatoshi each will have zero BTC on-chain, there could be 1000000-of-1000000 multisig with 1000 sats, but it cannot be unwrapped and splitted between million UTXOs, because of standardness and dust limit).
Except even owning 1 sat would be under the dust limit. Millisats are not the issue. You will lose up to 1sat at every channel close; there's no denying that, but I don't see the problem. It's also totally off-topic.

It is just a matter of cost. We have opcodes like OP_NOT, OP_TRUE, OP_FALSE and OP_EQUAL. There are also more complex opcodes, but it is possible to express any loops and other operations as a sequence of opcodes, repeated the maximum times it can execute (the more complex it will be, the more bytes it will take, for example "OP_2DUP OP_ADD OP_2DUP OP_ADD ..." will produce Fibonacci sequence).
That's not Turing-completeness, though. Having to unroll loops and break things down to individual mathematical operations, means it's exactly not Turing-complete.
https://en.wikipedia.org/wiki/Turing_completeness

Bitcoin script just doesn't have (and never will have) recursion and no unbounded loops (which you sometimes need). Suggesting you can unroll any loop assumes the input of the program doesn't change the amount of iterations needed. It's highly probable that a smart contract needs to calculate something more or fewer times depending on the user input.

It's also simply completely unsuited for writing a smart contract like what we're talking about here. RGB is made for that; also in terms of programming language style and everything around it. It is nonsensical suggesting OP to port it to Bitcoin Script, just because in a thought experiment, it may be possible using 100BTC of transaction fee.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Ashley.Livetree (OP)
Copper Member
Jr. Member
*
Offline Offline

Activity: 50
Merit: 3

Livetree - social network of #Collectives, founder


View Profile
December 27, 2022, 09:41:57 AM
 #13

I think the only way to do it is with a wrapped BTC coin.
No Bitcoiner cares about, wants or would even exchange their actual BTC for wrapped BTC to then interact with a smart contract.

The right way to do that is building on RGB.
RGB is a scalable & confidential smart contracts system for Bitcoin & lightning network. They embrace concepts of private & mutual ownership, abstraction and separation of concerns and represent "post-blockchain", Turing-complete form of trustless distributed computing which does not require introduction of "tokens".

Here you have the implementation for backend and frontend:
https://github.com/RGB-WG/rgb-node
https://github.com/RGB-WG/rgb-sdk

There's a client for RGB protocol assets in MyCitadel.

You will just need to port your contract to Contractum language.



There is a very similar, second such project and to my knowledge, they're also somewhat working together (might be wrong?), called Taro.
While I'm a critic of the Lightning Labs team myself, I just found out that their latest blog post is about Taro and they have an alpha release out since September.

Many thanks for the links @n0nce! I've started learning RGB schema and Taro. From my initial install I see

1) It could be too expensive to execute this on chain
2) The functionality is really limited to just sub-assets on bitcoin (and let's be honest do we really need shit coins on Bitcoin)
3) Both seem far away from any kind of production-readiness (documentation is terrible, sample code is full of issues)
4) Both solutions appear quite hacky. I mean Bitcoin just isn't designed to do this in my opinion.

I would humbly propose it might be better to:

A) Hard fork the entire bitcoin chain and add proper support for a totally new programming paradigm (which, let's face it, is not going to happen)
B) Create a completely separate Bitcoin Bridge Layer blockchain-VM (perhaps WASAM based) that sits on top of Bitcoin and has very tight coupling so to perform ONLY very simple pre-existing Bitcoin opcodes (OP_(Math and bools) and within a maximum execution limit to ensure it is always cost free (let's say 21 operations to keep miners happy:). Perhaps this Bitcoin Bridge Layer could then support different VMs and tooling such as EVM or Substrate/Polkadot or whatever else is flavour of next month. Whether the Bridge Layer is true Turing complete or not, perhaps, then just become irrelevant as Bitcoin is and the bridge will discard anything that falls outside of 21. This would have the advantage of opening up Bitcoin to a whole new set of developers and pre-existing dev tools.

I will continue hacking about and see where I get to on it. Why are you a critic of Lightning Labs incidentally?

Quote
Quote
And then, you can have this N-of-N "everyone agrees" signature as a base for any Turing-complete contract you want.
Can you give us an example?
Well, N-of-N multisig means that "everyone agrees" on everything what happened on some second layer. Then, Bitcoin Script can be as complex as it is needed, because it can be splitted into many transactions. It is just a matter of cost. We have opcodes like OP_NOT, OP_TRUE, OP_FALSE and OP_EQUAL. There are also more complex opcodes, but it is possible to express any loops and other operations as a sequence of opcodes, repeated the maximum times it can execute (the more complex it will be, the more bytes it will take, for example "OP_2DUP OP_ADD OP_2DUP OP_ADD ..." will produce Fibonacci sequence). And then, you just need two things: one is the chain of Script operations, that will move all coins into fees, and another is the final transaction that takes the end of that chain (the last coins before being converted to fees), and the coins of all participants.

Then, all participants have a choice: execute everything off-chain, and reach agreement (the cheapest and the most private option), or execute everything on-chain (that is costly, it requires revealing parts that are signed upfront (to protect Script from being stopped or altered in the middle by some third party), and requires taking TapScript path, that pushes the whole chain of transactions, to execute for example "SHA-3(something)==hash".

So, yes, Bitcoin can be Turing-complete even today, but then you have to be ready for spending for example 100 BTC for executing some contract on-chain. Or you can try it on regtest or testnet3 to be convinced. But in general, it is better to reach off-chain agreement, or propose a soft-fork to add OP_SOMETHING, than to use that costly method to do it today.

Thanks for the input I think there is something here which could serve as the basis for the proposed, Bitcoin Bridge Layer VM, though the op code approach would still need to be inserted into into the Bitcoin core code for maximum security.

The smart contracts are currently deployed to 6 EVM chains (Ethereum, Moonbeam, Moonriver, Celo, Unique, Quartz) and I think it could potentially really add traction to the mass adoption of Bitcoin
Explain me how. What need does these smart contracts satisfy to help on achieving global adoption? None, as far as anyone can tell. Mass adoption is rather not happening due to responsibility issues, misinformation and not really big need for bitcoin.
 

Sorry to explain this a bit more, the smart contracts / potential bitcoin port are used as the underlying for an iOS/Android social network of DAOs. This app has been designed for mass adoption (it has centralised bits in it so users don't have to understand blockchain tech and DAOs are called #Collectives for adoption. You can read more about the app etc here: https://bitcointalk.org/index.php?topic=5431111.new   Full disclosure I wrote the entire stack including the app, back-end and smart contracts so am probably a little biased  Grin

 
That's not Turing-completeness, though. Having to unroll loops and break things down to individual mathematical operations, means it's exactly not Turing-complete.
https://en.wikipedia.org/wiki/Turing_completeness

Bitcoin script just doesn't have (and never will have) recursion and no unbounded loops (which you sometimes need). Suggesting you can unroll any loop assumes the input of the program doesn't change the amount of iterations needed. It's highly probable that a smart contract needs to calculate something more or fewer times depending on the user input.

It's also simply completely unsuited for writing a smart contract like what we're talking about here. RGB is made for that; also in terms of programming language style and everything around it. It is nonsensical suggesting OP to port it to Bitcoin Script, just because in a thought experiment, it may be possible using 100BTC of transaction fee.

Agreed.
n0nce
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5918


not your keys, not your coins!


View Profile WWW
December 27, 2022, 06:43:29 PM
 #14

Many thanks for the links @n0nce! I've started learning RGB schema and Taro. From my initial install I see
1) It could be too expensive to execute this on chain
RGB and Taro solely run off-chain by default.

3) Both seem far away from any kind of production-readiness (documentation is terrible, sample code is full of issues)
That's true; but this just means yours could be the first well-written, working, published RGB smart contract. Wink

4) Both solutions appear quite hacky. I mean Bitcoin just isn't designed to do this in my opinion.
That's why these protocols are created; to be designed to do this.

B) Create a completely separate Bitcoin Bridge Layer blockchain-VM (perhaps WASAM based) that sits on top of Bitcoin and has very tight coupling so to perform ONLY very simple pre-existing Bitcoin opcodes (OP_(Math and bools) and within a maximum execution limit to ensure it is always cost free (let's say 21 operations to keep miners happy:). Perhaps this Bitcoin Bridge Layer could then support different VMs and tooling such as EVM or Substrate/Polkadot or whatever else is flavour of next month. Whether the Bridge Layer is true Turing complete or not, perhaps, then just become irrelevant as Bitcoin is and the bridge will discard anything that falls outside of 21. This would have the advantage of opening up Bitcoin to a whole new set of developers and pre-existing dev tools.
Any such bridge needs to be off-chain and at least mostly Turing-complete; if it was as 'tightly coupled' as you said, it wouldn't be flexible enough and making it 'looser' will not work on L1 without hard fork. That's why it's on L2... which is exactly what RGB and Taro are doing.

Why are you a critic of Lightning Labs incidentally?
2 examples:
https://bitcointalk.org/index.php?topic=5386437
https://bitcointalk.org/index.php?topic=5387173

█▀▀▀











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











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

Activity: 1778
Merit: 7362


Top Crypto Casino


View Profile WWW
December 27, 2022, 06:49:27 PM
 #15

Many thanks for the links @n0nce! I've started learning RGB schema and Taro. From my initial install I see
1) It could be too expensive to execute this on chain
RGB and Taro solely run off-chain by default.

Side note: has anyone even used the Tao protocol for anything meaningful (not a few-lines student projectvon Github)? Or have they just forgot about it as soon as the fanfare around it died down?

███████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████

███████████████████████
.
BC.GAME
▄▄▀▀▀▀▀▀▀▄▄
▄▀▀░▄██▀░▀██▄░▀▀▄
▄▀░▐▀▄░▀░░▀░░▀░▄▀▌░▀▄
▄▀▄█▐░▀▄▀▀▀▀▀▄▀░▌█▄▀▄
▄▀░▀░░█░▄███████▄░█░░▀░▀▄
█░█░▀░█████████████░▀░█░█
█░██░▀█▀▀█▄▄█▀▀█▀░██░█
█░█▀██░█▀▀██▀▀█░██▀█░█
▀▄▀██░░░▀▀▄▌▐▄▀▀░░░██▀▄▀
▀▄▀██░░▄░▀▄█▄▀░▄░░██▀▄▀
▀▄░▀█░▄▄▄░▀░▄▄▄░█▀░▄▀
▀▄▄▀▀███▄███▀▀▄▄▀
██████▄▄▄▄▄▄▄██████
.
..CASINO....SPORTS....RACING..


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
n0nce
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5918


not your keys, not your coins!


View Profile WWW
December 27, 2022, 06:51:29 PM
 #16

Many thanks for the links @n0nce! I've started learning RGB schema and Taro. From my initial install I see
1) It could be too expensive to execute this on chain
RGB and Taro solely run off-chain by default.
Side note: has anyone even used the Tao protocol for anything meaningful (not a few-lines student projectvon Github)? Or have they just forgot about it as soon as the fanfare around it died down?
I don't know of any live projects on either 'network', unfortunately. It seems to me though that Taro is less mature than RGB by now; with its very first release on GitHub only happening this September, meanwhile RGB Core releases go back to 2021 and development seems more active, as well. Latest release just 2 days ago.

█▀▀▀











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











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

Activity: 1778
Merit: 7362


Top Crypto Casino


View Profile WWW
December 27, 2022, 06:53:28 PM
 #17

Many thanks for the links @n0nce! I've started learning RGB schema and Taro. From my initial install I see
1) It could be too expensive to execute this on chain
RGB and Taro solely run off-chain by default.
Side note: has anyone even used the Tao protocol for anything meaningful (not a few-lines student projectvon Github)? Or have they just forgot about it as soon as the fanfare around it died down?
I don't know of any live projects on either 'network', unfortunately. It seems to me though that Taro is less mature than RGB by now; with its very first release on GitHub only happening this September, meanwhile RGB Core releases go back to 2021 and development seems more active, as well. Latest release just 2 days ago.

Well it looks like Lightning Labs just dropped the hot potato then (or maybe they are too concerned with using their Lightning Network implementation to mitigate the fallout of FullRBF, to update it with anything useful).

███████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████

███████████████████████
.
BC.GAME
▄▄▀▀▀▀▀▀▀▄▄
▄▀▀░▄██▀░▀██▄░▀▀▄
▄▀░▐▀▄░▀░░▀░░▀░▄▀▌░▀▄
▄▀▄█▐░▀▄▀▀▀▀▀▄▀░▌█▄▀▄
▄▀░▀░░█░▄███████▄░█░░▀░▀▄
█░█░▀░█████████████░▀░█░█
█░██░▀█▀▀█▄▄█▀▀█▀░██░█
█░█▀██░█▀▀██▀▀█░██▀█░█
▀▄▀██░░░▀▀▄▌▐▄▀▀░░░██▀▄▀
▀▄▀██░░▄░▀▄█▄▀░▄░░██▀▄▀
▀▄░▀█░▄▄▄░▀░▄▄▄░█▀░▄▀
▀▄▄▀▀███▄███▀▀▄▄▀
██████▄▄▄▄▄▄▄██████
.
..CASINO....SPORTS....RACING..


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
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!