Integrate StateSync module with RemoveUntraceableHeaders
option
#3795
Labels
Milestone
RemoveUntraceableHeaders
option
#3795
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 latestMaxTraceableBlocks
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:Module.headerHeight
field that should be processed the same way asModule.blockHeight
: set it to the latest desired header, update according to the headers insertion.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.
The text was updated successfully, but these errors were encountered: