Wladimir J. van der Laan [ARCHIVE] on Nostr: 📅 Original date posted:2016-01-25 📝 Original message:> > To enable block ...
📅 Original date posted:2016-01-25
📝 Original message:> > 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
Published at
2023-06-07 17:47:55Event JSON
{
"id": "8b038c118003a65b126aed42b0720664ed3bf2e8a30e762a6e25fd6745ca72f2",
"pubkey": "5c0b7fca51fd4830b4d9f840de063faebeeabd3bb5dd118de9cdf50a6feaaf98",
"created_at": 1686160075,
"kind": 1,
"tags": [
[
"e",
"a2c5e8a8812a1fbb64bafec18efd3012d3b028a825e407ccb16effdc61bfee78",
"",
"root"
],
[
"e",
"e971807dc56be1234e0ea5e332a81be8ef1d4d298dc79d352486179ea9e09865",
"",
"reply"
],
[
"p",
"04038841fa1dffefb87710e6ca5bcef647155d764360a6d1e77ab28e7646a869"
]
],
"content": "📅 Original date posted:2016-01-25\n📝 Original message:\u003e \u003e To enable block pruning set prune=\u003cN\u003e on the command line or in\n\u003e \u003e bitcoin.conf, where N is the number of MiB to allot for raw block \u0026 undo\n\u003e \u003e data.\n\u003e \n\n\u003e From having read the Bitcoin whitepaper quite a few months ago ago, I have the \n\u003e very very basic understanding that pruning is meant to:\n\u003e - delete old transaction data which merely \"moves coins around\"\n\u003e - instead only store the \"origin\" (= block where coins were mined) and \n\u003e \"current location\" of the coins, i.e. the unspent transactions. Notably, I \n\u003e understood it as \"this is as secure as storing everything, since we know where \n\u003e the coins were created, and where they are\".\n\u003e \n\u003e So from that point of view, I would assume that there is a \"natural\" amount of \n\u003e megabytes which a fully pruned blockchain consists of: It would be defined by \n\u003e the final amount of unspent coins.\n\u003e I thereby am confused why it is possible to configure a number of megabytes \n\u003e \"to allot for raw block \u0026 undo data\". I would rather expect pruning just to be \n\u003e a boolean on/off flag, and the number of megabytes to be an automatically \n\u003e computed result from the natural size of the dataset.\n\u003e And especially, I fear that I could set N too low, and as a result, it would \n\u003e delete \"too much\". I mean could this result in even security relevant \n\u003e transaction data being deleted?\n\nThe term 'pruning', unfortunately is very much overused and overloaded in the\nbitcoin ecosystem. Satoshi's paper refers to UTXO pruning. This is Pieter Wuille's \"ultraprune\",\nwhich has been part of Bitcoin Core for more than three years.\n\nBlock pruning is not mentioned in that paper because it is just administrative,\nthe only reason that nodes store historical blocks at all is to serve it to other nodes,\nas well as to catch up the wallet status and for -reindexes.\n\n\u003e Thus, it would be nice if you could yet once more edit the release notes to:\n\nI don't have time to work on the release notes right now, but if someone else\nwants to contribute that'd be awesome.\n\n\u003e - explain why a N must be given\n\nTo give a quotum. The point is that the user can choose how much harddisk space they want to\ndedicate to block storage.\n\nBlock data that is stored can be used by other software, or potentially be\nserved to other nodes. The latter is not implemented at the moment - it would require\na change to the P2P protocol, thus right now pruning nodes don't serve block\ndata at all.\n\n\u003e - what a \"safe\" value of N is. I.e. how large must N be at least to not delete \n\u003e security-relevant stuff?\n\nThere is no security compromise with pruning. Any value of N is intended to be safe.\n\nVery low values would delete undo data that may be necessary in a reorganization,\nbut this is prohibited by argument checks.\n\nRelease notes are not meant as a replacement or supplement for documentation.\nThe documentation for -prune is this:\n\n -prune=\u003cn\u003e\n Reduce storage requirements by pruning (deleting) old blocks. This mode\n is incompatible with -txindex and -rescan. Warning: Reverting this\n setting requires re-downloading the entire blockchain. (default: 0 =\n disable pruning blocks, \u003e550 = target size in MiB to use for block\n files)\n\n\u003e - maybe mention if there is a \"auto\" setting for N to ensure that it choses a \n\u003e safe value on its own?\n\nAs said, there is no safe or unsafe value. The lowest acceptable value is just as safe\nas storing everything.\n\nWladimir",
"sig": "d2ce1a354ce33e654517690eeba0006d3bd14ce8911a76ef7bb651e9a2dc096e886aa2d59fd8fac5cf30b420bb27c66eccb8aa4ea1466a8686ac1a9d6a18077f"
}