Open tbenr opened 1 month ago
It would be good if we are not trying state reconstruction too far from archive state. Say, we have states since 9,000,000 slot and user is requesting state from slot 8,999,000. It would be good to give up immediately with 404 or whatever without trying to reconstruct it from genesis. Not sure if it works already like this. Is it?
Currently working on this with the following approach:
--data-storage-archive-retained-epochs
is set.
In some scenarios, users could be interested in running archive nodes (with finalized states) up to a certain time in the past. This could enable having a low value in
--data-storage-archive-frequency
, so the node can be very responsive within the interested time interval.To achieve this we could add a
--data-storage-archive-retained-epochs
(or similar). Setting value to1024
, teku will prune finalized states older than 1024 epochs compared to the current epoch.A node running this way won't be a strict archive node, kind of a "time limited archive node".
Note: We should not allow state reconstruction when running in this mode.