Skip to content

Add support for dynamic state syncing to the sync client #4582

@powerslider

Description

@powerslider

Summary

Goal

  • Extend the current static state sync to a dynamic model where sync targets can change during synchronization and block execution continues after finalization with a controlled queue.

Key ideas

  • Start all syncers concurrently and independently.
  • Allow UpdateSyncTarget to advance the sync target while syncers are running.
  • Disallow further target updates once all syncers reach a consistent target.
  • Finalize VM state (blockchain, atomic, shared memory, indices) before any post-finalization block execution.
  • Buffer blocks that arrive during dynamic sync in a BlockQueue and execute them after finalization, with batching and race-safe cut-offs.
  • Drive behavior with a clear state machine to handle edge cases and consistency

Non-goals

  • No changes to consensus rules or block validation semantics.
  • No redesign of underlying syncers’ low-level protocols - we adapt them via an interface for dynamic target updates.

Metadata

Metadata

Assignees

Labels

Type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions