Live data from Hacker News

Smart contracts on Bitcoin

avc.com

141–150 of 246 posts

Re: Smart contracts on Bitcoin

#141
post #129

Earlier quoted context omitted.

That is rather misleading to use as an example... It's widely regarded as a one time thing that was agreed upon partly because the system (and testing tools) were so new at the time. Bitcoin had a bug that was required an organized chain reorg back when it was early as well, but it's not regarded as fatal to putting trust in the chain now (search for "bitcoin value overflow bug", was kinda interesting) More recently,…

To be clear, I wasn't asserting that Eth was less valuable as a result of the DAO reorg (quite the contrary actually). I was merely pointing out that a reorg occurred. Thank you for the education on the bitcoin reorg, I didn't actually know that and agree that it's orthogonal to the trust narrative now. My broad point was that the trust is not in the code, it's in the community and their policies.

> the trust is not in the code, it's in the community and their policies

I can heartily agree with that.

That's why I think having the "layer 0" social consensus of a network aim for maximum clarity, so participants have as few points where there's three potential for surprise disagreement later.

Ethereum is very strongly "no abnormal state changes" starting with the Parity issue. I think there have been a few more similar cases of contract bugs, some even involving client devs, and any suggestion of a new fork has met with strong opposition from all ends of the community.

Another thing I think is useful for a blockchain is to have multiple independent clients... It helps prevent devs from having outsize voice in discussion (though the users and the node runners are always the final vote).

I think working out the meta structure of how to work these social level contracts is definitely something the whole cryptocurrency industry needs to work on.

Re: Smart contracts on Bitcoin

#142
post #140

Following the links down a hole a little bit I saw this statement: "Bitcoin is by far the largest and most secure blockchain"[1] Sure it's the largest, but it seems ETH2 might now be the most secure. It (at current prices) has $2,400,000,000 staked in the network. Sure this is still in the league of nation states to corrupt, but the penalties for breaking the rules are _so much higher_. Given that, and the fact that…

having a lot of money staked doesn't mean it's secure. The security model of Bitcoin comes from proof of work, which most people complain as being waste. But it's not actually waste. It's secure because miners have to keep working hard and "wasting energy" because the network is worth protecting (and only if the network is worth protecting). With proof of stake, the stakers only need to make an investment once in the beginning, so it results in rich get richer, and the network is essentially "protected" by those who do not keep working hard to protect the ledger. This suffers from the same flaw that exists in the real world financial system. The whole system could collapse overnight like a domino if something goes wrong. It's much more unlikely for something like that to happen for Proof of Work because miners invest heavily in constantly innovating and investing back into the network. To summarize, in theory Bitcoin is secure exactly because miners "waste" energy. Without wasting energy, all the protection is just a mirage.

Re: Smart contracts on Bitcoin

#143
post #122

I remember Counterparty (XCP) tried something like this a long time ago. Not full blown smart contracts, but things like asset creation (tokens) and decentralized exchanges like on Ethereum. Anyway at the time they received a lot of pushback from some Bitcoin core devs and some threatened to block them over their use of OP_RETURN. Wonder how sustainable Stacks approach is in comparison? Don't know if it works the sam…

Notably, Vitalik was run out on a rail by small blockers (mostly LukeJr) when he was trying to work on smart contracts on BTC back in the day. This is the entire reason he launched Ethereum, and took with him everyone else interested in working on smart contracts. Smart contracts are neat. Bitcoin is neat. Smart contracts on Bitcoin could have been a thing, but now it's too late. There is almost zero intersection bet…

These are of course multiple well-publicized but zero-fact assertions used as propaganda to trick people into ethereum and other altcoin bags.

Re: Smart contracts on Bitcoin

#144

I remember Counterparty (XCP) tried something like this a long time ago. Not full blown smart contracts, but things like asset creation (tokens) and decentralized exchanges like on Ethereum. Anyway at the time they received a lot of pushback from some Bitcoin core devs and some threatened to block them over their use of OP_RETURN. Wonder how sustainable Stacks approach is in comparison? Don't know if it works the sam…

Yup. Creator of Counterparty here. It's funny to think that if the Core devs hadn't be so incredibly resistant to people using the Bitcoin blockchain in unexpected ways, Ethereum wouldn't exist in its current form.

See https://twitter.com/vitalikbuterin/status/929804867568373760

Re: Smart contracts on Bitcoin

#145

Earlier quoted context omitted.

He has no idea what he is talking about.

I talked to a friend in 2010 who claimed that some opcodes could cause transactions to appear as valid on the chain but not actually result in the movement of funds to the targeted address. I realize now that I have not done the work to validate those claims beyond that conversation and will retract my statement until I speak to him.

I think you or your friend might be conflating malleability, which was a UX issue in 2013 that caused people to be confused about whether a tx was confirmed or not, with the disabling of a handful of script opcodes in 2010 for security reasons (they had buggy implementations and were the cause of a severe vulnerability).

Edit for detail: In 2010 the "worst bug in bitcoin's history" was discovered, which let anybody spend ANY output on the chain, due to an obscure feature of the bitcoin scripting system allowing the signature script to simply "return true" before the actual script is executed. This was when OP_RETURN's semantics were changed to unconditionally fail the script if ever encountered rather than the short-circuiting behavior implied by its name and present in early versions. A quick emergency audit was simultaneously done and ALL opcodes that were unused at the time and moderately complex to review were "disabled" as a precaution.

It's not clear that the developers understood at the time that they would not be able to re-enable those opcodes for existing scripts without a hard-fork. The distinguishing between soft-forks and hard-forks were still being worked out back then. So large parts of script were in fact removed, but it was done as part of an emergency bug-fix and the permanent disabling may not have even been intentional.

The disabled opcodes weren't really that important to smart contracts though, at least not without additional primitives that bitcoin never had. There are various proposals to add these features in to segwit script or the upcoming taproot extension.

Re: Smart contracts on Bitcoin

#146
post #45

Earlier quoted context omitted.

Maybe under very exceptional circumstances, i.e. a systemic network risk. Since the DAO fiasco we've had a number of high profile incidents and the community has rejected stepping in (look at the failure of EIP 999). I'm not sure if there's presently anything on Ethereum, that should it fail, would be as bad as the DAO failure. Maybe MakerDAO?

>Maybe under very exceptional circumstances, i.e. a systemic network risk. that sounds awfully like the justification for bank bailouts.

I think they meant more system technical risk than financial. as in, a change to prevent bypassing private key checks, or minting quadrillions of BTC / ETH beyond the issuance schedule.

Re: Smart contracts on Bitcoin

#147

Edit 3: See my nested child comment. My understanding (from a 2010 conversation with a friend who was deep in btc) was that there was a time where bitcoin scripting could cause transactions to appear onchain that would look valid to a novice but would not actually perform the actions described such that a scam could be perpetrated. I have not done the work to validate these claims. I stand by my comments on Eth and S…

> The community killed scripting because it was antithetical to the thing that makes money in BTC: trust. The constant flow of n00bs coming in who got their transactions reversed by OP codes and said "BUT I THOUGHT BITCOIN TRANSACTIONS WERE IRREVERSIBLE!!?!?!!?!?!1111" was eroding trust in the ecosystem. I never heard of all of this having happened. To my knowledge Bitcoin's scripting language was not trimmed, it was…

I agree that OP is confusing / conflating a bunch of different things.

But to clarify that one bit (I think?) they're talking about -- the code is OP_RETURN. Originally it could return larger amounts of arbitrary data, which was used to effectively store external data on-chain. It was later reduced down to only allow 40 bytes, which would be enough for a hash, but not enough to store larger amounts of state.

This was what Vitalik Buterin and others were using for things like scripting and colored coins, and Vitalik cited (concerns that devs were threatening to constrain it / remove it as a major reason he started Ethereum.

---

Vitalik about OP_RETURN (wish I had link w/ more context) - https://twitter.com/vitalikbuterin/status/929808394487320577

Re: Smart contracts on Bitcoin

#149
post #122

I remember Counterparty (XCP) tried something like this a long time ago. Not full blown smart contracts, but things like asset creation (tokens) and decentralized exchanges like on Ethereum. Anyway at the time they received a lot of pushback from some Bitcoin core devs and some threatened to block them over their use of OP_RETURN. Wonder how sustainable Stacks approach is in comparison? Don't know if it works the sam…

Notably, Vitalik was run out on a rail by small blockers (mostly LukeJr) when he was trying to work on smart contracts on BTC back in the day. This is the entire reason he launched Ethereum, and took with him everyone else interested in working on smart contracts. Smart contracts are neat. Bitcoin is neat. Smart contracts on Bitcoin could have been a thing, but now it's too late. There is almost zero intersection bet…

> .. now it's too late.

Perhaps it is too late for replicating existing use cases. However, the general idea of running EVM-like smart contracts secured by Bitcoin PoW (e.g. merge mined sidechains) is still quite attractive

Re: Smart contracts on Bitcoin

#150
post #140

Following the links down a hole a little bit I saw this statement: "Bitcoin is by far the largest and most secure blockchain"[1] Sure it's the largest, but it seems ETH2 might now be the most secure. It (at current prices) has $2,400,000,000 staked in the network. Sure this is still in the league of nation states to corrupt, but the penalties for breaking the rules are _so much higher_. Given that, and the fact that…

having a lot of money staked doesn't mean it's secure. The security model of Bitcoin comes from proof of work, which most people complain as being waste. But it's not actually waste. It's secure because miners have to keep working hard and "wasting energy" because the network is worth protecting (and only if the network is worth protecting). With proof of stake, the stakers only need to make an investment once in the…

I'm not sure of the argument -

  so it results in rich get richer
In PoW, the same 'rich get richer' applies - miners can buy more mining rigs and thus it compounds the same?

  miners invest heavily in constantly innovating and investing back into the network
In PoS, is this not exactly the same, if not even more true? Stakers are by definition highly invested into the network

  The whole system could collapse overnight like a domino if something goes wrong
Could you elaborate on this, why is this more likely in PoS over PoW?

PoW had decreased decentralization substantially to only happen in regions where electricity is the cheapest. PoS at least prevents this problem.

Post reply on HN