I perceive why a pruned node will fail to load a pockets file that is too outdated (i.e. a pockets whose final witnessed block happens previous to the earliest accessible 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 might’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 came about between steps):
-
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.
-
Hearth up the complete node and let it sync. The pockets.dat file will get modified (e.g. with newer “greatest chain” marker… and perhaps another database engine housekeeping stuff I am unaware of?).
-
Attempt to transfer the newest pockets.dat file again to the pruned node. You may see the error message I quoted.
-
When you use the pockets.dat from step #1 as a “crutch” to permit the pruned node to rise up up to now first, then restart it with the pockets.dat from step #3, it comes up simply effective.
I am having hassle reconciling why #4 works however #3 would not (see additionally !=
operator on this line of code). It is potential I lack enough understanding of what information a pruned node implicitly retains, exterior the pockets file and the present UTXO set in chainstate folder.