summaryrefslogtreecommitdiff
path: root/13/d01efa91b98890dcf4ab5525beed3d6aa21362
blob: 9e4896d131c9c6cd93067d3d1080d01cd203e21b (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: <aj@erisian.com.au>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id 7CFA815CC
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Tue,  6 Oct 2015 06:20:37 +0000 (UTC)
X-Greylist: from auto-whitelisted by SQLgrey-1.7.6
Received: from azure.erisian.com.au (cerulean.erisian.com.au [106.187.51.212])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 10695A9
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Tue,  6 Oct 2015 06:20:37 +0000 (UTC)
Received: from aj@azure.erisian.com.au (helo=navy.erisian.com.au)
	by azure.erisian.com.au with esmtpsa (Exim 4.84 #2 (Debian))
	id 1ZjLc2-0007lc-7P for <bitcoin-dev@lists.linuxfoundation.org>;
	Tue, 06 Oct 2015 16:20:35 +1000
Received: by navy.erisian.com.au (sSMTP sendmail emulation);
	Tue, 06 Oct 2015 16:20:31 +1000
Date: Tue, 6 Oct 2015 16:20:31 +1000
From: Anthony Towns <aj@erisian.com.au>
To: bitcoin-dev@lists.linuxfoundation.org
Message-ID: <20151006062030.GB1054@navy>
References: <CAKfs=Z_jVKtjeSHM1a6n+ch6WcazkshmDgN4Wi1K_kLBUE4o4w@mail.gmail.com>
	<BLU436-SMTP132FA09C343ACB7C82E6C98C64B0@phx.gbl>
	<CA+w+GKT0Th4Tpk=cCxfJwsMdB5NLrARACU3_qiRn4Ns7z_PXYQ@mail.gmail.com>
	<CADm_WcaVbj98G9acqbwUxYudHhWh01FLpm5KgL3rqHffd5WCXg@mail.gmail.com>
	<CA+w+GKTkos5gwZmN_1c7wUFmJgZMJGzZbaZeWO=Rwt3Ta3Zbzw@mail.gmail.com>
	<CABm2gDp1r78OtM=MfHqvV17-6N=nCG+hFOwqL0R6DHz9SjLmsg@mail.gmail.com>
	<CA+w+GKS-AZGBSwuN1dgEs6wa-R=jHE0fmfmQ0TL9Cw9b6L71UQ@mail.gmail.com>
	<CABm2gDpgpRg9U5ToNM98pQgz8VRwT8o817zrpJgOj06PwySk_Q@mail.gmail.com>
	<CA+w+GKRjURkV40iG=6RLhFyQ-t2G_YAinKk7Os_8zK4+hyYJaw@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CA+w+GKRjURkV40iG=6RLhFyQ-t2G_YAinKk7Os_8zK4+hyYJaw@mail.gmail.com>
User-Agent: Mutt/1.5.24 (2015-08-30)
X-Spam-Score: -1.9
X-Spam-Score-int: -18
X-Spam-Bar: -
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
	UNPARSEABLE_RELAY autolearn=ham version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	smtp1.linux-foundation.org
Subject: Re: [bitcoin-dev] Let's deploy BIP65 CHECKLOCKTIMEVERIFY!
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Bitcoin Development 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: Tue, 06 Oct 2015 06:20:37 -0000

On Mon, Oct 05, 2015 at 06:46:28PM +0200, Mike Hearn via bitcoin-dev wrote:
> The example is this: find someone that accepts 1-block confirmed
> transactions in return for something valuable. There are plenty of them out
> there. Once the soft fork starts, send a P2SH transaction that defines a
> new output controlled by OP_CLTV. It will be incorporated into the UTXO set
> by all miners because it's opaque (p2sh).
> 
> Now send a transaction that pays the merchant, and make it spend your
> OP_CLTV output with an invalid script. New nodes will reject it as a rule
> violator. Old nodes won't.

Old nodes running bitcoind will see it as OP_NOP2, and will reject it
unless they've manually disabled SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS,
which (aiui) has been available since bitcoin 0.10 [0], but not backported
to 0.8 or 0.9.

[0] https://github.com/bitcoin/bitcoin/commit/0391423

That covers about 4700/5880 nodes going by bitnodes.21.co; but I can't
tell how many miners it covers.

Further, AIUI, nodes running 0.8 or 0.9 will still apply IsStandard()
checks to scripts attempting to spend p2sh outputs [1], so will also
fail to either mine or relay your OP_NOP2 payment.

[1] https://github.com/bitcoin/bitcoin/commit/6259937

> So at some point an old miner will create a
> block containing your invalid transaction, the merchant will think they got
> paid, they'll give you the stuff and the fraud is done.

My understanding is that this isn't supposed to be a problem because you
won't be able to find an old miner that will do that; released versions
of bitcoin already block it by default.

Sure, someone could disable those checks and not pay attention to a soft
fork that will cause their blocks to be orphaned, but I'm not seeing why
that's any different a threat compared to someone deliberately mining
invalid blocks to do 1-confirmation doublespends against merchants not
running a full node.

At least, that's my understanding, and I'm not an expert, so corrections
appreciated.

Cheers,
aj