5

Pruning nodes are described in the sourcecode thusly:

-prune=<n>: Reduce storage requirements by pruning (deleting) old blocks. This mode is incompatible with -txindex and -rescan.

I’ve watched that my node has been consistently uploading less than it has been downloading since I set it to run in pruning mode.

  • What services do pruning nodes still perform?
  • Do they upload blocks and transactions?
  • Can they service thin clients?
  • What can a pruning node not do, that a non-pruning node does?

3 Answers 3

5

From release notes https://bitcoin.org/en/release/v0.11.0 :

For now, block pruning disables block relay. In the future, nodes with block pruning will at a minimum relay “new” blocks, meaning blocks that extend their active chain.

In the current version pruning nodes don't advertise themselves as having any blocks, so they don't upload blocks. So that explains your big reduction in upstream data. A future update will re-enable block relay in such a way that your nodes can efficiently let its peers know which blocks it owns and which it doesn't.

Yes your pruning node will do full validation and it will service lightweight nodes.

2
  • This answer should be updated to reflect the behavior of current versions. AFAIK, new versions of Core can now serve the blocks they have in store.
    – Murch
    Commented Mar 11, 2017 at 11:14
  • 1
    They always could relay new blocks - ever since the feature was introduced in 0.11. However, until BIP159 is implemented, they can't advertize the fact that they will do so. As a result, in practice it won't serve any light clients. Commented Nov 19, 2017 at 21:46
4

Pruned nodes do not advertise NODE_NETWORK. Thus, peers will not request buried blocks from them. However, pruned nodes relay blocks at the chain-tip and newly received transactions to their peers.

In 2017, BIP159: NODE_NETWORK_LIMITED service bit (Pull Request) proposed an additional service flag with which pruned nodes could advertise being able to serve the latest 288 blocks and thus most of the lightweight client requests. Support for NODE_NETWORK_LIMITED was then added in 2018 with Bitcoin Core v0.16.0 signaling NODE_NETWORK_LIMITED and Bitcoin Core v0.17.0 starting to make outbound connections to nodes signaling NODE_NETWORK_LIMITED.

0

A pruning node will trim the number of transactions you need to store. In the most extreme cases, they can store just the UTXO set and the most recent couple blocks, but the degree of pruning is variable, and up to the node operator. Think of it like this:

Alice sends 5 BTC from address 1www to Bob, at address 1xxx. 

Bob sends 2 BTC to Carl at address 1yyy, and 3 BTC to Dave at address 1zzz.

Carl sends his 2 BTC to Dave at address 1zzz.

A normal node would need to store all the intermediate data, that is, (Alice -> Bob), (Bob -> Carl), (Bob -> Dave), (Carl -> Dave).

A pruning node, however, only needs to store the final link in each step. If Alice has no more coins in her address, there is no need to keep it around, you can safely discard it. The pruning node would only contain the data for the UTXO set, in this case, the 5 coins that Dave has.

Pruning nodes can validate transactions, verify that the sender does in fact have coins to send, and relay them to the rest of the network. They can also be used by the owner to check their balance completely privately, no need to ask someone else who has a copy of the pruned chain.

7
  • Sorry, but it seems to me that you think I'm asking about SPV clients which I'm not.
    – Murch
    Commented Jan 11, 2016 at 23:52
  • I'm in the middle of updating the answer to be less brief. I believe i'm addressing your question at the end (that is, what a pruning node can do for the network). Commented Jan 11, 2016 at 23:54
  • Okay, but pruning nodes do keep part of the blockchain, just not all of it.
    – Murch
    Commented Jan 11, 2016 at 23:57
  • 1
    The part where you say it only keeps the utxo set. A pruning node is an instance of bitcoind that does have the utxo set and n MiB of the blockchain. In my case that is 20,000 MiB. I'm wondering whether my node serves these blocks to peers as full nodes without pruning do, and especially whether it can serve SPV clients - which I doubt, but if they are asking about recent nodes would be a possibility.
    – Murch
    Commented Jan 12, 2016 at 0:06
  • 1
    No, a node with prune doesn't advertise itself as able to serve blocks.
    – Claris
    Commented Jan 12, 2016 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.