Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Balloon on September 11, 2014, 08:04:36 PM



Title: Why we need SIGHASH_SINGLE?
Post by: Balloon on September 11, 2014, 08:04:36 PM
I understand how SIGHASH_SINGLE works, but why we need it? Is there any application that will need this feature?


Title: Re: Why we need SIGHASH_SINGLE?
Post by: Peter Todd on September 12, 2014, 12:34:18 AM
Decentralised asset exchange needs it: https://www.mail-archive.com/bitcoin-development%40lists.sourceforge.net/msg03892.html


Title: Re: Why we need SIGHASH_SINGLE?
Post by: Balloon on September 12, 2014, 05:40:51 PM
Decentralised asset exchange needs it: https://www.mail-archive.com/bitcoin-development%40lists.sourceforge.net/msg03892.html

Thank you for your reply! That's a very interesting idea!

I have one question though. Since colored coin is using some kind of input-output matching to trace colors. So bitcoins with the same color should be in the "same" position in inputs and outputs. Say the bitcoins in input0 is "red", then the bitcoins in output0 must also be "red". If I remember this colored coin mechanism correctly, then in the example, if Alice puts colored bitcoins in input0 and 1BTC in output0. Then that 1 BTC would become "red". I'm kind of confused how this problem is solved.

Balloon