Author

Topic: Effect of different hashtypes (Read 628 times)

legendary
Activity: 1526
Merit: 1129
July 12, 2013, 12:47:09 PM
#3
There's a description here:

https://en.bitcoin.it/wiki/Contracts
full member
Activity: 225
Merit: 101
July 12, 2013, 12:35:14 PM
#2
As I understand it, a) you're correct and b) the number of the output is the same as the number of the input when using SIGHASH_SINGLE.  So if your input is at position 0, the output you'd be including in the transaction hash would be output 0.
legendary
Activity: 1792
Merit: 1087
July 12, 2013, 12:28:26 PM
#1
I would like to clarify the meaning of different hashtypes:

SIGHASH_ALL: All inputs and outputs are required.

SIGHASH_ALL + SIGHASH_ANYONECANPAY: All outputs are required. I don't care where the rest of bitcoins come from.

SIGHASH_NONE: All inputs are required. I don't care where the bitcoins go.

SIGHASH_NONE + SIGHASH_ANYONECANPAY: I don't care where the rest of bitcoins come from. I don't care where the bitcoins go. Basically throwing the coins away without any condition.

SIGHASH_SINGLE: All inputs are required. As long as one particular output is satisfied, I don't care where the rest of bitcoins go.

SIGHASH_SINGLE + SIGHASH_ANYONECANPAY: I don't care where the rest of bitcoins come from. As long as one particular output is satisfied, I don't care where the rest of bitcoins go.

Am I correct?

How is the particular output in SIGHASH_SINGLE specified? I don't understand the description in bitcoin wiki ( https://en.bitcoin.it/wiki/OP_CHECKSIG#Procedure_for_Hashtype_SIGHASH_SINGLE )
Jump to: