cip | 34 |
---|---|
title | Lower Sampling and Pruning Window to 14 days |
description | Lower Sampling and Pruning Window to 14 days |
author | Callum Waters (@cmwaters), Nashqueue (@Nashqueue) |
discussions-to | https://forum.celestia.org/t/cip-lower-sampling-and-pruning-window-to-14-days/1965 |
status | Draft |
type | Standards Track |
category | Data Availability |
created | 2025-03-17 |
supercedes | CIP-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
Parameter | Current value | Proposed value | Description |
---|---|---|---|
SamplingWindow | 720 hours | 336 hours | Defines how far back we sample to keep a continous chain |
PruningWindow | 721 hours | 337 hours | The minimum retention period of shares for serving the network |
TrustingPeriod | 336 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
Copyright and related rights waived via CC0.