summaryrefslogtreecommitdiff
path: root/5b/b3464b2783321db9effc3d550e35308e5a05e3
blob: 106186d782222b687dc3593c6a52d9f499c43b23 (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
Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194]
	helo=mx.sourceforge.net)
	by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
	(envelope-from <gavinandresen@gmail.com>) id 1Qu5Go-0006Rn-19
	for bitcoin-development@lists.sourceforge.net;
	Thu, 18 Aug 2011 16:16:38 +0000
Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of gmail.com
	designates 209.85.210.42 as permitted sender)
	client-ip=209.85.210.42; envelope-from=gavinandresen@gmail.com;
	helo=mail-pz0-f42.google.com; 
Received: from mail-pz0-f42.google.com ([209.85.210.42])
	by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128)
	(Exim 4.76) id 1Qu5Gn-00050J-9z
	for bitcoin-development@lists.sourceforge.net;
	Thu, 18 Aug 2011 16:16:37 +0000
Received: by pzk37 with SMTP id 37so3226542pzk.1
	for <bitcoin-development@lists.sourceforge.net>;
	Thu, 18 Aug 2011 09:16:31 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.142.49.2 with SMTP id w2mr487099wfw.50.1313684191358; Thu, 18
	Aug 2011 09:16:31 -0700 (PDT)
Received: by 10.142.133.12 with HTTP; Thu, 18 Aug 2011 09:16:31 -0700 (PDT)
In-Reply-To: <CANEZrP0rXWO51O6wJfQ3r3A6bviZ7zpthJjzZkA0JDC7auBEdw@mail.gmail.com>
References: <CABsx9T0AgUL+rphhB8YUVHDGJnc0TmaYG=kjt7Pz1yrwLjBbDQ@mail.gmail.com>
	<1313681783.14523.79.camel@mei>
	<CANEZrP0rXWO51O6wJfQ3r3A6bviZ7zpthJjzZkA0JDC7auBEdw@mail.gmail.com>
Date: Thu, 18 Aug 2011 12:16:31 -0400
Message-ID: <CABsx9T2zpG=M6nkX4W=KrAJAYaTFR25_MLFmwj43+btWanqqsw@mail.gmail.com>
From: Gavin Andresen <gavinandresen@gmail.com>
To: Mike Hearn <mike@plan99.net>
Content-Type: text/plain; charset=ISO-8859-1
X-Spam-Score: -1.3 (-)
X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
	See http://spamassassin.org/tag/ for more details.
	-1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for
	sender-domain
	0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
	(gavinandresen[at]gmail.com)
	-0.0 SPF_PASS               SPF: sender matches SPF record
	-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	author's domain
	0.1 DKIM_SIGNED            Message has a DKIM or DK signature,
	not necessarily valid
	-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
	0.3 AWL AWL: From: address is in the auto white-list
X-Headers-End: 1Qu5Gn-00050J-9z
Cc: Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
Subject: Re: [Bitcoin-development] From the forums: one-confirmation attack
X-BeenThere: bitcoin-development@lists.sourceforge.net
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <bitcoin-development.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development>
List-Post: <mailto:bitcoin-development@lists.sourceforge.net>
List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=subscribe>
X-List-Received-Date: Thu, 18 Aug 2011 16:16:38 -0000

> For vectors variant, I wonder if it'd be safe to report the number of
> confirmations differently for the duration of a chain split. If you
> have a block but a majority of peers relayed a block that split the
> chain, subtract 1 from each confirmation reported via RPC.

Or maybe report them as 'suspicious.'  Changing the meaning of
'confirmations' is likely to break code (e.g. code like block =
current_blockchain[blockcount-tx.confirmations] ... would give the
wrong block).

A floating-point 0.0-1.0 'confidence' measure might be a good idea to
go along with the integer confirmations. I can think of all sorts of
ways of gauging the reliability of transactions or blocks (did it come
from a trusted peer-- assuming we eventually have trusted peers.  Does
it have a lot of confirmations?  Are there no active block chain
forks?  Have we been getting new blocks at the rate we expect?  etc
etc etc)

We could start with an as simple-as-possible "confidence == 0 if
confirmations < 2, otherwise confidence = function(#confirmations)"
and improve it from there.

-- 
--
Gavin Andresen