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

feat(networking): allow disabling relay server #1856

Closed
wants to merge 1 commit into from
Closed

feat(networking): allow disabling relay server #1856

wants to merge 1 commit into from

Conversation

b-zee
Copy link
Contributor

@b-zee b-zee commented Jun 7, 2024

No description provided.

@@ -95,6 +97,7 @@ impl NodeBuilder {
root_dir: PathBuf,
owner: Option<String>,
#[cfg(feature = "upnp")] upnp: bool,
relay_server: bool,
Copy link
Member

@RolandSherwin RolandSherwin Jun 7, 2024

Choose a reason for hiding this comment

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

I think this need not be passed as an arg to NodeBuilder::new(). Since this is a builder, we can add a function inside NodeBuilder to set the value. And then call it if necessary?

Copy link
Member

Choose a reason for hiding this comment

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

The same should've been done for owner arg :( can we create a commit for that as well if possible?

@joshuef
Copy link
Contributor

joshuef commented Jun 10, 2024

So I think f5475df might be a better approach? Keep it in, but exclude bootstrap nodes?

That's make for a more natural "discovery", while also removing the need for many different builds?


If we do still want to disable bootstrapping, perhaps we can instead limit capacity? (And perhaps perhaps we need to blacklist repeat requesters? 🤷 )

Thoughts?

@b-zee
Copy link
Contributor Author

b-zee commented Jun 10, 2024

They are both two different ways of solving the problem of overloading the bootstrap nodes. I do think there is value in adding this feature though. Maybe there will be people running very CPU-constrained nodes and turning off the relay server might be a first sensible step. On the other hand, a random node shouldn't be totally overwhelmed by relay requests.

Maybe another thing to look at is being able to configure the amount of relay requests we accept and possibly limit it to only 2-4 peers that can be using us as relay at the same time. (For resource constrained nodes.)

@joshuef
Copy link
Contributor

joshuef commented Jun 17, 2024

Maybe another thing to look at is being able to configure the amount of relay requests we accept and possibly limit it to only 2-4 peers that can be using us as relay at the same time. (For resource constrained nodes.)

I think this is the path we likely need to take. This way all nodes can act as relays (otherwise folk will opt-out; later we should enforce this)

Going to close this in favour of that approach for now.

@joshuef joshuef closed this Jun 17, 2024
@b-zee b-zee deleted the feat-add-no-relay-server-flag branch June 17, 2024 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants