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

Networking: multiple relays, dial known nodes, allow&block-list #524

Merged
merged 10 commits into from
Aug 25, 2023

Conversation

sandreae
Copy link
Member

@sandreae sandreae commented Aug 25, 2023

  • client nodes don't need to listen on tcp
  • handle connecting to multiple relay nodes (w/ config changes)
  • dial known direct nodes at startup
  • introduce allow-list of trusted peers
  • introduce block-list of un-trusted peers

📋 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

@sandreae sandreae changed the title Networking final round Networking: support list of relays, dial directly connectable nodes on start-up Aug 25, 2023
@codecov
Copy link

codecov bot commented Aug 25, 2023

Codecov Report

Patch coverage: 31.00% and project coverage change: -0.10% ⚠️

Comparison is base (51d37b6) 92.30% compared to head (59ba41c) 92.21%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #524      +/-   ##
==========================================
- Coverage   92.30%   92.21%   -0.10%     
==========================================
  Files         102      102              
  Lines       16070    16100      +30     
==========================================
+ Hits        14834    14847      +13     
- Misses       1236     1253      +17     
Files Changed Coverage Δ
aquadoggo/src/network/transport.rs 63.82% <0.00%> (ø)
aquadoggo/src/network/service.rs 30.51% <24.67%> (+0.68%) ⬆️
aquadoggo/src/network/behaviour.rs 44.03% <44.44%> (-1.71%) ⬇️
aquadoggo/src/network/config.rs 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sandreae sandreae changed the title Networking: support list of relays, dial directly connectable nodes on start-up Networking: multiple relays, dial known nodes, allow-list Aug 25, 2023
@sandreae sandreae changed the title Networking: multiple relays, dial known nodes, allow-list Networking: multiple relays, dial known nodes, allow&block-list Aug 25, 2023
@sandreae sandreae marked this pull request as ready for review August 25, 2023 10:25
This was linked to issues Aug 25, 2023
@@ -116,7 +124,7 @@ impl P2pandaBehaviour {

// Create a rendezvous client behaviour with default configuration if a rendezvous server
// address has been provided
let rendezvous_client = if network_config.relay_address.is_some() {
let rendezvous_client = if !network_config.relay_addresses.is_empty() {
Copy link
Member

Choose a reason for hiding this comment

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

I want to rename this field to relay_nodes, but let's do this later

@sandreae sandreae changed the base branch from config-galore to main August 25, 2023 10:59
@sandreae sandreae merged commit 2f66180 into main Aug 25, 2023
10 checks passed
@adzialocha adzialocha deleted the networking-final-round branch August 25, 2023 11:25
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.

Node allow- and block lists Dial known peers on start up
2 participants