summaryrefslogtreecommitdiff
path: root/dd/445b96c4a1fa8d6b77a1f6c279cb610f1d0c16
blob: d0c4cc93bf903c605172a0afb58181a851d2a1af (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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
Return-Path: <tier.nolan@gmail.com>
Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])
 by lists.linuxfoundation.org (Postfix) with ESMTP id D8A7AC0051
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Mon, 17 Aug 2020 21:55:42 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by silver.osuosl.org (Postfix) with ESMTP id BE7C220450
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Mon, 17 Aug 2020 21:55:42 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
Received: from silver.osuosl.org ([127.0.0.1])
 by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id IgyliKxg5kPN
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Mon, 17 Aug 2020 21:55:41 +0000 (UTC)
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6
Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com
 [209.85.221.53])
 by silver.osuosl.org (Postfix) with ESMTPS id 4E8C720414
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Mon, 17 Aug 2020 21:55:41 +0000 (UTC)
Received: by mail-wr1-f53.google.com with SMTP id r15so6463375wrp.13
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Mon, 17 Aug 2020 14:55:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
 bh=0kdLr4rddNTDic4+D19IefsrOaeDIPib3WYv3Lrx5Ss=;
 b=WLFGNwSmbHyDPpCGQLaQTXGTsqqDhvyNKfN1dval18XI+r7vqpEnB388vUvbxHdhvD
 PT4Qoly4JSPu12q/wWQ07qDN53tLN9dgmKvVcjk2V785udYE1WUPhJJXoQKNcyk1K8j6
 dkrmFamekvnylDGD+7S7AqInjzkYoy63zMfn58NB2AluxYw8sWIP9Yv4QmGodMKOt+mo
 WlzqnDdXu/knV3h9B+Jejvd7ddcN4K2/BK4AKTXKz2oA8OaAac/GksrOz/walrxfytmF
 BbWs6O994Tommd5rWP1Cq5WSFW3x8Z6QOVImb9n8QuQJTRJFQs3NKSSAjCnGYh2h1b6a
 6VnQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to;
 bh=0kdLr4rddNTDic4+D19IefsrOaeDIPib3WYv3Lrx5Ss=;
 b=LXJr9zp1j7fV5v/QzaYcqLh29rMGSIWtelZA+1NI2Vmsr3s3yyu9D1k2Xk/HgoAdUm
 LLjpo0Wj7UVSLqPMb04sqpHvXEK/mpxRO5pe2R7l9KRn/bfDLUhVWA9CUudDJHnvI619
 kmIV3nAterKET35g71DG8uCwnCAU4pi5enRLC8hsHc2kUFBRZDXZGIOR3JXAVh72PU+G
 ROoA1SeQjA0h/HLIESVDAGWQTJyY7irHQ9+WqppcQbIIm1ErolBqcW6446lDoKRI095q
 D8c3MBzXvsAcraW+nJVcgdJSg3hcB7Od/GQ0hp6pEYDY7nTuO1+iO6x8hlcWXLFkUUOI
 Mvng==
X-Gm-Message-State: AOAM5310j+BAlypvVf1YUl8cKeoLgWvPwjxgoonJ/oP3jPpT+MYOyarc
 vV/Rlhk/RBtEvqbLqX6IOig0zfEbrf83wFSDLv8g3dAvMwc=
X-Google-Smtp-Source: ABdhPJzr8LtUASl4zI2y9kEDgFlkmRlgK0simvCWlShRAaqDcjbq802TcivELZgLV/C22MPSJJPnejnLoE+g/8BtVcI=
X-Received: by 2002:a05:6000:1203:: with SMTP id
 e3mr17572664wrx.324.1597701339705; 
 Mon, 17 Aug 2020 14:55:39 -0700 (PDT)
MIME-Version: 1.0
References: <CAHAXnDXhAFQHiBCJ=H=1ZGHdHWhgLh1rG3pCPR5o48ziZzV+zQ@mail.gmail.com>
 <CAE-z3OVCcAL2x39TswA8zrZ+yjSqdx4hccTWn9Ug8MQ5=k-Pgg@mail.gmail.com>
 <Y9rFseQ13QJ0TspORM_a542mUib8lJV2IiDe8GXS5SrxkvXbVI13MfbgGqVoSVftumcYNBBKut6Fz840ehS5VfvF2AsO_qNTyzvs6tTCpBk=@protonmail.com>
In-Reply-To: <Y9rFseQ13QJ0TspORM_a542mUib8lJV2IiDe8GXS5SrxkvXbVI13MfbgGqVoSVftumcYNBBKut6Fz840ehS5VfvF2AsO_qNTyzvs6tTCpBk=@protonmail.com>
From: Tier Nolan <tier.nolan@gmail.com>
Date: Mon, 17 Aug 2020 22:55:04 +0100
Message-ID: <CAE-z3OVuBGs=QxvyFMw30FZVimYWUQc_KAxKS=A-tjwVCFSbwQ@mail.gmail.com>
To: Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: multipart/alternative; boundary="000000000000cf775305ad19d414"
Subject: Re: [bitcoin-dev] reviving op_difficulty
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: Mon, 17 Aug 2020 21:55:43 -0000

--000000000000cf775305ad19d414
Content-Type: text/plain; charset="UTF-8"

On Mon, Aug 17, 2020 at 6:04 AM ZmnSCPxj <ZmnSCPxj@protonmail.com> wrote:

> Taproot MAST to the rescue.
>

Another option would be a binary payout

You pay 64 + 32 + 16 + 8 + 4 + 2 + 1 as outputs.  The outputs are
enabled/disabled based on the diff value.  This would require division and
also binary operators.

D = (int) ((100 * diff) / (1 trillion))

Output 0: 1.28:  If (D & 128) then pay Alice otherwise Bob
Output 0: 0.64:  If (D & 64) then pay Alice otherwise Bob
Output 0: 0.32:  If (D & 32) then pay Alice otherwise Bob
Output 0: 0.16:  If (D & 16) then pay Alice otherwise Bob
Output 0: 0.8:  If (D & 8) then pay Alice otherwise Bob
Output 0: 0.4:  If (D & 4) then pay Alice otherwise Bob
Output 0: 0.4:  If (D & 4) then pay Alice otherwise Bob
Output 0: 0.4:  If (D & 4) then pay Alice otherwise Bob

This has log performance in terms of the number of ticks like the MAST
solution.

--000000000000cf775305ad19d414
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Mon, Aug 17, 2020 at 6:04 AM ZmnSC=
Pxj &lt;<a href=3D"mailto:ZmnSCPxj@protonmail.com">ZmnSCPxj@protonmail.com<=
/a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0=
px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Taproot MAST to the rescue.<br></blockquote><br></div><div class=3D"gmail_q=
uote">Another option would be a binary payout</div><div class=3D"gmail_quot=
e"><br></div><div>You pay 64 + 32 + 16 + 8 + 4 + 2 + 1 as outputs.=C2=A0 Th=
e outputs are enabled/disabled based on the diff value.=C2=A0 This would re=
quire division and also binary operators.</div><div><br></div><div>D =3D (i=
nt) ((100 * diff) / (1 trillion))<br></div><div class=3D"gmail_quote"><div>=
=C2=A0</div><div>
Output 0: 1.28:=C2=A0 If (D &amp; 128) then pay Alice otherwise Bob

</div>
<div>
Output 0: 0.64:=C2=A0 If (D &amp; 64) then pay Alice otherwise Bob

</div>


<div>Output 0: 0.32:=C2=A0 If (D &amp; 32) then pay Alice otherwise Bob<br>=
</div>


<div>Output 0: 0.16:=C2=A0 If (D &amp; 16) then pay Alice otherwise Bob<br>=
</div>


<div>Output 0: 0.8:=C2=A0 If (D &amp; 8) then pay Alice otherwise Bob<br></=
div>


<div>
Output 0: 0.4:=C2=A0 If (D &amp; 4) then pay Alice otherwise Bob <br></div>=
<div>
Output 0: 0.4:=C2=A0 If (D &amp; 4) then pay Alice otherwise Bob <br></div>=
<div>
Output 0: 0.4:=C2=A0 If (D &amp; 4) then pay Alice otherwise Bob <br></div>=
<div><br></div><div>This has log performance in terms of the number of tick=
s like the MAST solution.<br></div></div></div>

--000000000000cf775305ad19d414--