erigon icon indicating copy to clipboard operation
erigon copied to clipboard

reintroduce MaxReorgDepthV3 logic when collating files.

Open sudeepdino008 opened this issue 3 months ago • 0 comments

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.

sudeepdino008 avatar Nov 19 '24 00:11 sudeepdino008