Skip to content

net/litep2p: Install the default crypto provider - #11253

Merged
lexnv merged 7 commits into
masterfrom
lexnv/fixtls
Jun 23, 2026
Merged

net/litep2p: Install the default crypto provider#11253
lexnv merged 7 commits into
masterfrom
lexnv/fixtls

Conversation

@lexnv

@lexnv lexnv commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

This PR installs the default crypto provider before TLS connections are made.

In case another provider was already installed (unexpected but parachains dev might have enabled it), a warning is printed.

Without the fix, litep2p websocket (tokio tungstenite that uses rustls) would panic under the hood:

Thread 'tokio-runtime-worker' panicked at '
Could not automatically determine the process-level CryptoProvider from Rustls crate features.
Call CryptoProvider::install_default() before this point to select a provider manually, or make sure exactly one of the 'aws-lc-rs' and 'ring' features is enabled.
See the documentation of the CryptoProvider type for more information.
            ', /home/akru/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustls-0.23.36/src/crypto/mod.rs:249

This happens speficially when both aws-lc-rs (legacy) and ring features are enabled by some dependencies that get into the Cargo.lock.

Closes:

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
@lexnv lexnv self-assigned this Mar 4, 2026
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
@lexnv
lexnv requested a review from a team March 4, 2026 09:44
@lexnv

lexnv commented Mar 4, 2026

Copy link
Copy Markdown
Contributor Author

/cmd prdoc --audience node_dev --bump patch

@lexnv lexnv added the T0-node This PR/Issue is related to the topic “node”. label Mar 4, 2026
@paritytech-workflow-stopper

Copy link
Copy Markdown

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/27682016841
Failed job name: check-try-runtime

@paritytech-workflow-stopper

Copy link
Copy Markdown

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/27682016841
Failed job name: cargo-clippy

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
@paritytech paritytech deleted a comment from cla-bot-2021 Bot Jun 22, 2026
@lexnv
lexnv added this pull request to the merge queue Jun 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jun 22, 2026
@lexnv
lexnv added this pull request to the merge queue Jun 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 23, 2026
@lexnv
lexnv added this pull request to the merge queue Jun 23, 2026
Merged via the queue into master with commit 782fb2c Jun 23, 2026
301 of 305 checks passed
@lexnv
lexnv deleted the lexnv/fixtls branch June 23, 2026 09:20
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.

5 participants