Skip to content

--prune.receipts.distance has no effect on Storage V2 nodes — receipts written to static files instead of DB #24591

@dvs-one

Description

@dvs-one

Describe the bug

On a Storage V2 node (default in reth v2.0.0+), setting "--prune.receipts.distance " has no effect. Receipts accumulate in static files indefinitely and are never pruned.

For Storage V2, receipts are only routed to the DB when receipts_log_filter is non-empty. The receipts field (set by --prune.receipts.distance) is not checked. This means distance-based receipt pruning is silently ignored on Storage V2 nodes.

Steps to reproduce

Run reth v2.0.0+ with:
--full --prune.receipts.distance 100800

After 14+ days, observe that reth_pruner_segments_highest_pruned_block{segment="Receipts"} is stuck at the static file boundary and receipts continue accumulating past the configured distance.

Observed metrics:

  • rate(reth_database_operation_calls_total{table="Receipts",operation="cursor-delete-current"}[5m]) = consistently 0
  • Single receipt static file growing continuously, no DB receipt pruning activity

Node logs


Platform(s)

Linux (x86)

Container Type

Docker

What version/commit are you on?

Reth Version: 2.0.0
Commit SHA: eb4c15e
Build Timestamp: 2026-04-07T12:47:39.107743398Z

(also present in v2.1.0 and v2.2.0 — the TODO comment in the Storage V2 branch suggests awareness of an adjacent issue but distance pruning was not addressed)

What database version are you on?

2

Which chain / network are you on?

mainnet

What type of node are you running?

Pruned with custom reth.toml config

What prune config do you use, if any?

[prune]
block_interval = 5
minimum_pruning_distance = 10064

[prune.segments]
sender_recovery = "full"

[prune.segments.receipts]
distance = 100800

[prune.segments.account_history]
distance = 10064

[prune.segments.storage_history]
distance = 10064

[prune.segments.bodies_history]
before = 15537394

If you've built Reth from source, provide the full command you used

No response

Code of Conduct

  • I agree to follow the Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugAn unexpected or incorrect behaviorS-needs-triageThis issue needs to be labelled

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions