erigontech / erigontech/erigon
cl: caplin data-column pruning ignores --caplin.blobs-archive and --caplin.blobs-no-pruning
- Dominant language
- Go
- Stars
- 3.6k
- Forks
- 1.5k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 455
Description
`NewDataColumnStore` is constructed with `pruneBlobDistance` (`cmd/caplin/caplin1/run.go:417`), the value `--caplin.blobs-archive` and `--caplin.blobs-no-pruning` raise to `MaxUint64`. It lands in `dataColumnStorageImpl.slotsKept` (`cl/persistence/blob_storage/data_column_db.go:37,51`) and is never read.
`Prune` takes the distance as a parameter instead (`data_column_db.go:214`), and the caller passes `ColumnKeepSlots` (`cl/phase1/stages/cleanup_and_pruning.go:29-34`). Both flags are therefore inert for columns: a node started with `--caplin.blobs-archive` still drops data column sidecars at 131,072 slots.
Columns have no snapshot type and no freeze path, so there is no cold copy to fall back on. For an operator who asked to archive, this is permanent loss.
Two things to settle:
- whether the blob archive flags should govern columns at all, given columns cannot currently be archived — decision E on #23024
- if they should not, delete `slotsKept` rather than leave a field that reads as wired
Part of #23024, item 4.
Contributor guide
Research direction
Start in cmd/caplin/caplin1/run.go:417 and trace pruneBlobDistance into cl/persistence/blob_storage/data_column_db.go, then inspect Prune and its caller in cl/phase1/stages/cleanup_and_pruning.go. Resolve decision E from #23024 about whether archive flags apply to columns; done means the chosen behavior is explicit and slotsKept is either correctly used or removed, with column pruning covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- blockchain, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100