Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate StateSync module with RemoveUntraceableHeaders option #3795

Open
AnnaShaleva opened this issue Jan 24, 2025 · 0 comments
Open

Integrate StateSync module with RemoveUntraceableHeaders option #3795

AnnaShaleva opened this issue Jan 24, 2025 · 0 comments
Labels
blocked Can't be done because of something bug Something isn't working I3 Minimal impact S2 Regular significance U3 Regular
Milestone

Comments

@AnnaShaleva
Copy link
Member

Current Behavior

StateSync module is not integrated with RemoveUntraceableHeaders option. I.e StateSync module will sync headers starting from genezis irrespective of RemoveUntraceableHeaders setting.

Expected Behavior

If RemoveUntraceableHeaders is enabled, then fetch only latest MaxTraceableBlocks number of headers prior to the current state sync point.

Possible Solution

#3789 introduces a part of it: it implements AddHeaders/HeaderHeight interfaces over StateSync module, which allows to use StateSync module instead of Blockchain as a backend for headers queue. What we still need to implement:

  1. Add Module.headerHeight field that should be processed the same way as Module.blockHeight: set it to the latest desired header, update according to the headers insertion.
  2. Request headers based on StateSync's header height instead of blockchain's header height.

In other words, we need to copy the solution that is used to request/insert blocks for/into the StateSync module and port this logic to headers-related parts. No new functionality id expected to be introduced.

Context

Depends on #3789.

@AnnaShaleva AnnaShaleva added blocked Can't be done because of something bug Something isn't working I3 Minimal impact S2 Regular significance U3 Regular labels Jan 24, 2025
@AnnaShaleva AnnaShaleva added this to the v0.108.0 milestone Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Can't be done because of something bug Something isn't working I3 Minimal impact S2 Regular significance U3 Regular
Projects
None yet
Development

No branches or pull requests

1 participant