summaryrefslogtreecommitdiff
path: root/e9/865832106995b260eba586518620be6e2a1730
blob: 28927c3daec7ecc7e5a87c3afa397c18a18009f5 (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
Return-Path: <thomashartman1@gmail.com>
Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])
 by lists.linuxfoundation.org (Postfix) with ESMTP id 039E7C0051
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 19 Aug 2020 23:32:31 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by hemlock.osuosl.org (Postfix) with ESMTP id E064686DDB
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 19 Aug 2020 23:32:30 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
Received: from hemlock.osuosl.org ([127.0.0.1])
 by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id L6ixLsEvuqYc
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 19 Aug 2020 23:32:30 +0000 (UTC)
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6
Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com
 [209.85.222.181])
 by hemlock.osuosl.org (Postfix) with ESMTPS id 50E7F86DA5
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 19 Aug 2020 23:32:30 +0000 (UTC)
Received: by mail-qk1-f181.google.com with SMTP id j187so79502qke.11
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 19 Aug 2020 16:32:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:content-transfer-encoding:mime-version:subject:date:references
 :to:in-reply-to:message-id;
 bh=9u7IB6Ku/hJ34yOYXO9Z83r/W8Iw8oJERHOH1K12JTw=;
 b=e5ooVu4e0UhMfBfFZr2p1/0im18eHfwauO9X56zGO944Pb4kIkz/UG5rEK+V/v8TvJ
 a7rBWG7QB4ka6HztnwiIMcxfuz5WJT5OwlNlrIrqduZrkZErDpEepUjW2N3YywJNIoDB
 +1L3yuQ8GkjpXRL/hXYMMB9DXn60qSd3Oet7evymCQzzIG52puLbt8BRtu44cMtFS4fE
 Uo0qEwkH+AXMJx/c9iBo5fPE2WumIKOMaAo/YjP7xxozbAGhjvhIg2QtwNcXgAtdcwF8
 osr+P+fOVbYH4NSDKeUl1IA/Xyqf5cmFkIqV93DXH2vYpkbBddzgOnnFLqOYdVNX6yfi
 EpKQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:content-transfer-encoding:mime-version
 :subject:date:references:to:in-reply-to:message-id;
 bh=9u7IB6Ku/hJ34yOYXO9Z83r/W8Iw8oJERHOH1K12JTw=;
 b=YnpSZkUJSMThBRkhVVmnnk2AxMd07P7FVHyMvPs079hTHehNt+eF1gBL3cYaIXwPxR
 2Y2YvAgOZxIrWalIqgnkAKhXEMUdi2HoWfSaTt/YT9OGdbTP0E6eiP+oHMdsJwIWmquU
 8B5l6VOB/AGWto8ktPZMXN+qIt58oa3RX/qre+Urpa6cOd9R8VivOz+UUK2K9UGSBv/v
 y4DP2et4+5dRHChNaGjMCjbNupoMxQlQbT4WS9f4DVCVXGNAIfOsPAzEKxLiLinvorKl
 usnnKMOlvPTNxyGn9SKmlWx8CG0+GMjYE+F9QbE8FCcbTeITGW3bTAh3f88fDE415W4Z
 bXIQ==
X-Gm-Message-State: AOAM532t5ivZ9kYNOpqJbSmP/uqGCXEbPLgSKo7LWbcRzfnLEKNwN/NN
 uB32K4CGoWSAeyz7G3M2lKg=
X-Google-Smtp-Source: ABdhPJyU3nshkwsvXnr5Yg4D9zoSbTNiU2wYpc412CEQm0g5C3Bgo8JSzMTmXyCwYCOPsc6TMKD6uw==
X-Received: by 2002:a05:620a:1315:: with SMTP id
 o21mr356341qkj.227.1597879949182; 
 Wed, 19 Aug 2020 16:32:29 -0700 (PDT)
Received: from [192.168.43.187] ([172.58.4.204])
 by smtp.gmail.com with ESMTPSA id v2sm754824qte.25.2020.08.19.16.32.27
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 19 Aug 2020 16:32:28 -0700 (PDT)
From: Thomas Hartman <thomashartman1@gmail.com>
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
Date: Wed, 19 Aug 2020 19:32:25 -0400
References: <CAHAXnDXhAFQHiBCJ=H=1ZGHdHWhgLh1rG3pCPR5o48ziZzV+zQ@mail.gmail.com>
 <CAE-z3OVCcAL2x39TswA8zrZ+yjSqdx4hccTWn9Ug8MQ5=k-Pgg@mail.gmail.com>
 <C4A9F1FC-8BD9-4A03-806B-5091375090B5@gmail.com>
To: Tier Nolan <tier.nolan@gmail.com>,
 Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
In-Reply-To: <C4A9F1FC-8BD9-4A03-806B-5091375090B5@gmail.com>
Message-Id: <1EE02345-9A45-427F-AE13-6E96FD25B55E@gmail.com>
X-Mailer: Apple Mail (2.3445.9.1)
X-Mailman-Approved-At: Thu, 20 Aug 2020 00:05:46 +0000
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: Wed, 19 Aug 2020 23:32:31 -0000

>=20
> So perhaps the way op_diff should work is take 2 packed targets, 1 =
known and 1 unknown at time of contract, and return the ratio.=20

On second thought, I don=E2=80=99t think this is a good idea. The 32-bit =
packed difficulty target is equivalent to difficulty, and this is =
probably what should get pushed onto the stack. No division is needed, =
just the arithmetic less than operator, which is already live in script, =
using the tick strategy described by Tier. So it seems to me these =
contracts could truly be done with the addition of the single op_diff =
opcode. It=E2=80=99s probably less human readable to be using difficulty =
target instead of difficulty, but no one reads script anyway.=20

It was also bothering me that difficulty was a floating point number (I =
have floating point phobia), so it is great not to have to think about =
floats anymore!