Skip to content

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.

rkuhn added 3 commits October 15, 2022 09:10
not updating the explicit dependency on multihash meant that 0.16.1 was
used without the `blake3` feature, breaking the tests
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.

2 participants