Skip to content
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ef1d732
Delete BN spec flag and VC beacon-node flag
michaelsproul Nov 1, 2023
c9cd62b
Remove warn
chong-he Nov 1, 2023
7ccaeee
slog
chong-he Nov 2, 2023
f207b8d
add warn
chong-he Nov 2, 2023
7f947b5
delete eth1-endpoint
chong-he Nov 2, 2023
f8986cb
delete server from vc cli.rs
chong-he Nov 5, 2023
228c933
delete server flag in config.rs
chong-he Nov 5, 2023
cf8ca59
delete delete-lockfiles in vc
chong-he Nov 5, 2023
f32370d
delete allow-unsynced flag in VC
chong-he Nov 5, 2023
6761c79
delete strict-fee-recipient in VC and warn log
chong-he Nov 5, 2023
fe78961
delete merge flag in bn (hidden)
chong-he Nov 5, 2023
bfc9074
delete count-unrealized and count-unrealized-full in bn (hidden)
chong-he Nov 5, 2023
b0d7eac
delete http-disable-legacy-spec in bn (hidden)
chong-he Nov 5, 2023
c7994e2
delete eth1-endpoint in lcli
chong-he Nov 5, 2023
4e92aa9
delete warn message lcli
chong-he Nov 5, 2023
27b78ef
delete eth1-endpoints
chong-he Nov 6, 2023
469b9fa
delete minify in slashing protection
chong-he Nov 6, 2023
32a7c89
delete minify related
chong-he Nov 6, 2023
2262516
Remove mut
chong-he Nov 6, 2023
41a9e4a
add back warn! log
chong-he Nov 6, 2023
5dc0a8d
Indentation
chong-he Nov 7, 2023
95942ba
Delete count-unrealized
chong-he Nov 7, 2023
4c53ad9
Delete eth1-endpoints
chong-he Nov 7, 2023
554342e
Delete eth1-endpoint test
chong-he Nov 7, 2023
bee319f
delete eth1-endpints test
chong-he Nov 7, 2023
38633f1
delete allow-unsynced test
chong-he Nov 7, 2023
0d17bd0
Add back lcli eth1-endpoint
chong-he Nov 8, 2023
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
48 changes: 2 additions & 46 deletions account_manager/src/validator/slashing_protection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ pub const EXPORT_CMD: &str = "export";
pub const IMPORT_FILE_ARG: &str = "IMPORT-FILE";
pub const EXPORT_FILE_ARG: &str = "EXPORT-FILE";

pub const MINIFY_FLAG: &str = "minify";
pub const PUBKEYS_FLAG: &str = "pubkeys";

pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
Expand All @@ -31,16 +30,6 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
.value_name("FILE")
.help("The slashing protection interchange file to import (.json)"),
)
.arg(
Arg::with_name(MINIFY_FLAG)
.long(MINIFY_FLAG)
.takes_value(true)
.possible_values(&["false", "true"])
.help(
"Deprecated: Lighthouse no longer requires minification on import \
because it always minifies",
),
),
)
.subcommand(
App::new(EXPORT_CMD)
Expand All @@ -61,17 +50,6 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
comma-separated. All known keys will be exported if omitted",
),
)
.arg(
Arg::with_name(MINIFY_FLAG)
.long(MINIFY_FLAG)
.takes_value(true)
.default_value("false")
.possible_values(&["false", "true"])
.help(
"Minify the output file. This will make it smaller and faster to \
import, but not faster to generate.",
),
),
)
}

Expand All @@ -92,7 +70,6 @@ pub fn cli_run<T: EthSpec>(
match matches.subcommand() {
(IMPORT_CMD, Some(matches)) => {
let import_filename: PathBuf = clap_utils::parse_required(matches, IMPORT_FILE_ARG)?;
let minify: Option<bool> = clap_utils::parse_optional(matches, MINIFY_FLAG)?;
let import_file = File::open(&import_filename).map_err(|e| {
format!(
"Unable to open import file at {}: {:?}",
Expand All @@ -102,23 +79,10 @@ pub fn cli_run<T: EthSpec>(
})?;

eprint!("Loading JSON file into memory & deserializing");
let mut interchange = Interchange::from_json_reader(&import_file)
let interchange = Interchange::from_json_reader(&import_file)
.map_err(|e| format!("Error parsing file for import: {:?}", e))?;
eprintln!(" [done].");

if let Some(minify) = minify {
eprintln!(
"WARNING: --minify flag is deprecated and will be removed in a future release"
);
if minify {
eprint!("Minifying input file for faster loading");
interchange = interchange
.minify()
.map_err(|e| format!("Minification failed: {:?}", e))?;
eprintln!(" [done].");
}
}

let slashing_protection_database =
SlashingDatabase::open_or_create(&slashing_protection_db_path).map_err(|e| {
format!(
Expand Down Expand Up @@ -206,7 +170,6 @@ pub fn cli_run<T: EthSpec>(
}
(EXPORT_CMD, Some(matches)) => {
let export_filename: PathBuf = clap_utils::parse_required(matches, EXPORT_FILE_ARG)?;
let minify: bool = clap_utils::parse_required(matches, MINIFY_FLAG)?;

let selected_pubkeys = if let Some(pubkeys) =
clap_utils::parse_optional::<String>(matches, PUBKEYS_FLAG)?
Expand Down Expand Up @@ -237,17 +200,10 @@ pub fn cli_run<T: EthSpec>(
)
})?;

let mut interchange = slashing_protection_database
let interchange = slashing_protection_database
.export_interchange_info(genesis_validators_root, selected_pubkeys.as_deref())
.map_err(|e| format!("Error during export: {:?}", e))?;

if minify {
eprintln!("Minifying output file");
interchange = interchange
.minify()
.map_err(|e| format!("Unable to minify output: {:?}", e))?;
}

let output_file = File::create(export_filename)
.map_err(|e| format!("Error creating output file: {:?}", e))?;

Expand Down
48 changes: 0 additions & 48 deletions beacon_node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,12 +388,6 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
address of this server (e.g., http://localhost:5052).")
.takes_value(true),
)
.arg(
Arg::with_name("http-disable-legacy-spec")
.long("http-disable-legacy-spec")
.requires("enable_http")
.hidden(true)
)
.arg(
Arg::with_name("http-spec-fork")
.long("http-spec-fork")
Expand Down Expand Up @@ -569,24 +563,6 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
.help("If present, uses an eth1 backend that generates static dummy data.\
Identical to the method used at the 2019 Canada interop.")
)
.arg(
Arg::with_name("eth1-endpoint")
.long("eth1-endpoint")
.value_name("HTTP-ENDPOINT")
.help("Deprecated. Use --eth1-endpoints.")
.takes_value(true)
)
.arg(
Arg::with_name("eth1-endpoints")
.long("eth1-endpoints")
.value_name("HTTP-ENDPOINTS")
.conflicts_with("eth1-endpoint")
.help("One http endpoint for a web3 connection to an execution node. \
Note: This flag is now only useful for testing, use `--execution-endpoint` \
flag to connect to an execution node on mainnet and testnets.
Defaults to http://127.0.0.1:8545.")
.takes_value(true)
)
.arg(
Arg::with_name("eth1-purge-cache")
.long("eth1-purge-cache")
Expand Down Expand Up @@ -649,14 +625,6 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
/*
* Execution Layer Integration
*/
.arg(
Arg::with_name("merge")
.long("merge")
.help("Deprecated. The feature activates automatically when --execution-endpoint \
is supplied.")
.takes_value(false)
.hidden(true)
)
.arg(
Arg::with_name("execution-endpoint")
.long("execution-endpoint")
Expand Down Expand Up @@ -1200,22 +1168,6 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
.requires("builder")
.takes_value(true)
)
.arg(
Arg::with_name("count-unrealized")
.long("count-unrealized")
.hidden(true)
.help("This flag is deprecated and has no effect.")
.takes_value(true)
.default_value("true")
)
.arg(
Arg::with_name("count-unrealized-full")
.long("count-unrealized-full")
.hidden(true)
.help("This flag is deprecated and has no effect.")
.takes_value(true)
.default_value("false")
)
.arg(
Arg::with_name("reset-payload-statuses")
.long("reset-payload-statuses")
Expand Down
66 changes: 0 additions & 66 deletions beacon_node/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,6 @@ pub fn get_config<E: EthSpec>(
client_config.http_api.allow_origin = Some(allow_origin.to_string());
}

if cli_args.is_present("http-disable-legacy-spec") {
warn!(
log,
"The flag --http-disable-legacy-spec is deprecated and will be removed"
);
}

if let Some(fork_name) = clap_utils::parse_optional(cli_args, "http-spec-fork")? {
client_config.http_api.spec_fork_name = Some(fork_name);
}
Expand Down Expand Up @@ -240,25 +233,6 @@ pub fn get_config<E: EthSpec>(
client_config.sync_eth1_chain = true;
}

// Defines the URL to reach the eth1 node.
if let Some(endpoint) = cli_args.value_of("eth1-endpoint") {
warn!(
log,
"The --eth1-endpoint flag is deprecated";
"msg" => "please use --eth1-endpoints instead"
);
client_config.sync_eth1_chain = true;

let endpoint = SensitiveUrl::parse(endpoint)
.map_err(|e| format!("eth1-endpoint was an invalid URL: {:?}", e))?;
client_config.eth1.endpoint = Eth1Endpoint::NoAuth(endpoint);
} else if let Some(endpoint) = cli_args.value_of("eth1-endpoints") {
client_config.sync_eth1_chain = true;
let endpoint = SensitiveUrl::parse(endpoint)
.map_err(|e| format!("eth1-endpoints contains an invalid URL {:?}", e))?;
client_config.eth1.endpoint = Eth1Endpoint::NoAuth(endpoint);
}

if let Some(val) = cli_args.value_of("eth1-blocks-per-log-query") {
client_config.eth1.blocks_per_log_query = val
.parse()
Expand All @@ -275,20 +249,6 @@ pub fn get_config<E: EthSpec>(
client_config.eth1.cache_follow_distance = Some(follow_distance);
}

if cli_args.is_present("merge") {
if cli_args.is_present("execution-endpoint") {
warn!(
log,
"The --merge flag is deprecated";
"info" => "the --execution-endpoint flag automatically enables this feature"
)
} else {
return Err("The --merge flag is deprecated. \
Supply a value to --execution-endpoint instead."
.into());
}
}

if let Some(endpoints) = cli_args.value_of("execution-endpoint") {
let mut el_config = execution_layer::Config::default();

Expand Down Expand Up @@ -364,16 +324,6 @@ pub fn get_config<E: EthSpec>(
clap_utils::parse_required(cli_args, "execution-timeout-multiplier")?;
el_config.execution_timeout_multiplier = Some(execution_timeout_multiplier);

// If `--execution-endpoint` is provided, we should ignore any `--eth1-endpoints` values and
// use `--execution-endpoint` instead. Also, log a deprecation warning.
if cli_args.is_present("eth1-endpoints") || cli_args.is_present("eth1-endpoint") {
warn!(
log,
"Ignoring --eth1-endpoints flag";
"info" => "the value for --execution-endpoint will be used instead. \
--eth1-endpoints has been deprecated for post-merge configurations"
);
}
client_config.eth1.endpoint = Eth1Endpoint::Auth {
endpoint: execution_endpoint,
jwt_path: secret_file,
Expand Down Expand Up @@ -812,22 +762,6 @@ pub fn get_config<E: EthSpec>(
client_config.chain.fork_choice_before_proposal_timeout_ms = timeout;
}

if !clap_utils::parse_required::<bool>(cli_args, "count-unrealized")? {
warn!(
log,
"The flag --count-unrealized is deprecated and will be removed";
"info" => "any use of the flag will have no effect"
);
}

if clap_utils::parse_required::<bool>(cli_args, "count-unrealized-full")? {
warn!(
log,
"The flag --count-unrealized-full is deprecated and will be removed";
"info" => "setting it to `true` has no effect"
);
}

client_config.chain.always_reset_payload_statuses =
cli_args.is_present("reset-payload-statuses");

Expand Down
8 changes: 0 additions & 8 deletions lcli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,14 +276,6 @@ fn main() {
.subcommand(
SubCommand::with_name("eth1-genesis")
.about("Listens to the eth1 chain and finds the genesis beacon state")
.arg(
Arg::with_name("eth1-endpoint")
.short("e")
.long("eth1-endpoint")
.value_name("HTTP_SERVER")
.takes_value(true)
.help("Deprecated. Use --eth1-endpoints."),
)
.arg(
Arg::with_name("eth1-endpoints")
.long("eth1-endpoints")
Expand Down
21 changes: 2 additions & 19 deletions lighthouse/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use ethereum_hashing::have_sha_extensions;
use futures::TryFutureExt;
use lighthouse_version::VERSION;
use malloc_utils::configure_memory_allocator;
use slog::{crit, info, warn};
use slog::{crit, info};
use std::path::PathBuf;
use std::process::exit;
use task_executor::ShutdownReason;
Expand Down Expand Up @@ -81,16 +81,6 @@ fn main() {
cfg!(feature = "gnosis"),
).as_str()
)
.arg(
Arg::with_name("spec")
.short("s")
.long("spec")
.value_name("DEPRECATED")
.help("This flag is deprecated, it will be disallowed in a future release. This \
value is now derived from the --network or --testnet-dir flags.")
.takes_value(true)
.global(true)
)
.arg(
Arg::with_name("env_log")
.short("l")
Expand Down Expand Up @@ -549,16 +539,9 @@ fn run<E: EthSpec>(
// Allow Prometheus access to the version and commit of the Lighthouse build.
metrics::expose_lighthouse_version();

if matches.is_present("spec") {
warn!(
log,
"The --spec flag is deprecated and will be removed in a future release"
);
}

#[cfg(all(feature = "modern", target_arch = "x86_64"))]
if !std::is_x86_feature_detected!("adx") {
warn!(
slog::warn!(
log,
"CPU seems incompatible with optimized Lighthouse build";
"advice" => "If you get a SIGILL, please try Lighthouse portable build"
Expand Down
Loading