Skip to content
Snippets Groups Projects
  1. Nov 18, 2024
    • Liu-Cheng Xu's avatar
      Pure state sync refactoring (part-1) (#6249) · 06a68bec
      Liu-Cheng Xu authored
      This pure refactoring of state sync is preparing for
      https://github.com/paritytech/polkadot-sdk/issues/4. As the rough plan
      in
      https://github.com/paritytech/polkadot-sdk/issues/4#issuecomment-2439588876,
      there will be two PRs for the state sync refactoring.
      
      This first PR focuses on isolating the function
      `process_state_key_values()` as the central point for storing received
      state data in memory. This function will later be adapted to forward the
      state data directly to the DB layer for persistent sync. A follow-up PR
      will handle the encapsulation of `StateSyncMetadata` to support this
      persistent storage.
      
      Although there are many commits in this PR, each commit is small and
      intentionally incremental to facilitate a smoother review, please review
      them commit by commit. Each commit should represent an equivalent
      rewrite of the existing logic, with one exception
      https://github.com/paritytech/polkadot-sdk/commit/bb447b2d,
      which has a slight deviation from the original but is correct IMHO.
      Please give this commit special attention during the review.