pockets.dat – Why cannot pruned node load a pockets that final witnessed a future block?

0
4
pockets.dat – Why cannot pruned node load a pockets that final witnessed a future block?


I perceive why a pruned node will fail to load a pockets file that is too previous (i.e. a pockets whose final witnessed block happens previous to the earliest obtainable block within the pruned node’s historical past).

I collect when making an attempt to take action you get “Error: Prune: final pockets synchronisation goes past pruneddata”.

Nonetheless, I observed the identical error being displayed when attempting to load a pockets.dat file that final witnessed a future block which the pruned node hasn’t but seen.

I am questioning why it could’t merely obtain (and discard as applicable) blocks as much as the one the pockets final witnessed, then proceed marching on from there?


A sequence to breed the habits goes like this (for simplicity, no transactions affecting the pockets happened between steps):

  1. Take pockets.dat from a pruned node that hasn’t been synced in a very long time, and transfer it to the atmosphere of a full node.

  2. Fireplace up the total node and let it sync. The pockets.dat file will get modified (e.g. with newer “finest chain” marker… and possibly another database engine housekeeping stuff I am unaware of?).

  3. Attempt to transfer the most recent pockets.dat file again to the pruned node. You will see the error message I quoted.

  4. When you use the pockets.dat from step #1 as a “crutch” to permit the pruned node to rise up so far first, then restart it with the pockets.dat from step #3, it comes up simply high-quality.

I am having bother reconciling why #4 works however #3 does not (see additionally != operator on this line of code). It is potential I lack enough understanding of what knowledge a pruned node implicitly retains, exterior the pockets file and the present UTXO set in chainstate folder.

LEAVE A REPLY

Please enter your comment!
Please enter your name here