public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: "Wladimir J. van der Laan" <laanwj@gmail•com>
To: xor@freenetproject•org
Cc: bitcoin-dev@lists•linuxfoundation.org
Subject: Re: [bitcoin-dev] Bitcoin Core 0.12.0 release candidate 1 available
Date: Mon, 25 Jan 2016 16:05:59 +0100	[thread overview]
Message-ID: <20160125150559.GA28847@amethyst.visucore.com> (raw)
In-Reply-To: <2815165.aykQg88K5r@1337h4x0r>

> > To enable block pruning set prune=<N> on the command line or in
> > bitcoin.conf, where N is the number of MiB to allot for raw block & undo
> > data.
> 

> From having read the Bitcoin whitepaper quite a few months ago ago, I have the 
> very very basic understanding that pruning is meant to:
> - delete old transaction data which merely "moves coins around"
> - instead only store the "origin" (= block where coins were mined) and 
> "current location" of the coins, i.e. the unspent transactions. Notably, I 
> understood it as "this is as secure as storing everything, since we know where 
> the coins were created, and where they are".
> 
> So from that point of view, I would assume that there is a "natural" amount of 
> megabytes which a fully pruned blockchain consists of: It would be defined by 
> the final amount of unspent coins.
> I thereby am confused why it is possible to configure a number of megabytes 
> "to allot for raw block & undo data". I would rather expect pruning just to be 
> a boolean on/off flag, and the number of megabytes to be an automatically 
> computed result from the natural size of the dataset.
> And especially, I fear that I could set N too low, and as a result, it would 
> delete "too much". I mean could this result in even security relevant 
> transaction data being deleted?

The term 'pruning', unfortunately is very much overused and overloaded in the
bitcoin ecosystem. Satoshi's paper refers to UTXO pruning. This is Pieter Wuille's "ultraprune",
which has been part of Bitcoin Core for more than three years.

Block pruning is not mentioned in that paper because it is just administrative,
the only reason that nodes store historical blocks at all is to serve it to other nodes,
as well as to catch up the wallet status and for -reindexes.

> Thus, it would be nice if you could yet once more edit the release notes to:

I don't have time to work on the release notes right now, but if someone else
wants to contribute that'd be awesome.

> - explain why a N must be given

To give a quotum. The point is that the user can choose how much harddisk space they want to
dedicate to block storage.

Block data that is stored can be used by other software, or potentially be
served to other nodes. The latter is not implemented at the moment - it would require
a change to the P2P protocol, thus right now pruning nodes don't serve block
data at all.

> - what a "safe" value of N is. I.e. how large must N be at least to not delete 
> security-relevant stuff?

There is no security compromise with pruning. Any value of N is intended to be safe.

Very low values would delete undo data that may be necessary in a reorganization,
but this is prohibited by argument checks.

Release notes are not meant as a replacement or supplement for documentation.
The documentation for -prune is this:

  -prune=<n>
       Reduce storage requirements by pruning (deleting) old blocks. This mode
       is incompatible with -txindex and -rescan. Warning: Reverting this
       setting requires re-downloading the entire blockchain. (default: 0 =
       disable pruning blocks, >550 = target size in MiB to use for block
       files)

> - maybe mention if there is a "auto" setting for N to ensure that it choses a 
> safe value on its own?

As said, there is no safe or unsafe value. The lowest acceptable value is just as safe
as storing everything.

Wladimir



  parent reply	other threads:[~2016-01-25 15:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-17 10:08 Wladimir J. van der Laan
2016-01-17 22:57 ` xor
2016-01-18 11:14   ` Wladimir J. van der Laan
2016-01-19  6:06     ` xor
2016-01-25 12:03       ` Wladimir J. van der Laan
2016-01-25 12:27         ` xor
2016-01-25 14:44           ` Marco Falke
2016-01-25 15:05           ` Wladimir J. van der Laan [this message]
2016-01-25 15:57             ` Simon Selitsky
2016-01-25 16:12               ` Jonas Schnelli
2016-01-25 17:33             ` xor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160125150559.GA28847@amethyst.visucore.com \
    --to=laanwj@gmail$(echo .)com \
    --cc=bitcoin-dev@lists$(echo .)linuxfoundation.org \
    --cc=xor@freenetproject$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox