summaryrefslogtreecommitdiff
path: root/46/0e9bc05c9da6a942fb983b7d15f4069af5d97b
blob: a01ccf670be3f2882d9cdf892ec05731d96e60e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
Return-Path: <dave@dtrt.org>
Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138])
 by lists.linuxfoundation.org (Postfix) with ESMTP id B0EBFC002D
 for <bitcoin-dev@lists.linuxfoundation.org>;
 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 <bitcoin-dev@lists.linuxfoundation.org>;
 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 <bitcoin-dev@lists.linuxfoundation.org>;
 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 <bitcoin-dev@lists.linuxfoundation.org>;
 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" <dave@dtrt.org>
To: Salvatore Ingala <salvatore.ingala@gmail.com>, Bitcoin Protocol
 Discussion <bitcoin-dev@lists.linuxfoundation.org>
In-Reply-To: <CAMhCMoH9uZPeAE_2tWH6rf0RndqV+ypjbNzazpFwFnLUpPsZ7g@mail.gmail.com>
References: <CAMhCMoH9uZPeAE_2tWH6rf0RndqV+ypjbNzazpFwFnLUpPsZ7g@mail.gmail.com>
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 <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>, 
 <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>, 
 <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=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
<Y> OP_EQUAL
OP_IF
   # Bob provided the preimage for Y, that preimage being the solution, 
so he can spend the funds now
   <Bob Pubkey>
OP_ELSE
   # The challenge period ended, so Alice can reclaim her funds
   <block_height+100> OP_CHECKLOCKTIMEVERIFY OP_DROP
   <Alice Pubkey>
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/