Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YgAed-00033D-3E for bitcoin-development@lists.sourceforge.net; Thu, 09 Apr 2015 11:29:51 +0000 Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.212.182 as permitted sender) client-ip=209.85.212.182; envelope-from=mh.in.england@gmail.com; helo=mail-wi0-f182.google.com; Received: from mail-wi0-f182.google.com ([209.85.212.182]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1YgAeb-0007V2-Np for bitcoin-development@lists.sourceforge.net; Thu, 09 Apr 2015 11:29:51 +0000 Received: by wiax7 with SMTP id x7so53130354wia.0 for ; Thu, 09 Apr 2015 04:29:43 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.180.109.169 with SMTP id ht9mr5461013wib.86.1428578983760; Thu, 09 Apr 2015 04:29:43 -0700 (PDT) Sender: mh.in.england@gmail.com Received: by 10.194.188.11 with HTTP; Thu, 9 Apr 2015 04:29:43 -0700 (PDT) In-Reply-To: References: Date: Thu, 9 Apr 2015 13:29:43 +0200 X-Google-Sender-Auth: yfUNiWoUmNBgp4bUzD4ufHipvN4 Message-ID: From: Mike Hearn To: Stephen Morse Content-Type: multipart/alternative; boundary=e89a8f3baed9dc682e051348f6d9 X-Spam-Score: -0.5 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (mh.in.england[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.0 HTML_MESSAGE BODY: HTML included in message 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1YgAeb-0007V2-Np Cc: bitcoin-development Subject: Re: [Bitcoin-development] Build your own nHashType X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 11:29:51 -0000 --e89a8f3baed9dc682e051348f6d9 Content-Type: text/plain; charset=UTF-8 Hi Stephen, It's an interesting idea. I'm not sure that all the combinations make sense. Excluding the connected output script or value but still signing the prev tx hash appears pointless: the script cannot change anyway, and you still need to know what it is to actually calculate the inputs to it, so what is the point of this? I also worry that quite a few of these combinations could be unexpectedly dangerous. If you don't sign the prevout hash or value and combine it with a regular pay-to-address output then you've effectively written a blank cheque that can be used by anyone, to claim any money ever sent to that address ... no? And then any p2p node or miner could do so, making the transaction pretty useless. That isn't inherently a problem as long as people understand which combinations have what effects or cannot be used for various reasons. But it would need good documentation and careful thought to explore each possibility people might use. I'll leave the soft fork business to one side for now. I think any change in CHECKSIG or new version of it would likely be ready around the same time as the hard fork we need for changing the block size limit anyway, and it's much cleaner to do it that way. The most important change that we need in sighash calculation, IMO, is ensuring that you don't have to hash data over and over again without a good reason. The current sighash definition is unfortunate because it's possible to make small transactions that involve hashing huge amounts of data. It's not clear to me that your proposal fixes that: ideally there would be one exactly one sighash for one transaction no matter how many checksigs are involved in verifying it. thanks, -mike --e89a8f3baed9dc682e051348f6d9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Stephen,

It's an interesting ide= a. I'm not sure that all the combinations make sense. Excluding the con= nected output script or value but still signing the prev tx hash appears po= intless: the script cannot change anyway, and you still need to know what i= t is to actually calculate the inputs to it, so what is the point of this?<= /div>

I also worry that quite a few of these combination= s could be unexpectedly dangerous. If you don't sign the prevout hash o= r value and combine it with a regular pay-to-address output then you've= effectively written a blank cheque that can be used by anyone, to claim an= y money ever sent to that address ... no? And then any p2p node or miner co= uld do so, making the transaction pretty useless.

= That isn't inherently a problem as long as people understand which comb= inations have what effects or cannot be used for various reasons. But it wo= uld need good documentation and careful thought to explore each possibility= people might use.

I'll leave the soft fork bu= siness to one side for now. I think any change in CHECKSIG or new version o= f it would likely be ready around the same time as the hard fork we need fo= r changing the block size limit anyway, and it's much cleaner to do it = that way.

The most important change that we need i= n sighash calculation, IMO, is ensuring that you don't have to hash dat= a over and over again without a good reason. The current sighash definition= is unfortunate because it's possible to make small transactions that i= nvolve hashing huge amounts of data. It's not clear to me that your pro= posal fixes that: ideally there would be one exactly one sighash for one tr= ansaction no matter how many checksigs are involved in verifying it.
<= div>
thanks,
-mike

--e89a8f3baed9dc682e051348f6d9--