Skip to content

Conversation

@lexnv
Copy link
Contributor

@lexnv lexnv commented Jan 20, 2026

This PR spawns the network backends as essential (libp2p / litep2p).

When the network future exits, it will bring down the whole process.

  • there's no point in running a node without the core network backend as it will not be able to communicate with peers
  • while at it, have changed some logs from debug to warn
  • the network backend can be brought down unintentionally by the import_notif_stream

Discovered during:

lexnv added 2 commits January 20, 2026 15:43
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
@lexnv lexnv requested a review from a team January 20, 2026 15:48
@lexnv lexnv self-assigned this Jan 20, 2026
@lexnv lexnv added the T0-node This PR/Issue is related to the topic “node”. label 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.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume we would see this on normal shutdown also some times?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question.

@lexnv
Copy link
Contributor Author

lexnv commented Jan 23, 2026

/cmd prdoc --audience node_dev --bump patch

@lexnv lexnv enabled auto-merge January 23, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T0-node This PR/Issue is related to the topic “node”.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants