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

Simplify network CLI options and configuration #322

Merged
merged 8 commits into from
Apr 18, 2023
Merged

Conversation

mycognosist
Copy link
Contributor

@mycognosist mycognosist commented Apr 14, 2023

Addresses #319

Reduces the existing set of network-related CLI options:

--rendezvous-address
--rendezvous-peer-id
--rendezvous-server
--rendezvous-client
--relay-address
--relay-peer-id
--relay-server
--relay-client

To this:

--rendezvous-address
--relay-address
--enable-rendezvous-server
--enable-relay-server

Rendezvous client mode is enabled if --rendezvous-address is provided. The same is true for --relay-address. These two options now include the peer's ID as part of the multiaddress.


This PR also bumps libp2p version to 0.51.3 and removes deprecated code:

  • Replace swarm::ConnectionLimits with new connection_limits::Behaviour
  • Remove match on BannedPeer SwarmEvent
  • Change quic to use separate crate dependency

See https://github.com/libp2p/rust-libp2p/blob/master/libp2p/CHANGELOG.md#0512

📋 Checklist

  • Add tests that cover your changes
  • Add this PR to the Unreleased section in CHANGELOG.md
  • Link this PR to any issues it closes
  • New files contain a SPDX license header

@mycognosist
Copy link
Contributor Author

Some aspects of libp2p have been deprecated. Those warnings need to be handled and the CHANGELOG needs to be updated. After that, this PR is ready for review.

@codecov
Copy link

codecov bot commented Apr 14, 2023

Codecov Report

Patch coverage: 35.89% and project coverage change: +0.06 🎉

Comparison is base (66926fd) 89.29% compared to head (c3622b8) 89.36%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #322      +/-   ##
==========================================
+ Coverage   89.29%   89.36%   +0.06%     
==========================================
  Files          68       68              
  Lines        5027     5029       +2     
==========================================
+ Hits         4489     4494       +5     
+ Misses        538      535       -3     
Impacted Files Coverage Δ
aquadoggo/src/network/config.rs 100.00% <ø> (ø)
aquadoggo/src/network/transport.rs 36.84% <ø> (ø)
aquadoggo/src/network/service.rs 15.33% <5.00%> (+0.10%) ⬆️
aquadoggo/src/network/behaviour.rs 61.70% <66.66%> (+2.61%) ⬆️
aquadoggo/src/network/swarm.rs 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mycognosist
Copy link
Contributor Author

mycognosist commented Apr 15, 2023

Currently working to address the deprecation warnings from libp2p.

Opened an issue here: libp2p/rust-libp2p#3791

@mycognosist
Copy link
Contributor Author

@sandreae @adzialocha

Ready for review 🟢 🙏🏻

Copy link
Member

@adzialocha adzialocha left a comment

Choose a reason for hiding this comment

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

Yay, very nice change of the API, let's merge it!

@adzialocha adzialocha merged commit e104715 into main Apr 18, 2023
8 checks passed
@adzialocha adzialocha deleted the minimise_network_cli branch April 18, 2023 09:02
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