The most common scenario for us is:
- Set the initial
from_head(K) to start syncing even if there is no archival data
- Every time there is a new index of archival chunks, call
retain with from_block set to the current archive height to clean up the old blocks.
However, it fails with heavy consequences in the following scenario:
- Archives stop syncing, so we periodically call
retain with from_block with the same block N
- When
Head - K becomes greater than N the storage starts to clean blocks up to Head - K
- The next time we call
retain(N) it says that there is a gap and drops the entire database
- It then starts ingestion from some block above the finalized head (2 blocks from head)
- This repeats on every consequent call to
retain(N)
I'd say the database should never be fully dropped without manual intervention. Once we run hotblocks in a separate service, we can add an internal endpoint for that.
The most common scenario for us is:
from_head(K)to start syncing even if there is no archival dataretainwithfrom_blockset to the current archive height to clean up the old blocks.However, it fails with heavy consequences in the following scenario:
retainwithfrom_blockwith the same blockNHead - Kbecomes greater thanNthe storage starts to clean blocks up toHead - Kretain(N)it says that there is a gap and drops the entire databaseretain(N)I'd say the database should never be fully dropped without manual intervention. Once we run hotblocks in a separate service, we can add an internal endpoint for that.