n0-computer / iroh

A toolkit for building distributed applications
https://iroh.computer
Apache License 2.0
2.34k stars 148 forks source link

Allow customizing the `quinn::TransportConfig` in `iroh::node::Builder` #2592

Open flub opened 1 month ago

flub commented 1 month ago

The iroh::node::Builder sets the max_concurrent_uni_streams to 0 (i.e. none) and max_concurrent_bidi_streams to 10 (i.e. barely any).

Furthermore it does not allow customising these values.

matheus23 commented 1 month ago

2593 fixes the first point, but does not yet allow for a custom TransportConfig. Editing the title.

divagant-martian commented 1 month ago

We have https://github.com/n0-computer/iroh/blob/1d3f3fa8125761df509b94621eb173b91ed42904/iroh-net/src/endpoint.rs#L214-L225 which has been around for awhile. You updated it's docs in #2334 and I thought it was added in that PR due to re-ordering but it was added in #1133, more than a year ago.

Is there something else missing?

matheus23 commented 1 month ago

Oh, I missed that. In that case we can probably close this, right?

flub commented 1 month ago

We have

https://github.com/n0-computer/iroh/blob/1d3f3fa8125761df509b94621eb173b91ed42904/iroh-net/src/endpoint.rs#L214-L225

This is in iroh-net. The issue is about the iroh::node::Builder which I think is distinct from using iroh-net on it's own.

I'm not really sure about what should be in the iroh::node::Node, but I gather it's a larger system that build on iroh-net but still allows you to drop down to iroh-net and write your own additional protocols.

divagant-martian commented 1 month ago

that makes sense, thanks!

Frando commented 1 week ago

We could also allow passing an iroh_net::Endpoint to iroh::node::Builder I think. We have some different defaults though atm (iroh sets discovery whereas iroh_net does not)