How does Kaspa calculate the pruning point when a protocol upgrade activates?
When a Kaspa protocol upgrade activates, the network uses a precise formula to assign the pruning point for every block mined after that moment. A pruning point is a network checkpoint: data older than this point does not need to be stored by every node, which keeps storage requirements manageable over time. For any post-activation block B, the pruning point π(B) is whichever is deeper — the pruning point inherited from the block's last pre-activation chain ancestor (called pre(B)), or the block sitting at the new pruning depth P on the selected chain (called B_P). Written as a formula: π(B) := max(pre(B), B_P). This rule matters because the max() guarantee means the pruning boundary can never move backward during a protocol transition, protecting every node from data gaps that would break synchronization.