Return-Path: Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 31A80C002D for ; Sun, 8 May 2022 02:03:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 1800440629 for ; Sun, 8 May 2022 02:03:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: -1.697 X-Spam-Level: X-Spam-Status: No, score=-1.697 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=no autolearn_force=no Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=neutral reason="invalid (public key: not available)" header.d=shesek.info 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 dKY3d0EeapkJ for ; Sun, 8 May 2022 02:03:38 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) by smtp2.osuosl.org (Postfix) with ESMTPS id E1E48401A1 for ; Sun, 8 May 2022 02:03:37 +0000 (UTC) Received: by mail-io1-xd2d.google.com with SMTP id h85so11932720iof.12 for ; Sat, 07 May 2022 19:03:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shesek.info; s=shesek; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8AXUuxMPjpRYIMW1lmRI1ZiNymLDEPaEdkt/P+vYFt0=; b=blsbbz6Me3AlPOBKFLj2GZmYsspZbOWEEDvpsPoXVE68kB9oO0dCah86OUxl4i2fdD OIvHnMXDovQ0Wp6U8vPuib7vTAoNy7PpWUCHMMqOGk2AhH0qJaFuKQDsXHlm1cvYBf8e WmQZTtRrNjUl3Txd4DPSJ5gDQT8FyWYNmC9zg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8AXUuxMPjpRYIMW1lmRI1ZiNymLDEPaEdkt/P+vYFt0=; b=bfHtnXW8Hr9nxZFyhSxL4JxR21AWFP0WSManmFe7/NzaIbfUSfkRiaZo4s9MPkQEUV wNJ5eQEsIgZoF4ntg6yfTR4oPqengZrPSGSpNZl3v+UiY13s7DgLHVxX8c6iduWeV2XZ o4kLm4EfN4QI01vM+Qi0j7qLaerIJ8fGyTvMaawIsyAfkaSlbnDbszLrxeMplkAxzuK7 7a1zJc/hAp2WGu/9UJrdje1oTlo2RbtJgfbhbY212zZzZyQmubSFCrDHMjYHWKhqdMQ3 zvcp4CkVK02WDLhvLzHIj5TCwdZ+/f9E0j19YvkqJn3amam3wXA9FVHqjN75jqGcNuWU gOXQ== X-Gm-Message-State: AOAM532oyE+tezGEAheV6HaD+rZxJz4NMhfBu6GE8c+os0vhLRfUGOFh LUTQPryqS61SqYHTjf2CGvPHCrbTzkJageS+7iWfp8yIUtPDMhNf X-Google-Smtp-Source: ABdhPJyRMUk0w6/6HrrnyEMEu1lfqMGeGWT0qipAdzNx88OtaV3DKisshUJiifr2QEA3gPquacAKSjjk5N+1Sa00tLg= X-Received: by 2002:a05:6638:c3:b0:32a:f5d0:5d58 with SMTP id w3-20020a05663800c300b0032af5d05d58mr4700808jao.40.1651975416832; Sat, 07 May 2022 19:03:36 -0700 (PDT) MIME-Version: 1.0 References: <1JO1xrnJ9GwGM4TgLH_rL_LpnZgSb1SyeEOJ9Gzc1VMbKUrmxSh-zUXKwFNvp_5wyiDtRviOf-gRJbrfbhOJl-qym1eEHXpoDAgjE9juucw=@protonmail.com> In-Reply-To: From: Nadav Ivgi Date: Sun, 8 May 2022 05:03:25 +0300 Message-ID: To: ZmnSCPxj , Bitcoin Protocol Discussion Content-Type: multipart/alternative; boundary="000000000000e5fc7805de767fb7" X-Mailman-Approved-At: Sun, 08 May 2022 08:07:20 +0000 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:03:41 -0000 --000000000000e5fc7805de767fb7 Content-Type: text/plain; charset="UTF-8" On Sat, May 7, 2022 at 5:08 PM ZmnSCPxj via bitcoin-dev < bitcoin-dev@lists.linuxfoundation.org> wrote: > * Even ***with*** `OP_CAT`, the following will enable non-recursive covenants without enabling recursive covenants: > * `OP_CTV`, ... > * With `OP_CAT`, the following would enable recursive covenants: > * `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 they match some dynamically constructed script. Is it because CTV does not let you have a verified copy of the input's prevout 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 user 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 quine using OP_CAT, as a PUSH(