Subject: Re: [Bitcoin-development] From the forums: one-confirmation attack

From: Gavin Andresen <[email-masked]>
Date: Thu, 18 Aug 2011 12:16:31 -0400

> 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