Skip to content

Conversation

@RomarQ
Copy link
Contributor

@RomarQ RomarQ commented Dec 16, 2025

What does it do?

Context: paritytech/polkadot-sdk#8461

This PR updates Moonbeam’s node startup wiring so the selected P2P backend is actually used. Instead of always building the networking stack with the libp2p worker type, start_node now branches on parachain_config.network.network_backend and instantiates the appropriate backend (Libp2p vs Litep2p). The Litep2p is the default on recent polkadot-sdk versions.

Context

When a node is configured to run with Litep2p, the service should construct the corresponding networking backend. This change ensures Moonbeam respects the configured backend selection and avoids mismatched network worker types.

@coderabbitai
Copy link

coderabbitai bot commented Dec 16, 2025

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • agent-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch rq/use-the-correct-p2p-backend

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@RomarQ RomarQ marked this pull request as draft December 16, 2025 16:57
@RomarQ RomarQ force-pushed the rq/use-the-correct-p2p-backend branch from ecacb14 to 6fa1a8e Compare December 16, 2025 16:58
@github-actions
Copy link
Contributor

WASM runtime size check:

Compared to target branch

Moonbase runtime: 2124 KB (no changes) ✅

Moonbeam runtime: 2240 KB (no changes) ✅

Moonriver runtime: 2240 KB (no changes) ✅

Compared to latest release (runtime-4100)

Moonbase runtime: 2124 KB (+188 KB compared to latest release) ⚠️

Moonbeam runtime: 2240 KB (+208 KB compared to latest release) ⚠️

Moonriver runtime: 2240 KB (+208 KB compared to latest release) ⚠️

@RomarQ RomarQ marked this pull request as ready for review December 16, 2025 17:14
@RomarQ RomarQ self-assigned this Dec 16, 2025
@RomarQ RomarQ added the B5-clientnoteworthy Changes should be mentioned in any downstream projects' release notes label Dec 16, 2025
@RomarQ RomarQ changed the title Use the correct p2p backend Use the selected backend worker (Libp2p vs Litep2p) Dec 16, 2025
@RomarQ RomarQ requested review from librelois and manuelmauro and removed request for manuelmauro December 16, 2025 17:15
@github-actions
Copy link
Contributor

Coverage Report

@@                        Coverage Diff                         @@
##           master   rq/use-the-correct-p2p-backend      +/-   ##
==================================================================
- Coverage   76.71%                           76.70%   -0.01%     
  Files         389                              389              
+ Lines       76585                            76595      +10     
==================================================================
  Hits        58745                            58745              
+ Misses      17840                            17850      +10     
Files Changed Coverage
/node/service/src/lib.rs 48.53% (-0.48%) 🔽

Coverage generated Tue Dec 16 17:33:10 UTC 2025

@librelois librelois added the D2-notlive PR doesn't change runtime code (so can't be audited) label Dec 16, 2025
@RomarQ RomarQ added the not-breaking Does not need to be mentioned in breaking changes label Dec 16, 2025
@RomarQ RomarQ merged commit a4260e1 into master Dec 16, 2025
45 of 56 checks passed
@RomarQ RomarQ deleted the rq/use-the-correct-p2p-backend branch December 16, 2025 17:46
RomarQ added a commit that referenced this pull request Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B5-clientnoteworthy Changes should be mentioned in any downstream projects' release notes D2-notlive PR doesn't change runtime code (so can't be audited) not-breaking Does not need to be mentioned in breaking changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants