-
Notifications
You must be signed in to change notification settings - Fork 9
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: default swarm port #160
Conversation
one/src/main.rs
Outdated
@@ -61,7 +61,7 @@ struct DaemonOpts { | |||
/// Listen address of the p2p swarm. | |||
#[arg( | |||
long, | |||
default_values_t = vec!["/ip4/0.0.0.0/tcp/0".to_string(), "/ip4/0.0.0.0/udp/0/quic-v1".to_string()], | |||
default_values_t = vec!["/ip4/0.0.0.0/tcp/4001".to_string(), "/ip4/0.0.0.0/udp/4001/quic-v1".to_string()], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we run both tcp and quic on a single port?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes they are TCP vs UDP and so can use the same port number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I was suspecting this but wasn't sure!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, we may need to watch out for any testing code that relied on the fact it would always pick an open port. But all the code I am aware of was explicit so it should be fine.
one/src/main.rs
Outdated
@@ -61,7 +61,7 @@ struct DaemonOpts { | |||
/// Listen address of the p2p swarm. | |||
#[arg( | |||
long, | |||
default_values_t = vec!["/ip4/0.0.0.0/tcp/0".to_string(), "/ip4/0.0.0.0/udp/0/quic-v1".to_string()], | |||
default_values_t = vec!["/ip4/0.0.0.0/tcp/4001".to_string(), "/ip4/0.0.0.0/udp/4001/quic-v1".to_string()], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes they are TCP vs UDP and so can use the same port number.
98e2b9b
to
7c24430
Compare
CERAMIC_ONE_SWARM_ADDRESSES default_values port 4001
7c24430
to
370cbcf
Compare
CERAMIC_ONE_SWARM_ADDRESSES default_values port 4001