Skip to content

add startup safety check for massive pruning operations #555

@dhyaniarun1993

Description

@dhyaniarun1993

Describe the feature

The op-proofs ExEx runs an automated prune_task to enforce the configured proofs_history_window (e.g., 7 days). Currently, this task starts immediately when the node launches.

If a node operator drastically reduces the retention window in the configuration (e.g., changing from 30 days to 7 days), the pruner will attempt to delete millions of blocks of historical data in the first run.

This causes:

  1. Write Locks: The massive delete transaction locks the MDBX database tables for an extended period.
  2. Performance Degradation: The I/O storm from deleting millions of keys stalls the main execution pipeline, potentially causing the node to fall out of sync.

Solution
We should implement a "Safety Threshold" check during the ExEx initialization phase, before the background pruner is spawned.

Additional context

No response

Metadata

Metadata

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions