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

libp2p 0.48 #111

Merged
merged 4 commits into from Oct 18, 2022
Merged

libp2p 0.48 #111

merged 4 commits into from Oct 18, 2022

Conversation

rkuhn
Copy link
Contributor

@rkuhn rkuhn commented Oct 17, 2022

This is a bigger update because libp2p removed NetworkBehaviourEventProcess, which means that all state needs to move out of the Behaviour and into the place that calls poll.
As I was touching this code anyway, I removed the mutex-based swarm access and fully encapsulated the Swarm in its own task, making all external requests asynchronous (and also 'static, i.e. owned data, so that they can travel through channels).
The result is that some tests broke because they had previously relied upon scheduling artifacts caused by the mutex approach.

not updating the explicit dependency on multihash meant that 0.16.1 was
used without the `blake3` feature, breaking the tests
void = "1.0.2"

[dependencies.libp2p]
version = "0.43.0"
version = "0.48.0"
default-features = false
features = [

Choose a reason for hiding this comment

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

You might want to enable "rsa" feature since that was moved into its own feature (libp2p/rust-libp2p#2860) otherwise you might run into errors if you use libp2p bootstrap or dialing any rsa keys (libp2p/rust-libp2p#2971). If its not needed, could also move it into a optional feature too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for catching this! An optional feature looks like the idiomatic way to go.


for addr in config.listen_on {
let _ = ipfs.listen_on(addr)?;
let _ = ipfs.listen_on(addr);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now that listen failure is asynchronous, perhaps include the notification in SwarmEvents.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

leaving this for a later time

@rkuhn rkuhn merged commit 5871589 into ipfs-rust:master Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants