Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of libp2p dependency in sc-authority-discovery #5842

Open
wants to merge 111 commits into
base: master
Choose a base branch
from

Conversation

ndkazu
Copy link
Contributor

@ndkazu ndkazu commented Sep 26, 2024

Issue

#4859

Description

This PR removes libp2p types in authority-discovery, and replace them with network backend agnostic types from sc-network-types.
The sc-network interface is therefore updated accordingly.

@dmitry-markin dmitry-markin added the T0-node This PR/Issue is related to the topic “node”. label Oct 1, 2024
@dmitry-markin
Copy link
Contributor

bot fmt

@command-bot
Copy link

command-bot bot commented Oct 1, 2024

@dmitry-markin https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7471948 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/fmt/fmt.sh". Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 1-0a9426d8-7764-4b72-8a95-ce6347a9c4b1 to cancel this command or bot cancel to cancel all commands in this pull request.

@command-bot
Copy link

command-bot bot commented Oct 1, 2024

@dmitry-markin Command "$PIPELINE_SCRIPTS_DIR/commands/fmt/fmt.sh" has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7471948 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7471948/artifacts/download.

@ndkazu
Copy link
Contributor Author

ndkazu commented Oct 3, 2024

@dmitry-markin , @bkchr , @lexnv , I think we're ready for a review.

@ndkazu
Copy link
Contributor Author

ndkazu commented Oct 5, 2024

It seems that I cannot add new reviewers myself: I don't see the gear usuallly present on the right side of Reviewers

substrate/client/network/types/src/rec.rs Outdated Show resolved Hide resolved
substrate/client/network/types/src/rec.rs Outdated Show resolved Hide resolved
substrate/client/network/types/src/rec.rs Outdated Show resolved Hide resolved
substrate/client/network/types/src/rec.rs Outdated Show resolved Hide resolved
substrate/client/network/types/src/rec.rs Outdated Show resolved Hide resolved
@@ -907,7 +907,7 @@ impl<B: BlockT + 'static, H: ExHashT> NetworkBackend<B, H> for Litep2pNetworkBac
);

self.event_streams.send(Event::Dht(
DhtEvent::ValueNotFound(libp2p::kad::RecordKey::new(&key))
DhtEvent::ValueNotFound(sc_network_types::rec::Key::new::<sc_network_types::rec::Key>(&key.to_vec().into()))
Copy link
Member

Choose a reason for hiding this comment

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

You are passing the same type as generic argument?

Copy link
Contributor Author

@ndkazu ndkazu Oct 7, 2024

Choose a reason for hiding this comment

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

The compiler complains that the type of sc_network_types::rec::Key::new cannot be infered, and so passing the type as the generic fixed the problem.

@ndkazu ndkazu requested a review from bkchr October 13, 2024 14:46
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.

4 participants