Skip to content

Allow capping data to N blocks with API retention NET-896#77

Open
kalabukdima wants to merge 2 commits into
masterfrom
hotblocks-api-head-retention
Open

Allow capping data to N blocks with API retention NET-896#77
kalabukdima wants to merge 2 commits into
masterfrom
hotblocks-api-head-retention

Conversation

@kalabukdima

Copy link
Copy Markdown
Contributor

Goal

If the archival data got stuck, the storage grows until running out of disk space leading to unpleasant consequences.

We can't reliably prevent it from happening. But we can sacrifice older blocks to keep serving the real-time data. Much less users will be affected by a gap than by a stale head.

Config changes

# bare — uncapped, exactly as before (backward compatible)
retention_strategy: Api

# nested — with the cap
retention_strategy:
  Api:
    max_blocks: 100000

Add an optional `max_blocks` to the Api config that trims the tail to
keep at most `max_blocks` from the head.
@kalabukdima kalabukdima requested a review from define-null June 24, 2026 08:56
@mo4islona mo4islona marked this pull request as ready for review June 24, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant