Return-Path: Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id B0EBFC002D for ; Thu, 10 Nov 2022 07:39:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 8B29E814BA for ; Thu, 10 Nov 2022 07:39:14 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 8B29E814BA X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: 0.097 X-Spam-Level: X-Spam-Status: No, score=0.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, PDS_OTHER_BAD_TLD=1.999, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=no autolearn_force=no Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Sx55530VYN-6 for ; Thu, 10 Nov 2022 07:39:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org B53EF8149D Received: from smtpauth.rollernet.us (smtpauth.rollernet.us [IPv6:2607:fe70:0:3::d]) by smtp1.osuosl.org (Postfix) with ESMTPS id B53EF8149D for ; Thu, 10 Nov 2022 07:39:13 +0000 (UTC) Received: from smtpauth.rollernet.us (localhost [127.0.0.1]) by smtpauth.rollernet.us (Postfix) with ESMTP id 384F02800042; Wed, 9 Nov 2022 23:39:10 -0800 (PST) Received: from webmail.rollernet.us (webmail.rollernet.us [IPv6:2607:fe70:0:14::a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by smtpauth.rollernet.us (Postfix) with ESMTPSA; Wed, 9 Nov 2022 23:39:10 -0800 (PST) MIME-Version: 1.0 Date: Wed, 09 Nov 2022 21:39:10 -1000 From: "David A. Harding" To: Salvatore Ingala , Bitcoin Protocol Discussion In-Reply-To: References: User-Agent: Roundcube Webmail/1.4.10 Message-ID: <036287ca4f22dde0b98c91784ba79a5d@dtrt.org> X-Sender: dave@dtrt.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rollernet-Abuse: Contact abuse@rollernet.us to report. Abuse policy: http://www.rollernet.us/policy X-Rollernet-Submit: Submit ID 487a.636caa9e.14720.0 Subject: Re: [bitcoin-dev] Merkleize All The Things 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: Thu, 10 Nov 2022 07:39:14 -0000 On 2022-11-07 23:17, Salvatore Ingala via bitcoin-dev wrote: > Hi list, Hi Salvatore!, > I have been working on some notes to describe an approach that uses > covenants in order to enable general smart contracts in bitcoin. You > can find them here: > > https://merkle.fun I haven't yet been able to understand everything in your post, but I'm wondering if you can describe how your proposal significantly differs in application from [1]? E.g., you write: > 1. Alice posts the statement “f(x) = y”. > 2. After a challenge period, if no challenge occurs, Alice is free to > continue and unlock the funds; the statement is true. > 3. At any time before the challenge period expires, Bob can start a > challenge: “actually, f(x) = z”. That looks to me very similar to Gregory Maxwell's script from[1] (comments and variable name changes mine): # Offchain, Alice posts the statement f(x) = y # Offchain, Bob provides Ex, an encrypted form of x that can be proven in zero knowledge to satisfy both f(x) = y and sha256(x) = Y OP_SHA256 OP_EQUAL OP_IF # Bob provided the preimage for Y, that preimage being the solution, so he can spend the funds now OP_ELSE # The challenge period ended, so Alice can reclaim her funds OP_CHECKLOCKTIMEVERIFY OP_DROP OP_ENDIF OP_CHECKSIG Thanks and apologies if I'm missing something obvious!, -Dave [1] https://bitcoincore.org/en/2016/02/26/zero-knowledge-contingent-payments-announcement/