summaryrefslogtreecommitdiff
path: root/a1/86679305b89f0f7efe95e1b26f0ab29e5d9d91
blob: 5c3df7550771a2b452111ccc2de6705100c39669 (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
Return-Path: <tomh@thinlink.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id 1D282B4C
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Sun,  5 Jul 2015 15:00:38 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-pd0-f175.google.com (mail-pd0-f175.google.com
	[209.85.192.175])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id C6E3132
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Sun,  5 Jul 2015 15:00:37 +0000 (UTC)
Received: by pdbci14 with SMTP id ci14so90729149pdb.2
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Sun, 05 Jul 2015 08:00:37 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20130820;
	h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to
	:subject:content-type:content-transfer-encoding;
	bh=hdVhWos20cwHGGfsRT8CNSLDlYjdKPQtOAWK5Z7cEKM=;
	b=H8Ctq0IPlPzZAoETGtpzgUDs/LZmCAcUBTqoN+4bqpXgWygtfGGPNSvaUbj2RKHBeC
	65SgYDVh+CU2Jf9Zq4aUkvZHXA/VgvI28Nurv1d8nF73QwmcbIiINyAiULoCsc4q9Kv5
	+VLImo7KBICrH8johZA85NiEOiOTm3lrieoo7ZGM1LlvqYvnxd45qZNM0XDUJ/qwjE9b
	YUYyTV7b/85NKvrPlDYZ41GAbyyz9Fw6rAT89onxrqBnS7QY5B6Pr6MwHH/OE4Unul0X
	unRyhBasbai/HTd7awepMk9lm79WqAA1DAZZlk4ABRWH3qTvYh1MKSlV6M2Zq7UJry7W
	O//g==
X-Gm-Message-State: ALoCoQmYFzCjTJ9PXvfqYHQft0mwfjs/vv9yEQmzFj2FAGBoRi3uiz6ubMNLteOt7cMG9fdEarXR
X-Received: by 10.68.204.133 with SMTP id ky5mr96336426pbc.67.1436108437378;
	Sun, 05 Jul 2015 08:00:37 -0700 (PDT)
Received: from [192.168.1.89] (99-8-65-117.lightspeed.davlca.sbcglobal.net.
	[99.8.65.117]) by mx.google.com with ESMTPSA id
	a10sm15149339pdn.57.2015.07.05.08.00.35
	for <bitcoin-dev@lists.linuxfoundation.org>
	(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
	Sun, 05 Jul 2015 08:00:36 -0700 (PDT)
Message-ID: <55994696.1090705@thinlink.com>
Date: Sun, 05 Jul 2015 08:00:38 -0700
From: Tom Harding <tomh@thinlink.com>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64;
	rv:31.0) Gecko/20100101 Thunderbird/31.7.0
MIME-Version: 1.0
To: bitcoin-dev@lists.linuxfoundation.org
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW
	autolearn=ham version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	smtp1.linux-foundation.org
Subject: [bitcoin-dev] BIP 68 (Relative Locktime) bug
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: Sun, 05 Jul 2015 15:00:38 -0000

BIP 68 uses nSequence to specify relative locktime, but nSequence also
continues to condition the transaction-level locktime.

This dual effect will prevent a transaction from having an effective
nLocktime without also requiring at least one of its inputs to be mined
at least one block (or one second) ahead of its parent.

The fix is to shift the semantics so that nSequence = MAX_INT - 1
specifies 0 relative locktime, rather than 1.  This change will also
preserve the semantics of transactions that have already been created
with the specific nSequence value MAX_INT - 1 (for example all
transactions created by the bitcoin core wallet starting in 0.11).