celestiaorg / celestiaorg/celestia-node

pruner: Handle out-of-order header deletion callbacks

Open
#5,189 0 comments 0 reactions 0 assignees View on GitHub
external needs:triage
Dominant language
Go
Stars
996
Forks
1.1k
Avg merge
1d 6h
Merged PRs (30d)
34

Description

### Problem

The header store invokes deletion callbacks concurrently when deleting large ranges. A callback for a higher height can therefore finish before a callback for a lower height.

`pruneOnHeaderDelete` currently advances `LastPrunedHeight` after the higher callback succeeds. The delayed lower callback then returns early because its height is below that watermark, even though its block data was never pruned. The header store receives a successful callback result and deletes the lower header, leaving the corresponding EDS or sampling data behind without a durable retry path.

### Expected behavior

Each header deletion callback should prune its own height independently of callback completion order. The sequential pruning loop, rather than unordered callbacks, should remain responsible for advancing `LastPrunedHeight`.

Contributor guide

Open the contributing guide

Research direction

Start at pruneOnHeaderDelete and trace how the sequential pruning loop advances LastPrunedHeight. Verify the callback handles its own height independently of completion order, while only the sequential loop advances the watermark; done means lower-height data is not left behind when callbacks complete out of order.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.