erigon
erigon copied to clipboard
reintroduce MaxReorgDepthV3 logic when collating files.
func (a *Aggregator) BuildFilesInBackground(txNum uint64) chan struct{} {
-- builds snapshot files till passed txNum
, however this doesn't account for leaving some data in db (since the latest data can have reorgs).
- In erigon2, we had "hold 1 step in db" for snapshot files (txs/blocks/headers) and we moved to using
MaxReorgDepthV3
for changesets. - caplin has
safetyMargin
in antiquary.go
we should also use something similar like MaxReorgDepthV3 for domain/history files.
MaxReorgDepthV3
- must be measured in TxNums, not in Steps.