cip34
titleLower Sampling and Pruning Window to 14 days
descriptionLower Sampling and Pruning Window to 14 days
authorCallum Waters (@cmwaters), Nashqueue (@Nashqueue)
discussions-tohttps://forum.celestia.org/t/cip-lower-sampling-and-pruning-window-to-14-days/1965
statusDraft
typeStandards Track
categoryData Availability
created2025-03-17
supercedesCIP-4

Abstract

Lower the minimum sampling and pruning windows to 14 days and 14 days + 1 hour, respectively, to reduce storage costs in response to the network’s increasing throughput. This also ensures that the subjectively initialized header— which must be within the trusting period— can sample all headers within the sampling window without relying on backwards sync.

Parameters

ParameterCurrent valueProposed valueDescription
SamplingWindow720 hours336 hoursDefines how far back we sample to keep a continous chain
PruningWindow721 hours337 hoursThe minimum retention period of shares for serving the network
TrustingPeriod336 hours-The period, nodes will trust headers in because the validators are still economically accountable (must be less than the UnbondingPeriod)

Rationale

The next pending increase in throughput (32 MB blocks every 6 seconds) would require bridge nodes to store up to 1 TB per day. The current sampling window (30 days) implies that pruned bridge nodes need to have 30 TB of storage. This CIP reduces the sampling window to 14 days to reduce the storage requirement to 14 TB which makes it less costly to serve data to the network.

The current light node syncing logic involves performing sequential verification from genesis. Outside from the time and storage costs from syncing from genesis, it’s also vulnerable to long range attacks as headers beyond the trusting period are based on validators with “nothing at stake”. Having a sampling window or header pruning window greater than the trusting period will mean that nodes aren’t able to use sequential verification to sample all blocks within the window.

Backwards Compatibility

Nodes should first lower the sampling window to 14 days and once the majority of the network has upgraded, lower the pruning window to 14 days + 1 hour.

Copyright and related rights waived via CC0.