Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion beacon_node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "beacon_node"
version = "6.0.1"
version = "6.0.2"
authors = [
"Paul Hauner <paul@paulhauner.com>",
"Age Manning <Age@AgeManning.com",
Expand Down
3 changes: 1 addition & 2 deletions beacon_node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,7 @@ pub fn cli_app() -> Command {
.long("port6")
.value_name("PORT")
.help("The TCP/UDP ports to listen on over IPv6 when listening over both IPv4 and \
IPv6. Defaults to 9090 when required. The Quic UDP port will be set to this value + 1.")
.default_value("9090")
IPv6. Defaults to --port. The Quic UDP port will be set to this value + 1.")
.action(ArgAction::Set)
.display_order(0)
)
Expand Down
22 changes: 18 additions & 4 deletions beacon_node/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -932,12 +932,11 @@ pub fn parse_listening_addresses(
.expect("--port has a default value")
.parse::<u16>()
.map_err(|parse_error| format!("Failed to parse --port as an integer: {parse_error}"))?;
let port6 = cli_args
let maybe_port6 = cli_args
.get_one::<String>("port6")
.map(|s| str::parse::<u16>(s))
.transpose()
.map_err(|parse_error| format!("Failed to parse --port6 as an integer: {parse_error}"))?
.unwrap_or(9090);
.map_err(|parse_error| format!("Failed to parse --port6 as an integer: {parse_error}"))?;

// parse the possible discovery ports.
let maybe_disc_port = cli_args
Expand Down Expand Up @@ -985,6 +984,14 @@ pub fn parse_listening_addresses(
warn!(log, "When listening only over IPv6, use the --port flag. The value of --port6 will be ignored.");
}

// If we are only listening on ipv6 and the user has specified --port6, lets just use
// that.
let port = if let Some(port6) = maybe_port6 {
port6
} else {
port
};

// use zero ports if required. If not, use the given port.
let tcp_port = use_zero_ports
.then(unused_port::unused_tcp6_port)
Expand Down Expand Up @@ -1051,6 +1058,13 @@ pub fn parse_listening_addresses(
})
}
(Some(ipv4), Some(ipv6)) => {
// If --port6 is not set, we use --port
let port6 = if let Some(port6) = maybe_port6 {
port6
} else {
port
};

let ipv4_tcp_port = use_zero_ports
.then(unused_port::unused_tcp4_port)
.transpose()?
Expand All @@ -1070,7 +1084,7 @@ pub fn parse_listening_addresses(
ipv4_tcp_port + 1
});

// Defaults to 9090 when required
// Defaults to 9000 when required
let ipv6_tcp_port = use_zero_ports
.then(unused_port::unused_tcp6_port)
.transpose()?
Expand Down
8 changes: 4 additions & 4 deletions book/src/advanced_networking.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ To listen over both IPv4 and IPv6:
>
> **IPv6**:
>
> It listens on the default value of --port6 (`9090`) for both UDP and TCP.
> QUIC will use port `9091` for UDP, which is the default `--port6` value (`9090`) + 1.
> It listens on the default value of --port6 (`9000`) for both UDP and TCP.
> QUIC will use port `9001` for UDP, which is the default `--port6` value (`9000`) + 1.

> When using `--listen-address :: --listen-address --port 9909 --discovery-port6 9999`, listening will be set up as follows:
>
Expand All @@ -174,8 +174,8 @@ To listen over both IPv4 and IPv6:
>
> **IPv6**:
>
> It listens on the default value of `--port6` (`9090`) for TCP, and port `9999` for UDP.
> QUIC will use port `9091` for UDP, which is the default `--port6` value (`9090`) + 1.
> It listens on the default value of `--port6` (`9000`) for TCP, and port `9999` for UDP.
> QUIC will use port `9001` for UDP, which is the default `--port6` value (`9000`) + 1.

### Configuring Lighthouse to advertise IPv6 reachable addresses

Expand Down
4 changes: 2 additions & 2 deletions book/src/help_bn.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ Options:
[default: 9000]
--port6 <PORT>
The TCP/UDP ports to listen on over IPv6 when listening over both IPv4
and IPv6. Defaults to 9090 when required. The Quic UDP port will be
set to this value + 1. [default: 9090]
and IPv6. Defaults to --port. The Quic UDP port will be set to this
value + 1.
--prepare-payload-lookahead <MILLISECONDS>
The time before the start of a proposal slot at which payload
attributes should be sent. Low values are useful for execution nodes
Expand Down
2 changes: 1 addition & 1 deletion boot_node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "boot_node"
version = "6.0.1"
version = "6.0.2"
authors = ["Sigma Prime <contact@sigmaprime.io>"]
edition = { workspace = true }

Expand Down
6 changes: 3 additions & 3 deletions common/lighthouse_version/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ pub const VERSION: &str = git_version!(
// NOTE: using --match instead of --exclude for compatibility with old Git
"--match=thiswillnevermatchlol"
],
prefix = "Lighthouse/v6.0.1-",
fallback = "Lighthouse/v6.0.1"
prefix = "Lighthouse/v6.0.2-",
fallback = "Lighthouse/v6.0.2"
);

/// Returns the first eight characters of the latest commit hash for this build.
Expand Down Expand Up @@ -54,7 +54,7 @@ pub fn version_with_platform() -> String {
///
/// `1.5.1`
pub fn version() -> &'static str {
"6.0.1"
"6.0.2"
}

/// Returns the name of the current client running.
Expand Down
2 changes: 1 addition & 1 deletion lcli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "lcli"
description = "Lighthouse CLI (modeled after zcli)"
version = "6.0.1"
version = "6.0.2"
authors = ["Paul Hauner <paul@paulhauner.com>"]
edition = { workspace = true }

Expand Down
2 changes: 1 addition & 1 deletion lighthouse/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lighthouse"
version = "6.0.1"
version = "6.0.2"
authors = ["Sigma Prime <contact@sigmaprime.io>"]
edition = { workspace = true }
autotests = false
Expand Down
Loading