Post
Topic
Board Development & Technical Discussion
Re: [RFC] On the usefullness of scripting
by
devrandom
on 21/03/2011, 04:30:37 UTC
Because scripting is mostly disabled and difficult to get right in a secure way, I would rather just strip it out, for btc2.

You can do signed validation and multi-in, multi-out without a script engine.

These use cases don't use multi-in or multi-out.  They have multiple pubkeys on a single output.  This allows multiple parties to cooperate in a transaction.  There's no way to implement escrow and such without scripts.

I agree that there should be a careful security review, but I don't think it's that difficult.  The main thing is to do validation of length and bounds, and have multiple reviewers of the code.

I went over the code and I don't actually see that many disabled operations.  Unless I am missing something, currently all clients accept blocks with complex scripts.   They only reject mining them.  So a miner could insert complex scripts into the block chain.  The security of the system as it currently stands does depend on making sure the scripting system is secure.

One thing I do notice is that OP_MUL doesn't have a bounds check.  Clients can be crashed with a few OP_DUP + OP_MUL in an otherwise valid block.  This seems to currently be a security issue.  I can do a more thorough review in a few days.