mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Add Experimental QUIC support (#4577)
## Issue Addressed #4402 ## Proposed Changes This PR adds QUIC support to Lighthouse. As this is not officially spec'd this will only work between lighthouse <-> lighthouse connections. We attempt a QUIC connection (if the node advertises it) and if it fails we fallback to TCP. This should be a backwards compatible modification. We want to test this functionality on live networks to observe any improvements in bandwidth/latency. NOTE: This also removes the websockets transport as I believe no one is really using it. It should be mentioned in our release however. Co-authored-by: João Oliveira <hello@jxs.pt>
This commit is contained in:
@@ -58,12 +58,12 @@ impl<T: EthSpec> BootNodeConfig<T> {
|
||||
|
||||
set_network_config(&mut network_config, matches, &data_dir, &logger)?;
|
||||
|
||||
// Set the Enr UDP ports to the listening ports if not present.
|
||||
// Set the Enr Discovery ports to the listening ports if not present.
|
||||
if let Some(listening_addr_v4) = network_config.listen_addrs().v4() {
|
||||
network_config.enr_udp4_port = Some(
|
||||
network_config
|
||||
.enr_udp4_port
|
||||
.unwrap_or(listening_addr_v4.udp_port),
|
||||
.unwrap_or(listening_addr_v4.disc_port),
|
||||
)
|
||||
};
|
||||
|
||||
@@ -71,7 +71,7 @@ impl<T: EthSpec> BootNodeConfig<T> {
|
||||
network_config.enr_udp6_port = Some(
|
||||
network_config
|
||||
.enr_udp6_port
|
||||
.unwrap_or(listening_addr_v6.udp_port),
|
||||
.unwrap_or(listening_addr_v6.disc_port),
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user