pub async fn run_prune_pass(
self_id: &PeerId,
storage: &Arc<LmdbStorage>,
paid_list: &Arc<PaidList>,
p2p_node: &Arc<P2PNode>,
config: &ReplicationConfig,
sync_state: &Arc<RwLock<NeighborSyncState>>,
allow_remote_prune_audits: bool,
) -> PruneResultExpand description
Execute post-cycle responsibility pruning.
For each stored record K:
- If
selfis within the storage-admission group (close_group_size + STORAGE_ADMISSION_MARGIN): clearRecordOutOfRangeFirstSeen. - If not in that group: set timestamp if not already set; delete if the
timestamp is at least
PRUNE_HYSTERESIS_DURATIONold and all but one of the strict current close group prove they store the record.
For each PaidForList entry K:
- If self is in
PaidCloseGroup(K): clearPaidOutOfRangeFirstSeen. - If not in group: set timestamp if not already set; remove entry if the
timestamp is at least
PRUNE_HYSTERESIS_DURATIONold and three quarters of the current paid close group (15 of 20 at production parameters) confirm the key in their ownPaidForList.
Compatibility wrapper for callers that have not adopted repair-proof
tracking. It preserves the original public signature, but it has no proof
table or advanced sync epoch to pass into record prune-confirmation audits.
Out-of-range records are therefore marked/deferred rather than deleted via
remote confirmation. The replication engine calls
run_prune_pass_with_context so it can pass real repair proofs.