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.
Issue Addressed
Address a performance issue reported by @mcdee which boils down to reconstruction taking too long and starving the finalization migration.
Proposed Changes
Jim's node with per-slot diffs spent 110 epochs doing reconstruction before picking up another finalization migration. This is very slow, and causes severe issues for the caches (similar to 110 epochs of non-finality).
To address this I've reduced the maximum number of blocks processed in a single reconstruction batch by a factor of 32, down to 1024. This should mean that a node like Jim's spends around 110/32 = 3.5 epochs doing reconstruction before it does another finalization migration. This is much more manageable for the hot state cache (4 epochs * 32 slots = 128 states, which fits inside the cache with default sizing).