Return-Path: Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 24F54C002D for ; Fri, 24 Jun 2022 06:06:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id EDF804042B for ; Fri, 24 Jun 2022 06:06:15 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org EDF804042B X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: -0.501 X-Spam-Level: X-Spam-Status: No, score=-0.501 tagged_above=-999 required=5 tests=[BAYES_05=-0.5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001] autolearn=ham autolearn_force=no Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8rHN9j8qAVmu for ; Fri, 24 Jun 2022 06:06:15 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 2E50A4032E Received: from azure.erisian.com.au (azure.erisian.com.au [172.104.61.193]) by smtp2.osuosl.org (Postfix) with ESMTPS id 2E50A4032E for ; Fri, 24 Jun 2022 06:06:14 +0000 (UTC) Received: from aj@azure.erisian.com.au (helo=sapphire.erisian.com.au) by azure.erisian.com.au with esmtpsa (Exim 4.92 #3 (Debian)) id 1o4cSH-0005uv-MU; Fri, 24 Jun 2022 16:06:11 +1000 Received: by sapphire.erisian.com.au (sSMTP sendmail emulation); Fri, 24 Jun 2022 16:06:05 +1000 Date: Fri, 24 Jun 2022 16:06:05 +1000 From: Anthony Towns To: Bitcoin Protocol Discussion Message-ID: <20220624060605.GC5322@erisian.com.au> References: <87h75xoet1.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87h75xoet1.fsf@rustcorp.com.au> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Score-int: -18 X-Spam-Bar: - Subject: Re: [bitcoin-dev] [PROPOSAL] OP_TX: generalized covenants reduced to OP_CHECKTEMPLATEVERIFY X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jun 2022 06:06:16 -0000 On Tue, May 10, 2022 at 08:05:54PM +0930, Rusty Russell via bitcoin-dev wrote: > OPTX_SEPARATELY: treat fields separately (vs concatenating) > OPTX_UNHASHED: push on the stack without hashing (vs SHA256 before push) > OPTX_SELECT_OUTPUT_AMOUNT32x2*: sats out, as a high-low u31 pair > OPTX_SELECT_OUTPUT_SCRIPTPUBKEY*: output scriptpubkey Doing random pie-in-the-sky contract design, I had a case where I wanted to be able to say "update the CTV hash from commiting to outputs [A,B,C,D,E] to outputs [A,B,X,D,E]". The approach above and the one CTV takes are somewhat awkward for that: * you have to include all of A,B,D,E in order to generate both hashes, which seems less efficient than a merkle path * proving that you're taking an output in its entirety, rather than, say, the last 12 bytes of C and the first 30 bytes of D, seems hard. Again, it seems like a merkle path would be better? This is more of an upgradability concern I think -- ie, only relevant if additional features like CAT or TLUV or similar are added; but both OP_TX and CTV seem to be trying to take upgradability into account in advance, so I thought this was worth raising. Cheers, aj