Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Finish off fast sync pipeline download #1222

Merged
merged 12 commits into from
Apr 5, 2019

Conversation

ajsutton
Copy link
Contributor

@ajsutton ajsutton commented Apr 5, 2019

PR description

Tidies up the last few loose ends to make the pipeline based chain download work for fast sync. Currently still leaves it toggled off while we run some more detailed real world tests.

  • Switches to using thenProcessAsyncOrdered now that it's available so we import blocks in order
  • Logs after each batch of blocks is imported so progress is visible
  • Updates SyncState as the sync target changes so that in-sync listeners are updated appropriately.
  • Handle shutdown in the same weird way the current EthTask based downloader does.

For the shutdown, we need a separate ticket to tidy up how it should happen - at the moment the Synchronizer gets no notification of shutdown before the EthScheduler is shutdown which cancels all its tasks and things are set up so this is taken as a sign to just silently stop what it's doing. For now, the pipeline chain downloader behaviour matches the EthTask one - if it gets a CancellationException it stops executing but doesn't mark its future as complete.

@ajsutton ajsutton merged commit d294a49 into PegaSysEng:master Apr 5, 2019
@ajsutton ajsutton deleted the pipeline-download-loose-ends branch April 5, 2019 20:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants