Skip to content

stagedsync: generate changesets near tip even during initialCycle#20495

Merged
yperbasis merged 1 commit intomainfrom
yperbasis/initialCycle
Apr 11, 2026
Merged

stagedsync: generate changesets near tip even during initialCycle#20495
yperbasis merged 1 commit intomainfrom
yperbasis/initialCycle

Conversation

@yperbasis
Copy link
Copy Markdown
Member

@yperbasis yperbasis commented Apr 11, 2026

Summary

  • shouldGenerateChangeSets no longer short-circuits on initialCycle — changesets are generated for blocks within MaxReorgDepth of the batch end regardless, so the node can always handle reorgs at the tip
  • Removes the initialCycle parameter from shouldGenerateChangeSets

Cherry-picked from #20445.

Instead of flipping initialCycle mid-batch in each executor, let
shouldGenerateChangeSets handle it directly: generate changesets for
blocks within MaxReorgDepth of the batch end regardless of initialCycle.

This removes the initialCycle parameter from shouldGenerateChangeSets
and the mid-batch initialCycle flips from exec3_serial and
exec3_parallel.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@yperbasis yperbasis added this pull request to the merge queue Apr 11, 2026
Merged via the queue into main with commit d283d30 Apr 11, 2026
35 checks passed
@yperbasis yperbasis deleted the yperbasis/initialCycle branch April 11, 2026 10:28
AskAlexSharov added a commit that referenced this pull request Apr 11, 2026
…cle (#20496)

Cherry-pick of #20495

Co-authored-by: yperbasis <andrey.ashikhmin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants