polkadot-sdk icon indicating copy to clipboard operation
polkadot-sdk copied to clipboard

Improve Warp Sync Logs

Open shawntabrizi opened this issue 1 year ago • 6 comments

Is there an existing issue?

  • [X] I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • [X] This is not a support question.

Motivation

When doing a warp sync, the user sees information which is not relevant to the progress of warp sync:

2024-12-03 14:09:28 ⏩ Warping, Downloading finality proofs, 0.00 Mib (8 peers), best: #0 (0xe143…423e), finalized #0 (0xe143…423e), ⬇ 156.6kiB/s ⬆ 0.6kiB/s    
2024-12-03 14:09:33 ⏩ Warping, Downloading finality proofs, 0.00 Mib (8 peers), best: #0 (0xe143…423e), finalized #0 (0xe143…423e), ⬇ 24.0kiB/s ⬆ 1.7kiB/s    
2024-12-03 14:09:38 ⏩ Warping, Downloading finality proofs, 0.00 Mib (9 peers), best: #0 (0xe143…423e), finalized #0 (0xe143…423e), ⬇ 44.7kiB/s ⬆ 3.4kiB/s    
2024-12-03 14:09:43 ⏩ Warping, Downloading finality proofs, 0.00 Mib (9 peers), best: #0 (0xe143…423e), finalized #0 (0xe143…423e), ⬇ 3.3kiB/s ⬆ 2.7kiB/s    
2024-12-03 14:09:48 ⏩ Warping, Downloading finality proofs, 0.00 Mib (8 peers), best: #0 (0xe143…423e), finalized #0 (0xe143…423e), ⬇ 31.0kiB/s ⬆ 2.7kiB/s    
2024-12-03 14:09:53 ⏩ Warping, Downloading finality proofs, 0.00 Mib (8 peers), best: #0 (0xe143…423e), finalized #0 (0xe143…423e), ⬇ 2.8kiB/s ⬆ 2.3kiB/s    
2024-12-03 14:09:58 ⏩ Warping, Downloading finality proofs, 0.00 Mib (7 peers), best: #0 (0xe143…423e), finalized #0 (0xe143…423e), ⬇ 3.9kiB/s ⬆ 2.6kiB/s    

In this view, best block and finalized block will stay zero through the whole warp sync. The only relevant "progress" data here is the 0.00 MiB, but this is no indicator how big this number will be or how far into the sync progress we are.

Request

The request is to remove the irrelevant data from the warp sync logs, and add additional data about what eras / epochs it has "synced" through.

This should give a rough indication of the progress. Even better, would be to know the latest expected epoch / era, and then present a "percentage complete" of the warp sync out of 100%.

Solution

Update the logs, add APIs / function calls for the relevant information on the client / CLI side.

Are you willing to help with this request?

No.

shawntabrizi avatar Dec 03 '24 21:12 shawntabrizi

Hey @shawntabrizi interested in the issue

can you give relevant other links? would like to be assigned to it

ECJ222 avatar Dec 04 '24 14:12 ECJ222

@ECJ222 the relevant code is here. Basically we can only remove the best and finalized block. We could also probably show the eras that already got synced by returning the length of proof.proofs here and then aggregate it somewhere here. From there we would need to expose it to the informant as well.

bkchr avatar Dec 24 '24 10:12 bkchr

@shawntabrizi and @bkchr , this issue seems to have been abandoned, can I please take it?

CECILIA-MULANDI avatar Nov 03 '25 18:11 CECILIA-MULANDI

@CECILIA-MULANDI looks like @runcomet already opened a pr for it.

bkchr avatar Nov 04 '25 11:11 bkchr

It's okay. I am open to taking issues, if there are any you can assign to me I'd be happy to tackle them.

CECILIA-MULANDI avatar Nov 04 '25 13:11 CECILIA-MULANDI

ready for review @bkchr

runcomet avatar Dec 05 '25 06:12 runcomet