I don't find anything about this, sorry if this was already proposed.
I know this would induce a hard fork so it will not be implemented soon anyway. Thus, I'm just collecting opinions/criticisms for now.
As you may have understood, SIGHASH_LIST would sign a list of contiguous outputs.
It requires two values to work:
- the index of the first output signed, SI
- the number of signed outputs, L
Those two values would be concatenated after SIGHASH in the scriptSig: DER-sig | SIGHASH_LIST | VarInt(SI) | VarInt(L)
However, SI and L are not be signed
Here's what
its description would look like:
Procedure for Hashtype SIGHASH_LIST- The first SI output elements of txCopy are deleted.
- The output of txCopy is resized to L.
- All other txCopy inputs aside from the current input are set to have an nSequence index of zero.
Think of this as "sign some outputs-- I don't care where the other outputs go".
Let's make a transaction with that.
I redeem 4 BTC from the following transaction:
- hash=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- index=7
- recipient=1EHNa6Q4Jz2uvNExL497mE43ikXhwF6kZm (hash160=91b24bf9f5288532960ac687abb035127b1d28a5, private key=1)
I want to send 1 BTC to each of the following outputs:
- 2 OP_NUMEQUAL
- 3 OP_NUMEQUAL
And I don't care where other 2 BTC goes
The signed data would be:
01000000
=Input=
01
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
07000000
1976a91491b24bf9f5288532960ac687abb035127b1d28a588ac #scriptpubkey
ffffffff
=Outputs=
02
00e1f50500000000
02519c
00e1f50500000000
02529c
00000000
04000000 #SIGHASH_LIST
Only output 1 and output 2 are signed
The transaction itself:
01000000
= Input =
01
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
07000000
8e # length of scriptsig
4b # length of signature (SI, L included)
30 # startDER-sig
46
022100b4ae4464627d4c04c862f2cd63c41ff0e9ec4e0613c968c370c5a67cffef0710
022100a09d30bcc1b8104da1e46006aac445027de82be79d5090a452a1436d2476b3b8
04 # SIGHASH_LIST
01 # SI
02 # L
41 # len(pubkey), etc...
04
79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8
ffffffff
= Outputs =
04
00e1f50500000000 # amount 0
02509c # scriptpubkey 0
00e1f50500000000 # amount 1
02519c # scriptpubkey 1
00e1f50500000000 # amount 2
02529c # scriptpubkey 2
00e1f50500000000 # amount 3
02539c # scriptpubkey 3
00000000