4444-ish: Cleanup/disable header only forward sync#8209
Conversation
8f72a88 to
0e938b9
Compare
…der-only-forward-sync
…der-only-forward-sync
MarekM25
left a comment
There was a problem hiding this comment.
Have you tested it on a pre-merge network? EnergyWeb or Joc?
| iterations++; | ||
| if (iterations > MaxBranchSize) | ||
| { | ||
| throw new InvalidOperationException($"Maximum size of branch reached ({MaxBranchSize}). This is unexpected."); |
There was a problem hiding this comment.
What if we want to do reorg with more blocks? I know that it is currently impossible, but we should aim to be able reorg to the last finalized block and we might have long non-finality events like in Holesky
There was a problem hiding this comment.
Increase MaxBranchSize?
There was a problem hiding this comment.
Actually, assuming that a beacon sync was initiated, this should not get called as block downloader would suggest the block one by one.
| } | ||
|
|
||
| currentNumber += 1; | ||
| _currentNumber += 1; |
There was a problem hiding this comment.
Could this get out of sync with actual block numbers being requested?
There was a problem hiding this comment.
Line 155 reset it and only one of this DownloadBlocks is executed at any time.
IBlockchainProcessorwill process its parents also.SyncPivotis movable.--Sync.DownloadBodiesInFastSync false, then restart withtrueafter finished state sync will result in gap of block after the sync pivot to no longer be the case. The same is true with receipts, which I'm also inclined to just always download receipt for block afterSyncPivot.BlockchainProcessorwill load all pending blocks anyway resulting in a very high memory and processing a lot of blocks.Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing