net: Spawn network backend as essential task#10847
Merged
Conversation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
bkchr
approved these changes
Jan 20, 2026
| // most appropriate thing to do for the network future is to shut down too. | ||
| None => { | ||
| debug!("Block import stream has terminated, shutting down the network future."); | ||
| warn!("Block import stream has terminated, shutting down the network future. Ignore if the node is stopping."); |
Member
There was a problem hiding this comment.
I assume we would see this on normal shutdown also some times?
Contributor
Author
There was a problem hiding this comment.
Yep, I would expect to see this pop in the logs a few times during panics / closing of other essential tasks
I've tried to reproduce this locally by interurpting a running substrate node, however these logs did not appear locally:
2026-01-23 13:55:54.012 INFO tokio-runtime-worker babe: 🔖 Pre-sealed block for proposal at 7. Hash now 0x6e7d798d7ea35d48089a6cdbbb5dfc2c5f5086bb7a3b4cbbd3a81531d8ebb5c6, previously 0xca0dd9d74932c11638c1e4e568dfb4d0f3f47cc57022da6524f7686d28d29e84.
2026-01-23 13:55:54.013 INFO tokio-runtime-worker substrate: 🏆 Imported #7 (0xeb5a…8b99 → 0x6e7d…b5c6)
^C2026-01-23 13:55:54.830 ERROR tokio-runtime-worker sc_service::task_manager: Essential task `txpool-background` failed. Shutting down service.
| // Drive the network. Shut down the network future if `NetworkWorker` has terminated. | ||
| _ = network_run => { | ||
| debug!("`NetworkWorker` has terminated, shutting down the network future."); | ||
| warn!("`NetworkWorker` has terminated, shutting down the network future. Ignore if the node is stopping."); |
sandreim
approved these changes
Jan 20, 2026
dmitry-markin
approved these changes
Jan 20, 2026
skunert
approved these changes
Jan 22, 2026
Contributor
Author
|
/cmd prdoc --audience node_dev --bump patch |
…e_dev --bump patch'
marian-radu
approved these changes
Jan 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR spawns the network backends as essential (libp2p / litep2p).
When the network future exits, it will bring down the whole process.
import_notif_streamDiscovered during: