4

I was reading about pruning in Ethereum which is basically a way to run a full node without needing to keep over 1TB of blockchain data. To my understanding, the whole blockchain exists but only keeps the state hashes, while the old trees themselves are not kept. Security is not an issue with the Proof of Work consensus properties assuming we keep a sufficient "depth" of states.

My questions are as follows:

  1. Besides the various blogposts and stackexchange answers, is pruning more formally described somewhere? I don't see anything mentioned in the yellowpaper.
  2. I understand that by pruning the states, and since ethereum is account-based and not UTXO-based, you can still get an account balance but you can't derive the historical balance of an account. Does this imply that you can't query for old transactions as well? (assuming no archival nodes exist)

1 Answer 1

1

Seeing as nobody else has provided any answer let me try to give an answer of some sort. I'm not very familiar with this and googling was giving me a bit contradictory results - somebody please correct me if I'm wrong. I was trying to summarize different synchonization types a while ago without much feedback: Different synchronization types

I'd imagine that the "full" node is the original way of synchronizing a node. On top of that the client developers have devised other ways to get synchronized. An archival node is one of such new ways and most people don't really need all that archive data.

My understanding has been that an archival node is like full node but archival nodes also store all the intermediary states. So if a block has 100 transactions it stores the states between each transaction. This is useful for some purposes such as finding out whether an account has ever contained more than X Ethers (it may contain less before the block and less after the block but more inside the block).

A full node also includes all the transactions. Therefore, if needed, you can create an archival node from a full node, unless I'm mistaken.

3
  • First of all, the best way to find a precise answer would be to find this officially documented. I'm very surprised Ethereum (to my knowledge) doesn't have it documented somewhere. Second, to my understanding there is a threshold of "block depth" that the state trees are not kept by a full node, but just their "roots" in the blocks, while archival nodes still keep old trees. Your explanation of pruning the intermediate states and a full node be able to reconstruct them (i.e. trade space for computation) sounds plausible but I would still like to see something officially documented to be sure..
    – Panos
    Jul 25, 2019 at 1:55
  • I was trying to hint at why it's not documented, or at least my point of view for it: it's a client feature and not a blockchain feature as such. Jul 25, 2019 at 4:34
  • 1
    I don't agree that it is just a client feature. Full nodes are essential parts of a blockchain. Since ethereum allows pruning of any form in full nodes, they should provide at least an "informal" argument of why this won't harm its security and what exactly is the functionality loss of pruning.
    – Panos
    Jul 25, 2019 at 15:02

Your Answer

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

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