Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YgGFa-00030I-9K for bitcoin-development@lists.sourceforge.net; Thu, 09 Apr 2015 17:28:22 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of petertodd.org designates 62.13.148.154 as permitted sender) client-ip=62.13.148.154; envelope-from=pete@petertodd.org; helo=outmail148154.authsmtp.co.uk; Received: from outmail148154.authsmtp.co.uk ([62.13.148.154]) by sog-mx-4.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1YgGFY-0002Ao-Rs for bitcoin-development@lists.sourceforge.net; Thu, 09 Apr 2015 17:28:22 +0000 Received: from mail-c237.authsmtp.com (mail-c237.authsmtp.com [62.13.128.237]) by punt15.authsmtp.com (8.14.2/8.14.2/) with ESMTP id t39HSBLg096506; Thu, 9 Apr 2015 18:28:11 +0100 (BST) Received: from muck (rrcs-184-74-196-171.nyc.biz.rr.com [184.74.196.171]) (authenticated bits=128) by mail.authsmtp.com (8.14.2/8.14.2/) with ESMTP id t39HS7eV079072 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 9 Apr 2015 18:28:09 +0100 (BST) Date: Thu, 9 Apr 2015 13:28:09 -0400 From: Peter Todd To: Jeff Garzik Message-ID: <20150409172808.GB27775@muck> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UHN/qo2QbUvPLonB" Content-Disposition: inline In-Reply-To: X-Server-Quench: cafb5488-dedd-11e4-9f74-002590a135d3 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCd2Yg0TA1ZNQRgX IjsJECJaVQIpKltL GxAVKBZePFsRUQkR aQdMdgsUGUUGAgsB AmMbWlxeUlV7WGM7 agJVcwJZfEtHWRtr V0lWR1pVCwQmRR8I fn0ZB39ycAxGf3w+ ZEVhX3YVDxUsJ0N5 SkZJQThSMXphaTUb TUkOcAdJcANIexZF O1F8UScOLwdSbGoL NQ4vNDcwO3BTJTpY RgYVKF8UXXNDNCM9 QxxKDDIyBwUCWCN7 KTwvMV4gDV4cWgAA X-Authentic-SMTP: 61633532353630.1024:706 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 184.74.196.171/587 X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-Spam-Score: -1.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 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1YgGFY-0002Ao-Rs 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 17:28:22 -0000 --UHN/qo2QbUvPLonB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 09, 2015 at 07:22:52AM -0700, Jeff Garzik wrote: > On Thu, Apr 9, 2015 at 7:10 AM, Stephen Morse > wrote: >=20 > > Is hashing transaction data once for each input really a huge bottlenec= k, > > though? Do mobile devices have an issue with this? > > >=20 >=20 > Think about what slow transaction verification speed means. Slower > propagation across the network. More work per node. Greater opportunity > for algorithmic attacks, races and other shenanigans by attackers. Keep in mind though we can always make part of the soft-fork be to make the hash operations in the new CHECKSIG mechanism consume sigops. For the OP: Have you looked at how CODESEPARATOR allows the signature to sign code to run as part of verifying the signature? E.g. my signature can say "valid if you run these additional opcodes and they return true" where those additional opcodes take the transaction, hash it in the defined way, and verify that the ECC signature correctly signs that hash and the hash of the additional opcodes. For instance in this case making a signature that's only valid if the tx fee is less than the defined amount would be a matter of GET_FEE LESSTHAN VERIFY This can be a much more general mechanism with easy to test modular opcodes; for the consensus-critical codebase this can result in a much easier and simpler to test CHECKSIG facility than a dozen new flags. --=20 'peter'[:-1]@petertodd.org 000000000000000006975f442f50caa4fcc18e165746b3c77b641b75635afecb --UHN/qo2QbUvPLonB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQGrBAEBCACVBQJVJramXhSAAAAAABUAQGJsb2NraGFzaEBiaXRjb2luLm9yZzAw MDAwMDAwMDAwMDAwMDAwNjk3NWY0NDJmNTBjYWE0ZmNjMThlMTY1NzQ2YjNjNzdi NjQxYjc1NjM1YWZlY2IvFIAAAAAAFQARcGthLWFkZHJlc3NAZ251cGcub3JncGV0 ZUBwZXRlcnRvZC5vcmcACgkQwIXyHOf0udzdDgf9Fj/uxiOASb7dqz1FzLT+nilX LiOaYIXxvfgz7Ch4PQKXv6ZaoxOp0SBi9C6fvxgrcxpIe1LDiCPLqMm47X6PBcG1 yscC4B/xGMgI4KN0j2xsW/9pbvsQYxFixo0lhhx/6aEVC7t8ppJ7tjNVBIgZZipO fSovEYGY+5IMjqAluD6tYpYuBKph64+kEfFc2dqEhraSpaD+eHfFIuCCZDosHpUE e+TolSI56oBsSbpXeoelo88A66VTFuTzcvhWrcIKWnGtKi9fUswaaO7IJJLPSoho PJ3ZKQdouZ20cdr3p026/13sZIeMinn1H7JWbv5aMOOll8pV78WFL1aquK6Wjw== =ExeM -----END PGP SIGNATURE----- --UHN/qo2QbUvPLonB--