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

src/lib: Add libp2p-tls to development_transport #3060

Closed
mxinden opened this issue Oct 24, 2022 · 4 comments
Closed

src/lib: Add libp2p-tls to development_transport #3060

mxinden opened this issue Oct 24, 2022 · 4 comments
Labels
difficulty:easy getting-started Issues that can be tackled if you don't know the internals of libp2p very well help wanted

Comments

@mxinden
Copy link
Member

mxinden commented Oct 24, 2022

Once libp2p-tls is no longer an alpha (which it is today, see below) I suggest we add it to our development_transport convenience method.

Thoughts?

[package]
name = "libp2p-tls"
version = "0.1.0-alpha"
edition = "2021"
license = "MIT"
exclude = ["src/test_assets"]

pub async fn development_transport(

@mxinden mxinden added difficulty:easy help wanted getting-started Issues that can be tackled if you don't know the internals of libp2p very well labels Oct 24, 2022
@thomaseizinger
Copy link
Contributor

Those functions are problematic IMO, at least how they are currently used (inside tests and examples), see #3056.

I also think the naming is off. "development" to me suggests that this is something I use during testing but not in production.

It also doesn't fit in well with the executor-specific features that we are currently implementing.

I can see a "recommended" stack being useful but then it should be rename and I don't think we should use the recommended stack in tests and examples.

Tests should use a transport as simple as possible (probably memory + plaintext).

For the larger examples, using that recommended transport works because we are already in the libp2p crate. For all other transports, we would introduce a circular dependency again. We can either move those examples or inline it there.

In general, I'd prefer if we make composing upgrades simpler and less verbose so the value of these convenience functions is basically 0 and we don't lose anything from deleting them.

@thomaseizinger
Copy link
Contributor

Tests will eventually use #2888.

For the examples, we could move away from regular cargo examples and instead introduce an examples directory that has multiple crates in it. Those would probably be easier to maintain because they would have the exact same layout as a user's application. We'd just specify only the features we need in them which makes them easier to run too.

@thomaseizinger
Copy link
Contributor

Cross-referencing an idea here: #3635 (comment)

@thomaseizinger
Copy link
Contributor

Closing this in favor of #3657.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty:easy getting-started Issues that can be tackled if you don't know the internals of libp2p very well help wanted
Projects
None yet
Development

No branches or pull requests

2 participants