cl, execution/execmodule: drive ForkChoiceUpdate per InsertBlocks batch#21525
Draft
sudeepdino008 wants to merge 1 commit into
Draft
cl, execution/execmodule: drive ForkChoiceUpdate per InsertBlocks batch#21525sudeepdino008 wants to merge 1 commit into
sudeepdino008 wants to merge 1 commit into
Conversation
During a large Caplin backfill, persistent_block_collector.Flush inserts all blocks via InsertBlocks and only issues a single ForkChoiceUpdate at the end, so the entire backfill (100k+ blocks) piles into BlockTransaction before execution and prune can drain it. Drive an FCU after each completed batch so execution + prune run mid-flush, bounding BlockTransaction growth.
ad9cf6a to
3fa8c81
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On a minimal/pruned node catching up after a gap, Caplin's
persistent_block_collector.Flushinserts the entire backfill viaInsertBlocksand only issues a singleForkChoiceUpdateat the very end. So the whole backfill (potentially 100k+ blocks for 2 weeks) lands inBlockTransactionbefore execution + prune can drain any of it.Change
Drive a
ForkChoiceUpdateafter each completedInsertBlocksbatch, so execution + prune run mid-flush and boundBlockTransactiongrowth instead of letting the full backfill accumulate first.Effect (minimal mainnet node, ~100k-block gap)
BlockTransactionmdbx.datTests
TestFlushDrivesFCUPerBatch,TestFlushSingleFCUWhenBelowBatchSize(collector)TestInsertBlocksWithBatchedFCU,TestInsertBlocksWithBatchedFCU_BadBlockRecovery_{Foreground,Background}(execmodule)Draft — full
make lint+ integration verification pending.