10
3
As I see it, the script feature is one of the most complicated features in the entire protocol. It features
$ cat src/script.h|grep '^ *OP_'|wc -l
118
instructions, and requires a stack to calculate.
The most important limitation, it makes it complicated to answer a simple and common question - "how much bitcoins does my key have".
With a complicated script, a bug in the script engine is more likely, and thus, it is possible that the network will split (50% client accept this transaction, 50% do not, before you notice, you have two long block chains. One longer which is considered invalid by 50% of the clients, and one shorter, considered valid by both).
What's the rational behind such a system? Why can't any transaction be simply "move X BTC from key K to key I signed by private key K"?
(If indeed you want anything complex - do that in a different system, and not inside bitcoins block).
I think that the claim "the 'simple' kind of transactions can be feasible proven not to have bugs because of scripts" is correct. Most transactions real world transactions will only use trivial scripts for the near future ... and I believe that if you choose to only use such transactions (let's say with a "safe client" or "safe mode" that rejects all other tx), then you can be safe from potential bugs. The usefulness of scripts is enormous, but you can work around them for everyday use if you don't need those features ... or so I think/hope. – ripper234 – 2012-02-21T18:49:18.433
Can you explain why the usefulness of scripts is enormous, especially given that most of the transaction are "regular" ones? And correct me if I'm wrong, but safe client wouldn't protect you from bugs that split the network. – Elazar Leibovich – 2012-02-21T20:37:31.853
Scripts are very useful, because they allow everything @theymos wrote, and much more. Most transactions don't need to use any of the features, but a lot of people will choose to use these scripts to hold their "uber secure wallet that uses multisig", while condutcing day-today business via simpler tx. The beauty is that as a user you can completely isolate yourself from any risk. I don't think a split network bug is a realistic scenario - try asking another question like "Could bugs in script execution realistically cause network splits" to understand why or why not. – ripper234 – 2012-02-21T20:50:33.540