summaryrefslogtreecommitdiff
path: root/24/a6f9deaf385cf5b2e591c273611074d752396b
blob: 68b7670ebdf78fb8fc9a5935caa7f411b01c1515 (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
Return-Path: <gmaxwell@gmail.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id D5D8FC7D
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Fri, 23 Sep 2016 23:43:51 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-vk0-f54.google.com (mail-vk0-f54.google.com
	[209.85.213.54])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 754811C3
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Fri, 23 Sep 2016 23:43:51 +0000 (UTC)
Received: by mail-vk0-f54.google.com with SMTP id v205so4052193vke.1
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Fri, 23 Sep 2016 16:43:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:sender:in-reply-to:references:from:date:message-id
	:subject:to:cc;
	bh=3IR2YjPNUrMAOQ4IcnyD4gC3UsBU33zny/87kpyeIVU=;
	b=YTAYBXtL0vJlKZM0n4vDWcXCAoKpd7OBkwPZh/JyyfmbWru+TjVDEA34nXoyUay2E9
	DN3fj/6+m0fyXmpibGw1m0wI+pvO5Fh9YLouAzvLmHRPhiCuKYnSsq8JFGKOb02CbTMy
	MIcuy8QJqKz2Rkzcsa22+j5CKpwlyjCOJK2grGbx6cAqK0mdjzqHL3XnQr3kKQ1s9jAC
	U35xv/HzOZ3ZVefVxyFqeBuA4iuZ3bGG4kpwl0raspdbT022gHkWWdW1MpXhb7sDws8v
	8sZWeM+YNpCqYh55Q/ihT0H5S1BLrxDto5sd2+cVK1nFBrdvyJL4lmii7+pgbki9WocA
	foXg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20130820;
	h=x-gm-message-state:mime-version:sender:in-reply-to:references:from
	:date:message-id:subject:to:cc;
	bh=3IR2YjPNUrMAOQ4IcnyD4gC3UsBU33zny/87kpyeIVU=;
	b=nGzKfSUJAE1cMG8hYn3eHMipDL7KNvOGO3+y2JBNsrW6C3JD6UBZ4dQk2tvk2seKxn
	6N4I3YtNtOm5umT+SZKEgV6TABSmtuTFG45fI7e9pKgqeCLdI8wh151s3aHs4rIGA0Z5
	NXxzCIHsW15SbEoAOgrjUSUALBcCQc7cwimULHfb+KcQiQR86H+MsnncrhsMM7BHo4II
	PJt+p9knrAQlzBLNKNs8h673jsqzvE2733dwD0KbQz5l/fFMuKjt3p0E7QlZx5oiuUjF
	aU/I+HPgPPZ1XbQpCIKWvnl21bTxpntbI82inzbonB8XM76oLDlDx96+peiZFZA3bDv6
	VPog==
X-Gm-Message-State: AA6/9RnIPZQ4fdjwYBDc3rmDdaM8Vo6TU4t1ix0sVeSVW17MUqM9QbY4WNaT91l5nRBhGYurpbRZIys5MN0ZBQ==
X-Received: by 10.31.61.213 with SMTP id k204mr670026vka.173.1474674230691;
	Fri, 23 Sep 2016 16:43:50 -0700 (PDT)
MIME-Version: 1.0
Sender: gmaxwell@gmail.com
Received: by 10.103.33.145 with HTTP; Fri, 23 Sep 2016 16:43:49 -0700 (PDT)
In-Reply-To: <201609232220.41783.luke@dashjr.org>
References: <201609230957.03138.luke@dashjr.org>
	<CAMZUoKnY7s1b75Z_0QCb2hh-Q_hCE4-9dZ9tY58HaUQy6=aCbw@mail.gmail.com>
	<201609232220.41783.luke@dashjr.org>
From: Gregory Maxwell <greg@xiph.org>
Date: Fri, 23 Sep 2016 23:43:49 +0000
X-Google-Sender-Auth: QD5YL5Ml3s56b4a4Bvl9eWuT1As
Message-ID: <CAAS2fgTCOq1pHrPVbkNzCp_bYqbXh6Y6osF5_jFUZRy1rWPQCw@mail.gmail.com>
To: Luke Dashjr <luke@dashjr.org>, 
	Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: text/plain; charset=UTF-8
X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,
	RCVD_IN_SORBS_SPAM autolearn=no version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	smtp1.linux-foundation.org
Subject: Re: [bitcoin-dev] BIP draft: OP_CHECKBLOCKATHEIGHT
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
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: Fri, 23 Sep 2016 23:43:52 -0000

On Fri, Sep 23, 2016 at 10:20 PM, Luke Dashjr via bitcoin-dev
<bitcoin-dev@lists.linuxfoundation.org> wrote:
> In the innocent use case of this opcode, a double-spend has already occurred,
> and this should be a strict improvement. In the non-innocent abuse of this
> opcode, I don't see that it's any worse than simply double-spending.

There is a fungibility hit... right now, absent double spends (and
privacy issues), every coin you might get paid is equal.

With this script feature as described, you could get paid a coin which
has one of these in its recent past, pinning the block immediately
before it. A reorg long enough to remove that block-- due to an
attack, or an ordinary block race, or some kind of consensus glitch
(like we had in March 2013 or around the activation of BIP65)-- is
_guaranteed_ to invalidate those coins, even without any double spend.

If the scheme doesn't do as I suggest and prevent over-eager usage
(perhaps 100 is too much, I just decided to match coinbases); then it
should probably have a consensus enforced explicit "maximum survivable
reorg" that is traced along with the outputs, so that someone who
received exposed coins could handle it sensibly.

Just for plain engineering reasons, I still think it is important to
now allow overly short back references. If the reference has to be a
few blocks back we don't need to worry about short forks breaking
propagation, and simple mempool handling like purging all CBAH
transactions on a large reorg would work fine.  It need not be so long
as to implicate Petertodd's concern that you could only use it where
it wouldn't matter.  (Though I also disagree that a depth of 100
achieves that, consider persistent chain forks).