Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Yp8bH-0001PG-Q4 for bitcoin-development@lists.sourceforge.net; Mon, 04 May 2015 05:07:27 +0000 Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of petertodd.org designates 62.13.148.93 as permitted sender) client-ip=62.13.148.93; envelope-from=pete@petertodd.org; helo=outmail148093.authsmtp.net; Received: from outmail148093.authsmtp.net ([62.13.148.93]) by sog-mx-3.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1Yp8bG-0007mU-5O for bitcoin-development@lists.sourceforge.net; Mon, 04 May 2015 05:07:27 +0000 Received: from mail-c237.authsmtp.com (mail-c237.authsmtp.com [62.13.128.237]) by punt16.authsmtp.com (8.14.2/8.14.2/) with ESMTP id t4457J7l001785 for ; Mon, 4 May 2015 06:07:19 +0100 (BST) Received: from savin.petertodd.org (75-119-251-161.dsl.teksavvy.com [75.119.251.161]) (authenticated bits=128) by mail.authsmtp.com (8.14.2/8.14.2/) with ESMTP id t4457Gke088329 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Mon, 4 May 2015 06:07:18 +0100 (BST) Date: Mon, 4 May 2015 01:07:15 -0400 From: Peter Todd To: bitcoin-development@lists.sourceforge.net Message-ID: <20150504050715.GA18856@savin.petertodd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ZGiS0Q5IWpPtfppv" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Server-Quench: 705f1858-f21b-11e4-9f74-002590a135d3 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCd2Yg0TA1ZNQRgX IjsJECJaVQIpKltL GxAVJwpGK10IU0Fd P1hXKl1LNVAaWXld WiVPGEoXDxgzCjYj NEgGOBsDNw4AXwF1 LRkAXVBSFQB4ARoL BhkUUxA8cABYeX95 e0RnX25aWkVlcE56 XU8aUWkCYGAXMzUf WEhbdQoadgpCelFC alUpVXsIaXhRZHsy WlZqMmx0bDsAdGEN GltQfAobGB1WEmUq bDQ+I30oBUYCSyh7 JhgiLVUVAEcWNBZ6 NVwnVhcEPgUXQhVa FkdWV0cA X-Authentic-SMTP: 61633532353630.1024:706 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 75.119.251.161/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: 1Yp8bG-0007mU-5O Subject: [Bitcoin-development] CLTV opcode allocation; long-term plans? 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: Mon, 04 May 2015 05:07:27 -0000 --ZGiS0Q5IWpPtfppv Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Matt Corallo brought up=B9 the issue of OP_NOP scarcity on the mempool only CLTV pull-req=B2: "I like merging this, but doing both CLTV things in one swoop would be really nice. Certainly if we're gonna use one of the precious few OP_NOPs we have we might as well make it more flexible." I have two lines of thought on this: 1) We're going to end up with a Script v2.0 reasonably soon, probably based on Russel O'Connor and Pieter Wuille's Merkelized Abstract Syntax Tree=B3 idea. This needs at most a single OP_NOPx to implement and mostly removes the scarcity of upgradable NOP's. 2) Similarly in script v1.0 even if we do use up all ten OP_NOPx's, the logical thing to do is implement an OP_EXTENDED. 3) It's not clear what form a relative CLTV will actually take; the BIP itself proposes a OP_PREVOUT_HEIGHT_VERIFY/OP_PREVOUT_DATA along with OP_ADD, with any opcode accessing non-reorg-safe prevout info being made unavailable until the coinbase maturity period has passed for soft-fork safeness. That said, if people have strong feelings about this, I would be willing to make OP_CLTV work as follows: 1 OP_CLTV Where the 1 selects absolute mode, and all others act as OP_NOP's. A future relative CLTV could then be a future soft-fork implemented as follows: 2 OP_CLTV On the bad side it'd be two or three days of work to rewrite all the existing tests and example code and update the BIP, and (slightly) gets us away from the well-tested existing implementation. It also may complicate the codebase compared to sticking with just doing a Script v2.0, with the additional execution environment data required for v2.0 scripts cleanly separated out. But all in all, the above isn't too big of a deal. Interested in your thoughts. 1) https://github.com/bitcoin/bitcoin/pull/5496#issuecomment-98568239 2) https://github.com/bitcoin/bitcoin/pull/5496 3) http://css.csail.mit.edu/6.858/2014/projects/jlrubin-mnaik-nityas.pdf --=20 'peter'[:-1]@petertodd.org 00000000000000000908b2eb1cb0660069547abdddad7fa6ad4e743cebe549de --ZGiS0Q5IWpPtfppv Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQGrBAEBCACVBQJVRv5+XhSAAAAAABUAQGJsb2NraGFzaEBiaXRjb2luLm9yZzAw MDAwMDAwMDAwMDAwMDAwOWU0YWIxZmE2MjM1ODU0YjVhZDAxOWY0MGQ5NzY2YmMw YjJiZDdjNTgyMGMyM2QvFIAAAAAAFQARcGthLWFkZHJlc3NAZ251cGcub3JncGV0 ZUBwZXRlcnRvZC5vcmcACgkQJIFAPaXwkfsTqwgAiJk2ByBsHTGgKbe1G4DMPofY LquDls2NGArvMYuhgtWFsMGCh0tZHWM9HAvqGNS2cQwAJcZpnlnkIE4Av7tSh/Ox kF+yHXEwak8mqSdzsr0wWk2XPTqmBwFaNRBgsYSRhwottiReRFSfiLnTjvCUeKFF 0Yg5lJSQ49Dj99ZyEdT1+SffeJu90Kok6niO/qVRtl3aa5bfACtlfE1hfIcov4QG hwPz9PjHB9O2+GNBtitIgrGIrWxKOCT0JGcqESQj0f9h14aCTe7py5WeLVyVpelb XC6GFQsXDk6ry4rOUnVA3Ml5geC2UsRK4D6WBc9vUT1ZSiVWiP/Tzflo3/Etpw== =wKBN -----END PGP SIGNATURE----- --ZGiS0Q5IWpPtfppv--