From 1e01ab10d5d05abe8e60f74bc7729c23bab2cd86 Mon Sep 17 00:00:00 2001 From: rene <41963722+renaynay@users.noreply.github.com> Date: Wed, 7 Feb 2024 20:08:15 +0100 Subject: [PATCH 1/3] fix(cips): Clarify sampling window vs pruning window --- cips/cip-4.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cips/cip-4.md b/cips/cip-4.md index 44e70662..1a0577df 100644 --- a/cips/cip-4.md +++ b/cips/cip-4.md @@ -34,19 +34,19 @@ On the Celestia data availability network, both pruned and non-pruned nodes MAY Non-pruned nodes MAY advertise themselves under a new `archival` tag, in which case the nodes MUST store and distribute data in all blocks. -Data availability sampling light nodes SHOULD sample blocks created in the last 30 days + 1 hour worth of seconds (the sampling window of 2595600 seconds). +Data availability sampling light nodes SHOULD sample blocks created in the last 30 days worth of seconds (the sampling window of 2592000 seconds). ## Rationale -30 days + 1 hour worth of seconds (2595600 seconds) is chosen for the following reasons: +30 days worth of seconds (2592000 seconds) is chosen for the following reasons: * Data availability sampling light nodes need to at least sample data within the Tendermint weak subjectivity period of 21 days in order to independently verify the data availability of the chain, and so they need to be able to sample data up to at least 21 days old. -* 30 days + 1 hour worth of seconds (2595600 seconds) ought to be a reasonable amount of time for data to be downloaded from the chain by any application that needs it, accounting for clock drift. +* 30 days worth of seconds (2,592,000 seconds) ought to be a reasonable amount of time for data to be downloaded from the chain by any application that needs it. ## Backwards Compatibility The implementation of pruned nodes will break backwards compatibility in a few ways: -1. Light nodes running on older software (without the sampling window) will not be able to sample historical data (blocks older than 30 days + 1 hour) as nodes advertising on the `full` tag will no longer be expected to provide historical blocks. +1. Light nodes running on older software (without the sampling window) will not be able to sample historical data (blocks older than 30 days) as nodes advertising on the `full` tag will no longer be expected to provide historical blocks. 2. Similarly, full nodes running on older software will not be able to sync historical blocks without discovering non-pruned nodes on the `archival` tag. 3. Requesting blobs from historical blocks via a light node or full node will not be possible without discovering non-pruned nodes on the `archival` tag. @@ -59,7 +59,7 @@ Implementation for light nodes can be quite simple, where a satisfactory impleme Given a hypothetical "sample" function that performs data availability sampling of incoming extended headers from the network, the decision to sample or not should be taken by inspecting the header's timestamp, and ignoring it in any sampling operation if the duration between the header's timestamp and the current time exceeds the duration of the sampling window. For example: ```go -const windowSize = time.Second * 86400 * 30 + (1 * 60 * 60) // 30 days + 1 hour worth of seconds (2595600 seconds) +const windowSize = time.Second * 86400 * 30 // 30 days worth of seconds (2592000 seconds) func sample(header Header) error{ if time.Since(header.Time()) > windowSize { @@ -82,7 +82,7 @@ A satisfactory implementation would be where any node implementing storage pruni ## Security Considerations -As discussed in Rationale, data availability sampling light nodes need to at least sample data within the Tendermint weak subjectivity period of 21 days in order to independently verify the data availability of the chain. 30 days + 1 hour of seconds (2595600 seconds) exceeds this. +As discussed in Rationale, data availability sampling light nodes need to at least sample data within the Tendermint weak subjectivity period of 21 days in order to independently verify the data availability of the chain. 30 days of seconds (2592000 seconds) exceeds this. ## Copyright From 44d65cc0adb6ffec209a51740b46b9de7fc59f82 Mon Sep 17 00:00:00 2001 From: rene <41963722+renaynay@users.noreply.github.com> Date: Wed, 7 Feb 2024 23:03:11 +0100 Subject: [PATCH 2/3] fix(cips): remove commas --- cips/cip-4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cips/cip-4.md b/cips/cip-4.md index 1a0577df..5d4164ef 100644 --- a/cips/cip-4.md +++ b/cips/cip-4.md @@ -40,7 +40,7 @@ Data availability sampling light nodes SHOULD sample blocks created in the last 30 days worth of seconds (2592000 seconds) is chosen for the following reasons: * Data availability sampling light nodes need to at least sample data within the Tendermint weak subjectivity period of 21 days in order to independently verify the data availability of the chain, and so they need to be able to sample data up to at least 21 days old. -* 30 days worth of seconds (2,592,000 seconds) ought to be a reasonable amount of time for data to be downloaded from the chain by any application that needs it. +* 30 days worth of seconds (2592000 seconds) ought to be a reasonable amount of time for data to be downloaded from the chain by any application that needs it. ## Backwards Compatibility From 3d3cc5b639ee55086d9a23c230e01a82e3c6fdd3 Mon Sep 17 00:00:00 2001 From: rene <41963722+renaynay@users.noreply.github.com> Date: Wed, 7 Feb 2024 23:43:58 +0100 Subject: [PATCH 3/3] chore(cips): Add definitions for sampling + pruning window --- cips/cip-4.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cips/cip-4.md b/cips/cip-4.md index 5d4164ef..2341aabe 100644 --- a/cips/cip-4.md +++ b/cips/cip-4.md @@ -36,6 +36,12 @@ Non-pruned nodes MAY advertise themselves under a new `archival` tag, in which c Data availability sampling light nodes SHOULD sample blocks created in the last 30 days worth of seconds (the sampling window of 2592000 seconds). +## Definitions + +**Sampling Window** - the period within which light nodes should sample blocks, specified at 30 days worth of seconds. + +**Pruning Window** - the period within which both pruned and non-pruned full storage nodes must store and distribute data in blocks, specified at 30 days + 1 hour worth of seconds. + ## Rationale 30 days worth of seconds (2592000 seconds) is chosen for the following reasons: