Skip to content

Improve the state sync progress report #5397

@liuchengxu

Description

@liuchengxu

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Motivation

liuchengxu@9d98cef is collected from a warp-sync on polkadot. The percentage of 14% was reported with a list of data size ranging from 9.97MiB to 285.73 MiB (State sync, Downloading state, 14%, 9.97 Mib, State sync, Downloading state, 14%, 285.73 Mib)

Another piece of state syncing log on subcoin:

Details

2024-08-17 15:42:06.918 INFO tokio-runtime-worker substrate: ⚙️ State sync, Downloading state, 74%, 3.60 Mib (1 peers), best: #556312 (0xe1ae…c2b2), finalized #556306 (0xd31d…070c), ⬇ 704.7kiB/s ⬆ 0.2kiB/s
2024-08-17 15:42:11.918 INFO tokio-runtime-worker substrate: ⚙️ State sync, Downloading state, 74%, 7.29 Mib (1 peers), best: #556312 (0xe1ae…c2b2), finalized #556306 (0xd31d…070c), ⬇ 545.5kiB/s ⬆ 0.1kiB/s
2024-08-17 15:42:16.919 INFO tokio-runtime-worker substrate: ⚙️ State sync, Downloading state, 74%, 13.48 Mib (1 peers), best: #556312 (0xe1ae…c2b2), finalized #556306 (0xd31d…070c), ⬇ 886.1kiB/s ⬆ 0.2kiB/s
...
2024-08-17 17:14:57.299 INFO tokio-runtime-worker substrate: ⚙️ State sync, Importing state, 0%, 3914.19 Mib (1 peers), best: #556312 (0xe1ae…c2b2), finalized #556306 (0xd31d…070c), ⬇ 0.3kiB/s ⬆ 0.2kiB/s
2024-08-17 17:15:02.299 INFO tokio-runtime-worker substrate: ⚙️ State sync, Importing state, 0%, 3914.19 Mib (1 peers), best: #556312 (0xe1ae…c2b2), finalized #556306 (0xd31d…070c), ⬇ 0.1kiB/s ⬆ 12 B/s
2024-08-17 17:15:07.299 INFO tokio-runtime-worker substrate: ⚙️ State sync, Importing state, 0%, 3914.19 Mib (1 peers), best: #556312 (0xe1ae…c2b2), finalized #556306 (0xd31d…070c), ⬇ 92 B/s ⬆ 0
2024-08-17 17:15:12.299 INFO tokio-runtime-worker substrate: ⚙️ State sync, Importing state, 0%, 3914.19 Mib (1 peers), best: #556312 (0xe1ae…c2b2), finalized #556306 (0xd31d…070c), ⬇ 92 B/s ⬆ 0
2024-08-17 17:15:17.300 INFO tokio-runtime-worker substrate: ⚙️ State sync, Importing state, 0%, 3914.19 Mib (1 peers), best: #556312 (0xe1ae…c2b2), finalized #556306 (0xd31d…070c), ⬇ 0.2kiB/s ⬆ 12 B/s
2024-08-17 17:15:22.300 INFO tokio-runtime-worker substrate: ⚙️ State sync, Importing state, 0%, 3914.19 Mib (1 peers), best: #556312 (0xe1ae…c2b2), finalized #556306 (0xd31d…070c), ⬇ 92 B/s ⬆ 0
2024-08-17 17:15:27.300 INFO tokio-runtime-worker substrate: ⚙️ State sync, Importing state, 0%, 3914.19 Mib (1 peers), best: #556312 (0xe1ae…c2b2), finalized #556306 (0xd31d…070c), ⬇ 92 B/s ⬆ 0
2024-08-17 17:15:32.301 INFO tokio-runtime-worker substrate: ⚙️ State sync, Importing state, 0%, 3914.19 Mib (1 peers), best: #556312 (0xe1ae…c2b2), finalized #556306 (0xd31d…070c), ⬇ 0.1kiB/s ⬆ 12 B/s
2024-08-17 17:15:33.694 INFO tokio-runtime-worker sync: State sync is complete (3914 MiB), restarting block sync.

Aas shown in the logs, the progress is reported as State sync, Downloading state, 74%, 3.60 MiB, and even as the downloaded data size increases significantly up to State sync, Downloading state, 74%, 3909.93 MiB, the percentage remains fixed at 74% until the end of this phase. Similarly, during the "Importing state" phase, the progress percentage remains at 0% for the entire duration.

The current state sync progress reporting can be confusing and uninformative, especially when dealing with large state syncing.

Request

While I understand that the progress percentages may only be estimates and not perfectly precise, the current reporting is so far from accurate that it provides little value to the user.

Solution

No response

Are you willing to help with this request?

Maybe (please elaborate above)

Metadata

Metadata

Assignees

No one assigned

    Labels

    I5-enhancementAn additional feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions