smoldot icon indicating copy to clipboard operation
smoldot copied to clipboard

Print more details about the warp syncing while it is in progress

Open tomaka opened this issue 3 years ago • 4 comments

As evidenced by https://github.com/paritytech/substrate-connect/issues/927, it happens that warp sync just takes ages. Right now we print a periodic warning saying "don't worry, we're still alive". This message should include some information or statistics about the progress of the warp syncing.

tomaka avatar Apr 05 '22 11:04 tomaka

Accidentally opened in the wrong repo.

tomaka avatar Apr 07 '22 18:04 tomaka

Are there any specific data points that we want to output?

melekes avatar Apr 28 '22 06:04 melekes

The warp syncing consists in multiple stages: the first one (normally the longest) consists in downloading and verifying the fragments to do the actual syncing, and the rest consists in some extra network requests to download the state at the head of the chain (without which we couldn't progress from there).

I think that we should print the stage we're at, and for the download stage print the block number of the latest fragment that we've downloaded.

tomaka avatar May 02 '22 09:05 tomaka

Note that the warp sync code at the moment downloads all the fragments (this usually takes multiple requests) then verifies them all at once.

It would be better if fragments were verified progressively (verify the current batch of fragments while the next batch is being downloaded), both to speed things up but also to show with certainty the block number that we've synced to.

tomaka avatar May 02 '22 09:05 tomaka