Skip to content
Unverified Commit 06a68bec authored by Liu-Cheng Xu's avatar Liu-Cheng Xu Committed by GitHub
Browse files

Pure state sync refactoring (part-1) (#6249)

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.
parent 95be9c18
Pipeline #505949 waiting for manual action with stages
in 1 hour, 15 minutes, and 45 seconds