[Bitcoin-development] BIP16/17 replacement

Andy Parkins andyparkins at gmail.com
Wed Feb 1 14:14:08 UTC 2012

On 2012 January 31 Tuesday, Andy Parkins wrote:

>  - Increase the version number in transactions to make a new transaction
>    structure
>  - Dump the "scriptPubKey" field completely.  Everything will be pay-to-
>    script-hash in version2 transactions
>  - Replace it with "hashOfClaimingScript"
>  - Add an "unsignedParameters" array.

Having thought about it; I've realised that the above is simply BIP16 without 
the backward compatibility work in it.  If BIP16 renamed the scriptPubKey 
field to "hashOfClaimingScript" and no longer ran it as a script, it woudl be 
close to identical.  We'd simply define the field as

 0xa9 0x14 <hashOfClaimingScript> 0x87

Detection of this format of scriptPubKey activates "version2" processing of 
the transaction.  And similarly, a new definition of scriptSig to be two 


I'm sure nobody cares about my opinion; but that's actually been the moment 
of epiphany for me (and I raise it here, in case it is for someone else).  
Having previously been against BIP16, I'm now happy with BIP16 -- it's a 
progression towards the ideal... having a literal claimScriptHash field 
instead of scriptPubKey; and never running scriptPubKey.

Potentially OP_CHECKSIG could be simplified as well because the rules could 
be "anything that's not the serialized script" in scriptSig is not signed.

I can imagine one day, when the network is all BIP16 compliant, that 
scriptPubKey will no longer be allowed to run as script at all.


Dr Andy Parkins
andyparkins at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20120201/c2cd486b/attachment.sig>

More information about the bitcoin-dev mailing list