From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5891EC002D for ; Sun, 8 May 2022 02:20:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 42CC74026F for ; Sun, 8 May 2022 02:20:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: -1.601 X-Spam-Level: X-Spam-Status: No, score=-1.601 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, FROM_LOCAL_NOVOWEL=0.5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=protonmail.com 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 5iuVdj4YWgEt for ; Sun, 8 May 2022 02:20:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mail-40138.protonmail.ch (mail-40138.protonmail.ch [185.70.40.138]) by smtp2.osuosl.org (Postfix) with ESMTPS id 78A85401A1 for ; Sun, 8 May 2022 02:20:06 +0000 (UTC) Date: Sun, 08 May 2022 02:19:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1651976403; bh=jZFDwqwKVW8g7GOCTPkABhXphCmg9evC7hF8Q9VefDU=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=APhVUZQc9aXbRxPJq/YZgihyyDHiYu8bM1sadKpPl5ywzXRJL30zfIfQcr6gm1YvM f/S4j8PMbx26kfUW6ikwTogOIrKO3Hh8qnAkxdSVLEwzDC0WsBdGW6TWlFqZhD4rpg rfPDnaEv8/DSy/G2XOB4Zkb0Fdu+Qf/OadAt5JIw+CFkSX33QmiHv081zv9Q1PMlXo LJsmutcVucA5XhLLE345Ljo1z4Cf7tzOf8RwEaHH1kN84TC+RsCznFn2aogOeSZ8te mRAxJw1owV+je7H2nnTEExZpiycQI/F7pmhaLR/Y0wjSQCrPuRkO188h10Twa48SXp a0erKfL3PzPjg== To: Nadav Ivgi From: ZmnSCPxj Reply-To: ZmnSCPxj Message-ID: <6pDae6X_tAfMTldPPsad5CSHPF98NVbTf06JxRCs7RqJGyrOqLALsDHHa_3C5DbbfpAVnzLMWCn-7e0FwQO-TOk4XxWYIiaYomuA9NJjkEQ=@protonmail.com> In-Reply-To: References: <1JO1xrnJ9GwGM4TgLH_rL_LpnZgSb1SyeEOJ9Gzc1VMbKUrmxSh-zUXKwFNvp_5wyiDtRviOf-gRJbrfbhOJl-qym1eEHXpoDAgjE9juucw=@protonmail.com> Feedback-ID: 2872618:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Bitcoin Protocol Discussion Subject: Re: [bitcoin-dev] Speedy covenants (OP_CAT2) 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: Sun, 08 May 2022 02:20:07 -0000 Good morning shesek, > On Sat, May 7, 2022 at 5:08 PM ZmnSCPxj via bitcoin-dev wrote: > > * Even ***with*** `OP_CAT`, the following will enable non-recursive cov= enants without enabling recursive covenants: > >=C2=A0 * `OP_CTV`, ... > > * With `OP_CAT`, the following would enable recursive covenants: > >=C2=A0 * `OP_CHECKSIGFROMSTACK`, ... > > Why does CTV+CAT not enable recursive covenants while CSFS+CAT does? > > CTV+CAT lets you similarly assert against the outputs and verify that the= y match some dynamically constructed script. > > Is it because CTV does not let you have a verified copy of the input's pr= evout scriptPubKey on the stack [0], while with OP_CSFS you can because the= signature hash covers it? > > But you don't actually need this for recursion. Instead of having the use= r supply the script in the witness stack and verifying it against the input= to obtain the quine, the script can simply contain a copy of itself as an = initial push (minus this push). You can then reconstruct the full script qu= ine using OP_CAT, as a PUSH(