resolve merge conflicts

This commit is contained in:
Eitan Seri-Levi
2026-04-30 01:51:26 +02:00
544 changed files with 48684 additions and 18351 deletions

View File

@@ -364,7 +364,7 @@ pub fn cli_app() -> Command {
.long("libp2p-addresses")
.value_name("MULTIADDR")
.help("One or more comma-delimited multiaddrs to manually connect to a libp2p peer \
without an ENR.")
without an ENR. DEPRECATED. The --libp2p-addresses flag is deprecated and replaced by --boot-nodes")
.action(ArgAction::Set)
.display_order(0)
)
@@ -670,6 +670,15 @@ pub fn cli_app() -> Command {
.hide(true)
.display_order(0)
)
.arg(
Arg::new("enable-partial-columns")
.long("enable-partial-columns")
.help("Enable partial messages for data columns. This can reduce the amount of \
data sent over the network.")
.action(ArgAction::SetTrue)
.help_heading(FLAG_HEADER)
.display_order(0)
)
/*
* Monitoring metrics
*/
@@ -1246,9 +1255,12 @@ pub fn cli_app() -> Command {
.display_order(0)
)
.arg(
Arg::new("reconstruct-historic-states")
.long("reconstruct-historic-states")
.help("After a checkpoint sync, reconstruct historic states in the database. This requires syncing all the way back to genesis.")
Arg::new("archive")
.long("archive")
.alias("reconstruct-historic-states")
.help("Store all beacon states in the database. When checkpoint syncing, \
states are reconstructed after backfill completes. This requires \
syncing all the way back to genesis.")
.action(ArgAction::SetTrue)
.help_heading(FLAG_HEADER)
.display_order(0)
@@ -1404,6 +1416,16 @@ pub fn cli_app() -> Command {
.help_heading(FLAG_HEADER)
.display_order(0)
)
.arg(
Arg::new("ignore-ws-check")
.long("ignore-ws-check")
.help("Using this flag allows a node to run in a state that may expose it to long-range attacks. \
For more information please read this blog post: https://blog.ethereum.org/2014/11/25/proof-stake-learned-love-weak-subjectivity \
If you understand the risks, you can use this flag to disable the Weak Subjectivity check at startup.")
.action(ArgAction::SetTrue)
.help_heading(FLAG_HEADER)
.display_order(0)
)
.arg(
Arg::new("builder-fallback-skips")
.long("builder-fallback-skips")

View File

@@ -15,7 +15,7 @@ use directory::{DEFAULT_BEACON_NODE_DIR, DEFAULT_NETWORK_DIR, DEFAULT_ROOT_DIR};
use environment::RuntimeContext;
use execution_layer::DEFAULT_JWT_FILE;
use http_api::TlsConfig;
use lighthouse_network::{Enr, Multiaddr, NetworkConfig, PeerIdSerialized, multiaddr::Protocol};
use lighthouse_network::{Enr, Multiaddr, NetworkConfig, PeerIdSerialized};
use network_utils::listen_addr::ListenAddress;
use sensitive_url::SensitiveUrl;
use std::collections::HashSet;
@@ -28,7 +28,7 @@ use std::num::NonZeroU16;
use std::path::{Path, PathBuf};
use std::str::FromStr;
use std::time::Duration;
use tracing::{error, info, warn};
use tracing::{info, warn};
use types::graffiti::GraffitiString;
use types::{Checkpoint, Epoch, EthSpec, Hash256};
@@ -110,6 +110,21 @@ pub fn get_config<E: EthSpec>(
set_network_config(&mut client_config.network, cli_args, &data_dir_ref)?;
if parse_flag(cli_args, "enable-partial-columns") {
// Partial messages assume that each subnet maps to exactly one column.
// Check this here to avoid weird issues on networks where this is not the case.
if spec.data_column_sidecar_subnet_count == E::number_of_columns() as u64 {
client_config.network.enable_partial_columns = true;
client_config.chain.enable_partial_columns = true;
} else {
warn!(
subnets = spec.data_column_sidecar_subnet_count,
columns = E::number_of_columns(),
"Not enabling partial columns on networks with multiple columns per subnet"
)
}
}
// Parse custody mode from CLI flags
let is_supernode = parse_flag(cli_args, "supernode");
let is_semi_supernode = parse_flag(cli_args, "semi-supernode");
@@ -554,8 +569,8 @@ pub fn get_config<E: EthSpec>(
ClientGenesis::DepositContract
};
if cli_args.get_flag("reconstruct-historic-states") {
client_config.chain.reconstruct_historic_states = true;
if cli_args.get_flag("archive") {
client_config.chain.archive = true;
client_config.chain.genesis_backfill = true;
}
@@ -766,10 +781,7 @@ pub fn get_config<E: EthSpec>(
client_config.chain.prepare_payload_lookahead =
clap_utils::parse_optional(cli_args, "prepare-payload-lookahead")?
.map(Duration::from_millis)
.unwrap_or_else(|| {
Duration::from_secs(spec.seconds_per_slot)
/ DEFAULT_PREPARE_PAYLOAD_LOOKAHEAD_FACTOR
});
.unwrap_or_else(|| spec.get_slot_duration() / DEFAULT_PREPARE_PAYLOAD_LOOKAHEAD_FACTOR);
client_config.chain.always_prepare_payload = cli_args.get_flag("always-prepare-payload");
@@ -783,6 +795,8 @@ pub fn get_config<E: EthSpec>(
client_config.chain.paranoid_block_proposal = cli_args.get_flag("paranoid-block-proposal");
client_config.chain.ignore_ws_check = cli_args.get_flag("ignore-ws-check");
/*
* Builder fallback configs.
*/
@@ -1196,12 +1210,6 @@ pub fn set_network_config(
let multi: Multiaddr = addr
.parse()
.map_err(|_| format!("Not valid as ENR nor Multiaddr: {}", addr))?;
if !multi.iter().any(|proto| matches!(proto, Protocol::Udp(_))) {
error!(multiaddr = multi.to_string(), "Missing UDP in Multiaddr");
}
if !multi.iter().any(|proto| matches!(proto, Protocol::P2p(_))) {
error!(multiaddr = multi.to_string(), "Missing P2P in Multiaddr");
}
multiaddrs.push(multi);
}
}
@@ -1210,7 +1218,9 @@ pub fn set_network_config(
config.boot_nodes_multiaddr = multiaddrs;
}
// DEPRECATED: can be removed in v8.2.0./v9.0.0
if let Some(libp2p_addresses_str) = cli_args.get_one::<String>("libp2p-addresses") {
warn!("The --libp2p-addresses flag is deprecated and replaced by --boot-nodes");
config.libp2p_nodes = libp2p_addresses_str
.split(',')
.map(|multiaddr| {

View File

@@ -22,14 +22,9 @@ use types::{ChainSpec, Epoch, EthSpec, ForkName};
pub type ProductionClient<E> =
Client<Witness<SystemTimeSlotClock, E, BeaconNodeBackend<E>, BeaconNodeBackend<E>>>;
/// The beacon node `Client` that will be used in production.
/// The beacon node `Client` that is used in production.
///
/// Generic over some `EthSpec`.
///
/// ## Notes:
///
/// Despite being titled `Production...`, this code is not ready for production. The name
/// demonstrates an intention, not a promise.
pub struct ProductionBeaconNode<E: EthSpec>(ProductionClient<E>);
impl<E: EthSpec> ProductionBeaconNode<E> {