# Gavin Andresen # 2012-01-21 17:12:10 # https://bitcointalk.org/index.php?topic=60433.msg705543#msg705543 @s{quotedtext} @s{quotedtext} @p{brk} By the way... if there is no fully-functional reference implementation yet, you really shouldn't be putting "CHV" in your coinbases yet. The string in the coinbase really aught to mean "this code is all ready to support this feature," because full support from a majority of hashing power is what we want to measure. @p{par} @s{quotedtext} @s{quotedtext} @p{brk} Imagine you're an early adopter. You ask people to send you money into your spiffy new ultra-secure wallet. @p{par} With BIP 16, transactions TO you will take longer to get into a block because not everybody is supporting the new feature. @p{par} But transactions FROM you will look like regular transactions, so the people you are paying won't have to wait. @p{par} That is not a big difference, but it is an advantage of the BIP 16 approach. @p{par} @s{quotedtext} @s{quotedtext} @p{brk} No, they are not evaluated in the same way. The bit of code in bitcoin transaction validation that makes me nervous is: @p{brk} Code: txTmp.vin[nIn].scriptSig = scriptCode; ... in SignatureHash(), which is called from the CHECKSIG opcodes. scriptCode is the scriptPubKey from the previous (funding) transaction, txTmp is the transaction being funded. @p{par} This is the "Copy the scriptPubKey into the scriptSig before computing the hash that is signed" part of what OP_CHECKSIG does. @p{par} I like BIP 16 better than OP_EVAL/BIP 17 because BIP 16 does two complete validations, once with the scriptPubKey set to HASH160 @p{lt}hash@s{gt} OP_EQUAL and then once again with the scriptPubKey set to (for example) @p{lt}pubkey@s{gt} OP_CHECKSIG. @p{par} BIP 16 essentially says "If we see a P2SH transaction, validate it, then treat it is a normal, standard transaction and validate it again." @p{par} BIP 17 will run OP_CHECKSIGs when it is executing the scriptSig part of the transaction, which is a completely different context from where they are executed for the standard transactions we have now. @p{par} Again, I can't see a way to exploit that but it makes me very nervous. @p{brk}