mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 05:48:31 +00:00
Merge branch 'unstable' into vc-fallback
This commit is contained in:
@@ -2,20 +2,20 @@
|
||||
name = "simulator"
|
||||
version = "0.2.0"
|
||||
authors = ["Paul Hauner <paul@paulhauner.com>"]
|
||||
edition = "2021"
|
||||
edition = { workspace = true }
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
node_test_rig = { path = "../node_test_rig" }
|
||||
eth1 = {path = "../../beacon_node/eth1"}
|
||||
execution_layer = {path = "../../beacon_node/execution_layer"}
|
||||
types = { path = "../../consensus/types" }
|
||||
parking_lot = "0.12.0"
|
||||
futures = "0.3.7"
|
||||
tokio = "1.14.0"
|
||||
eth1_test_rig = { path = "../eth1_test_rig" }
|
||||
env_logger = "0.9.0"
|
||||
clap = "2.33.3"
|
||||
rayon = "1.4.1"
|
||||
eth1 = { workspace = true }
|
||||
execution_layer = { workspace = true }
|
||||
types = { workspace = true }
|
||||
parking_lot = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
eth1_test_rig = { workspace = true }
|
||||
env_logger = { workspace = true }
|
||||
clap = { workspace = true }
|
||||
rayon = { workspace = true }
|
||||
sensitive_url = { path = "../../common/sensitive_url" }
|
||||
|
||||
@@ -14,6 +14,7 @@ use std::{sync::Arc, time::Duration};
|
||||
use types::{Epoch, EthSpec};
|
||||
|
||||
const BOOTNODE_PORT: u16 = 42424;
|
||||
const QUIC_PORT: u16 = 43424;
|
||||
pub const INVALID_ADDRESS: &str = "http://127.0.0.1:42423";
|
||||
|
||||
pub const EXECUTION_PORT: u16 = 4000;
|
||||
@@ -63,9 +64,10 @@ impl<E: EthSpec> LocalNetwork<E> {
|
||||
std::net::Ipv4Addr::UNSPECIFIED,
|
||||
BOOTNODE_PORT,
|
||||
BOOTNODE_PORT,
|
||||
QUIC_PORT,
|
||||
);
|
||||
beacon_config.network.enr_udp4_port = Some(BOOTNODE_PORT);
|
||||
beacon_config.network.enr_tcp4_port = Some(BOOTNODE_PORT);
|
||||
beacon_config.network.enr_udp4_port = Some(BOOTNODE_PORT.try_into().expect("non zero"));
|
||||
beacon_config.network.enr_tcp4_port = Some(BOOTNODE_PORT.try_into().expect("non zero"));
|
||||
beacon_config.network.discv5_config.table_filter = |_| true;
|
||||
|
||||
let execution_node = if let Some(el_config) = &mut beacon_config.execution_layer {
|
||||
@@ -150,13 +152,16 @@ impl<E: EthSpec> LocalNetwork<E> {
|
||||
.expect("bootnode must have a network"),
|
||||
);
|
||||
let count = (self.beacon_node_count() + self.proposer_node_count()) as u16;
|
||||
let libp2p_tcp_port = BOOTNODE_PORT + count;
|
||||
let discv5_port = BOOTNODE_PORT + count;
|
||||
beacon_config.network.set_ipv4_listening_address(
|
||||
std::net::Ipv4Addr::UNSPECIFIED,
|
||||
BOOTNODE_PORT + count,
|
||||
BOOTNODE_PORT + count,
|
||||
libp2p_tcp_port,
|
||||
discv5_port,
|
||||
QUIC_PORT + count,
|
||||
);
|
||||
beacon_config.network.enr_udp4_port = Some(BOOTNODE_PORT + count);
|
||||
beacon_config.network.enr_tcp4_port = Some(BOOTNODE_PORT + count);
|
||||
beacon_config.network.enr_udp4_port = Some(discv5_port.try_into().unwrap());
|
||||
beacon_config.network.enr_tcp4_port = Some(libp2p_tcp_port.try_into().unwrap());
|
||||
beacon_config.network.discv5_config.table_filter = |_| true;
|
||||
beacon_config.network.proposer_only = is_proposer;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user