Add solana_clap_utils::hidden_unless_forced() (#30843)
* Add solana_clap_utils::hidden_unless_forced() * Use more descriptive env name Co-authored-by: mvines <mvines@gmail.com> --------- Co-authored-by: mvines <mvines@gmail.com>
This commit is contained in:
parent
ac8c31b5d6
commit
721719d776
|
@ -5,7 +5,9 @@ use {
|
|||
rand::{thread_rng, Rng},
|
||||
rayon::prelude::*,
|
||||
solana_account_decoder::parse_token::spl_token_pubkey,
|
||||
solana_clap_utils::{input_parsers::pubkey_of, input_validators::is_url_or_moniker},
|
||||
solana_clap_utils::{
|
||||
hidden_unless_forced, input_parsers::pubkey_of, input_validators::is_url_or_moniker,
|
||||
},
|
||||
solana_cli_config::{ConfigInput, CONFIG_FILE},
|
||||
solana_client::transaction_executor::TransactionExecutor,
|
||||
solana_gossip::gossip_service::discover,
|
||||
|
@ -529,7 +531,7 @@ fn main() {
|
|||
.long("faucet")
|
||||
.takes_value(true)
|
||||
.value_name("HOST:PORT")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.help("Faucet entrypoint address. Usually <ip>:9900"),
|
||||
)
|
||||
.arg(
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
use {
|
||||
crate::spl_convert::FromOtherSolana,
|
||||
clap::{crate_description, crate_name, App, Arg, ArgMatches},
|
||||
solana_clap_utils::input_validators::{is_keypair, is_url, is_url_or_moniker, is_within_range},
|
||||
solana_clap_utils::{
|
||||
hidden_unless_forced,
|
||||
input_validators::{is_keypair, is_url, is_url_or_moniker, is_within_range},
|
||||
},
|
||||
solana_cli_config::{ConfigInput, CONFIG_FILE},
|
||||
solana_sdk::{
|
||||
fee_calculator::FeeRateGovernor,
|
||||
|
@ -185,7 +188,7 @@ pub fn build_args<'a>(version: &'_ str) -> App<'a, '_> {
|
|||
.long("faucet")
|
||||
.value_name("HOST:PORT")
|
||||
.takes_value(true)
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.help("Deprecated. BenchTps no longer queries the faucet directly"),
|
||||
)
|
||||
.arg(
|
||||
|
|
|
@ -23,6 +23,10 @@ impl std::fmt::Debug for DisplayError {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn hidden_unless_forced() -> bool {
|
||||
std::env::var("SOLANA_NO_HIDDEN_CLI_ARGS").is_err()
|
||||
}
|
||||
|
||||
pub mod compute_unit_price;
|
||||
pub mod fee_payer;
|
||||
pub mod input_parsers;
|
||||
|
|
|
@ -4,7 +4,7 @@ use {
|
|||
inflation::*, nonce::*, program::*, stake::*, validator_info::*, vote::*, wallet::*,
|
||||
},
|
||||
clap::{App, AppSettings, Arg, ArgGroup, SubCommand},
|
||||
solana_clap_utils::{self, input_validators::*, keypair::*},
|
||||
solana_clap_utils::{self, hidden_unless_forced, input_validators::*, keypair::*},
|
||||
solana_cli_config::CONFIG_FILE,
|
||||
};
|
||||
|
||||
|
@ -125,7 +125,7 @@ pub fn get_clap_app<'ab, 'v>(name: &str, about: &'ab str, version: &'v str) -> A
|
|||
.takes_value(true)
|
||||
.default_value(DEFAULT_RPC_TIMEOUT_SECONDS)
|
||||
.global(true)
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.help("Timeout value for RPC requests"),
|
||||
)
|
||||
.arg(
|
||||
|
@ -135,7 +135,7 @@ pub fn get_clap_app<'ab, 'v>(name: &str, about: &'ab str, version: &'v str) -> A
|
|||
.takes_value(true)
|
||||
.default_value(DEFAULT_CONFIRM_TX_TIMEOUT_SECONDS)
|
||||
.global(true)
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.help("Timeout value for initial transaction status"),
|
||||
)
|
||||
.cluster_query_subcommands()
|
||||
|
|
|
@ -6,7 +6,9 @@ use {
|
|||
clap::{App, AppSettings, Arg, ArgMatches, SubCommand},
|
||||
console::style,
|
||||
serde::{Deserialize, Serialize},
|
||||
solana_clap_utils::{fee_payer::*, input_parsers::*, input_validators::*, keypair::*},
|
||||
solana_clap_utils::{
|
||||
fee_payer::*, hidden_unless_forced, input_parsers::*, input_validators::*, keypair::*,
|
||||
},
|
||||
solana_cli_output::{cli_version::CliVersion, QuietDisplay, VerboseDisplay},
|
||||
solana_remote_wallet::remote_wallet::RemoteWalletManager,
|
||||
solana_rpc_client::rpc_client::RpcClient,
|
||||
|
@ -424,7 +426,7 @@ impl FeatureSubCommands for App<'_, '_> {
|
|||
.arg(
|
||||
Arg::with_name("force")
|
||||
.long("yolo")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.multiple(true)
|
||||
.help("Override activation sanity checks. Don't use this flag"),
|
||||
)
|
||||
|
|
|
@ -11,7 +11,9 @@ use {
|
|||
log::*,
|
||||
solana_account_decoder::{UiAccountEncoding, UiDataSliceConfig},
|
||||
solana_bpf_loader_program::syscalls::create_loader,
|
||||
solana_clap_utils::{self, input_parsers::*, input_validators::*, keypair::*},
|
||||
solana_clap_utils::{
|
||||
self, hidden_unless_forced, input_parsers::*, input_validators::*, keypair::*,
|
||||
},
|
||||
solana_cli_output::{
|
||||
CliProgram, CliProgramAccountType, CliProgramAuthority, CliProgramBuffer, CliProgramId,
|
||||
CliUpgradeableBuffer, CliUpgradeableBuffers, CliUpgradeableProgram,
|
||||
|
@ -134,7 +136,7 @@ impl ProgramSubCommands for App<'_, '_> {
|
|||
.arg(
|
||||
Arg::with_name("skip_fee_check")
|
||||
.long("skip-fee-check")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.takes_value(false)
|
||||
.global(true)
|
||||
)
|
||||
|
|
|
@ -14,6 +14,7 @@ use {
|
|||
solana_clap_utils::{
|
||||
compute_unit_price::{compute_unit_price_arg, COMPUTE_UNIT_PRICE_ARG},
|
||||
fee_payer::{fee_payer_arg, FEE_PAYER_ARG},
|
||||
hidden_unless_forced,
|
||||
input_parsers::*,
|
||||
input_validators::*,
|
||||
keypair::{DefaultSigner, SignerIndex},
|
||||
|
@ -267,7 +268,7 @@ impl StakeSubCommands for App<'_, '_> {
|
|||
Arg::with_name("force")
|
||||
.long("force")
|
||||
.takes_value(false)
|
||||
.hidden(true) // Don't document this argument to discourage its use
|
||||
.hidden(hidden_unless_forced()) // Don't document this argument to discourage its use
|
||||
.help("Override vote account sanity checks (use carefully!)")
|
||||
)
|
||||
.arg(
|
||||
|
@ -298,7 +299,7 @@ impl StakeSubCommands for App<'_, '_> {
|
|||
Arg::with_name("force")
|
||||
.long("force")
|
||||
.takes_value(false)
|
||||
.hidden(true) // Don't document this argument to discourage its use
|
||||
.hidden(hidden_unless_forced()) // Don't document this argument to discourage its use
|
||||
.help("Override vote account sanity checks (use carefully!)")
|
||||
)
|
||||
.arg(
|
||||
|
|
|
@ -11,6 +11,7 @@ use {
|
|||
self, ValidatorInfo, MAX_LONG_FIELD_LENGTH, MAX_SHORT_FIELD_LENGTH,
|
||||
},
|
||||
solana_clap_utils::{
|
||||
hidden_unless_forced,
|
||||
input_parsers::pubkey_of,
|
||||
input_validators::{is_pubkey, is_url},
|
||||
keypair::DefaultSigner,
|
||||
|
@ -182,7 +183,7 @@ impl ValidatorInfoSubCommands for App<'_, '_> {
|
|||
Arg::with_name("force")
|
||||
.long("force")
|
||||
.takes_value(false)
|
||||
.hidden(true) // Don't document this argument to discourage its use
|
||||
.hidden(hidden_unless_forced()) // Don't document this argument to discourage its use
|
||||
.help("Override keybase username validity check"),
|
||||
),
|
||||
)
|
||||
|
|
|
@ -13,6 +13,7 @@ use {
|
|||
solana_clap_utils::{
|
||||
compute_unit_price::{compute_unit_price_arg, COMPUTE_UNIT_PRICE_ARG},
|
||||
fee_payer::*,
|
||||
hidden_unless_forced,
|
||||
input_parsers::*,
|
||||
input_validators::*,
|
||||
keypair::{DefaultSigner, SignerIndex},
|
||||
|
@ -252,7 +253,7 @@ impl WalletSubCommands for App<'_, '_> {
|
|||
.value_name("SEED_STRING")
|
||||
.requires("derived_address_program_id")
|
||||
.validator(is_derived_address_seed)
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("derived_address_program_id")
|
||||
|
@ -260,7 +261,7 @@ impl WalletSubCommands for App<'_, '_> {
|
|||
.takes_value(true)
|
||||
.value_name("PROGRAM_ID")
|
||||
.requires("derived_address_seed")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("allow_unfunded_recipient")
|
||||
|
|
|
@ -6,6 +6,7 @@ use {
|
|||
SubCommand,
|
||||
},
|
||||
solana_clap_utils::{
|
||||
hidden_unless_forced,
|
||||
input_parsers::keypair_of,
|
||||
input_validators::{is_keypair_or_ask_keyword, is_port, is_pubkey},
|
||||
},
|
||||
|
@ -39,7 +40,7 @@ fn parse_matches() -> ArgMatches<'static> {
|
|||
.long("allow-private-addr")
|
||||
.takes_value(false)
|
||||
.help("Allow contacting private ip addresses")
|
||||
.hidden(true),
|
||||
.hidden(hidden_unless_forced()),
|
||||
)
|
||||
.subcommand(
|
||||
SubCommand::with_name("rpc-url")
|
||||
|
|
|
@ -18,6 +18,7 @@ use {
|
|||
serde_json::json,
|
||||
solana_account_decoder::{UiAccount, UiAccountData, UiAccountEncoding},
|
||||
solana_clap_utils::{
|
||||
hidden_unless_forced,
|
||||
input_parsers::{cluster_type_of, pubkey_of, pubkeys_of},
|
||||
input_validators::{
|
||||
is_parsable, is_pow2, is_pubkey, is_pubkey_or_keypair, is_slot, is_valid_percentage,
|
||||
|
@ -1476,7 +1477,7 @@ fn main() {
|
|||
.help(
|
||||
"Debug option to scan all AppendVecs and verify account index refcounts prior to clean",
|
||||
)
|
||||
.hidden(true);
|
||||
.hidden(hidden_unless_forced());
|
||||
let accounts_filler_count = Arg::with_name("accounts_filler_count")
|
||||
.long("accounts-filler-count")
|
||||
.value_name("COUNT")
|
||||
|
@ -1523,7 +1524,7 @@ fn main() {
|
|||
Arg::with_name("accounts_db_skip_initial_hash_calculation")
|
||||
.long("accounts-db-skip-initial-hash-calculation")
|
||||
.help("Do not verify accounts hash at startup.")
|
||||
.hidden(true);
|
||||
.hidden(hidden_unless_forced());
|
||||
let ancient_append_vecs = Arg::with_name("accounts_db_ancient_append_vecs")
|
||||
.long("accounts-db-ancient-append-vecs")
|
||||
.value_name("SLOT-OFFSET")
|
||||
|
@ -1532,11 +1533,11 @@ fn main() {
|
|||
.help(
|
||||
"AppendVecs that are older than (slots_per_epoch - SLOT-OFFSET) are squashed together.",
|
||||
)
|
||||
.hidden(true);
|
||||
.hidden(hidden_unless_forced());
|
||||
let halt_at_slot_store_hash_raw_data = Arg::with_name("halt_at_slot_store_hash_raw_data")
|
||||
.long("halt-at-slot-store-hash-raw-data")
|
||||
.help("After halting at slot, run an accounts hash calculation and store the raw hash data for debugging.")
|
||||
.hidden(true);
|
||||
.hidden(hidden_unless_forced());
|
||||
let verify_index_arg = Arg::with_name("verify_accounts_index")
|
||||
.long("verify-accounts-index")
|
||||
.takes_value(false)
|
||||
|
|
|
@ -3,6 +3,7 @@ use {
|
|||
lazy_static::lazy_static,
|
||||
log::warn,
|
||||
solana_clap_utils::{
|
||||
hidden_unless_forced,
|
||||
input_validators::{
|
||||
is_keypair, is_keypair_or_ask_keyword, is_niceness_adjustment_valid, is_parsable,
|
||||
is_pow2, is_pubkey, is_pubkey_or_keypair, is_slot, is_url_or_moniker,
|
||||
|
@ -198,7 +199,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
|||
Arg::with_name("no_port_check")
|
||||
.long("no-port-check")
|
||||
.takes_value(false)
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.help("Do not perform TCP/UDP reachable port checks at start-up")
|
||||
)
|
||||
.arg(
|
||||
|
@ -490,37 +491,37 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
|||
.arg(
|
||||
Arg::with_name("no_poh_speed_test")
|
||||
.long("no-poh-speed-test")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.help("Skip the check for PoH speed."),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("no_os_network_limits_test")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.long("no-os-network-limits-test")
|
||||
.help("Skip checks for OS network limits.")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("no_os_memory_stats_reporting")
|
||||
.long("no-os-memory-stats-reporting")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.help("Disable reporting of OS memory statistics.")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("no_os_network_stats_reporting")
|
||||
.long("no-os-network-stats-reporting")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.help("Disable reporting of OS network statistics.")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("no_os_cpu_stats_reporting")
|
||||
.long("no-os-cpu-stats-reporting")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.help("Disable reporting of OS CPU statistics.")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("no_os_disk_stats_reporting")
|
||||
.long("no-os-disk-stats-reporting")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.help("Disable reporting of OS disk statistics.")
|
||||
)
|
||||
.arg(
|
||||
|
@ -587,7 +588,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
|||
)
|
||||
.arg(
|
||||
Arg::with_name("rocksdb_ledger_compression")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.long("rocksdb-ledger-compression")
|
||||
.value_name("COMPRESSION_TYPE")
|
||||
.takes_value(true)
|
||||
|
@ -599,7 +600,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
|||
)
|
||||
.arg(
|
||||
Arg::with_name("rocksdb_perf_sample_interval")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.long("rocksdb-perf-sample-interval")
|
||||
.value_name("ROCKS_PERF_SAMPLE_INTERVAL")
|
||||
.takes_value(true)
|
||||
|
@ -671,7 +672,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
|||
)
|
||||
.arg(
|
||||
Arg::with_name("no_wait_for_vote_to_start_leader")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.long("no-wait-for-vote-to-start-leader")
|
||||
.help("If the validator starts up with no ledger, it will wait to start block
|
||||
production until it sees a vote land in a rooted slot. This prevents
|
||||
|
@ -726,7 +727,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
|||
)
|
||||
.arg(
|
||||
Arg::with_name("repair_whitelist")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.long("repair-whitelist")
|
||||
.validator(is_pubkey)
|
||||
.value_name("VALIDATOR IDENTITY")
|
||||
|
@ -759,7 +760,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
|||
Arg::with_name("tpu_use_quic")
|
||||
.long("tpu-use-quic")
|
||||
.takes_value(false)
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.conflicts_with("tpu_disable_quic")
|
||||
.help("Use QUIC to send transactions."),
|
||||
)
|
||||
|
@ -883,7 +884,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
|||
.value_name("NUMBER")
|
||||
.takes_value(true)
|
||||
.validator(is_parsable::<usize>)
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.help("The maximum number of connections that RPC PubSub will support. \
|
||||
This is a hard limit and no new connections beyond this limit can \
|
||||
be made until an old connection is dropped. (Obsolete)"),
|
||||
|
@ -894,7 +895,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
|||
.value_name("BYTES")
|
||||
.takes_value(true)
|
||||
.validator(is_parsable::<usize>)
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.help("The maximum length in bytes of acceptable incoming frames. Messages longer \
|
||||
than this will be rejected. (Obsolete)"),
|
||||
)
|
||||
|
@ -904,7 +905,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
|||
.value_name("BYTES")
|
||||
.takes_value(true)
|
||||
.validator(is_parsable::<usize>)
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.help("The maximum size in bytes to which the incoming websocket buffer can grow. \
|
||||
(Obsolete)"),
|
||||
)
|
||||
|
@ -914,7 +915,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
|||
.value_name("BYTES")
|
||||
.takes_value(true)
|
||||
.validator(is_parsable::<usize>)
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.help("The maximum size in bytes to which the outgoing websocket buffer can grow. \
|
||||
(Obsolete)"),
|
||||
)
|
||||
|
@ -971,7 +972,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
|||
Arg::with_name("rpc_send_transaction_batch_ms")
|
||||
.long("rpc-send-batch-ms")
|
||||
.value_name("MILLISECS")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.takes_value(true)
|
||||
.validator(|s| is_within_range(s, 1..=MAX_BATCH_SEND_RATE_MS))
|
||||
.default_value(&default_args.rpc_send_transaction_batch_ms)
|
||||
|
@ -1007,7 +1008,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
|||
Arg::with_name("rpc_send_transaction_batch_size")
|
||||
.long("rpc-send-batch-size")
|
||||
.value_name("NUMBER")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.takes_value(true)
|
||||
.validator(|s| is_within_range(s, 1..=MAX_TRANSACTION_BATCH_SIZE))
|
||||
.default_value(&default_args.rpc_send_transaction_batch_size)
|
||||
|
@ -1033,7 +1034,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
|||
Arg::with_name("enable_accountsdb_repl")
|
||||
.long("enable-accountsdb-repl")
|
||||
.takes_value(false)
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.help("Enable AccountsDb Replication"),
|
||||
)
|
||||
.arg(
|
||||
|
@ -1042,7 +1043,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
|||
.value_name("HOST")
|
||||
.takes_value(true)
|
||||
.validator(solana_net_utils::is_host)
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.help("IP address to bind the AccountsDb Replication port [default: use --bind-address]"),
|
||||
)
|
||||
.arg(
|
||||
|
@ -1051,7 +1052,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
|||
.value_name("PORT")
|
||||
.takes_value(true)
|
||||
.validator(port_validator)
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.help("Enable AccountsDb Replication Service on this port"),
|
||||
)
|
||||
.arg(
|
||||
|
@ -1061,7 +1062,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
|||
.validator(is_parsable::<usize>)
|
||||
.takes_value(true)
|
||||
.default_value(&default_args.accountsdb_repl_threads)
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.help("Number of threads to use for servicing AccountsDb Replication requests"),
|
||||
)
|
||||
.arg(
|
||||
|
@ -1123,7 +1124,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
|||
)
|
||||
.arg(
|
||||
Arg::with_name("poh_pinned_cpu_core")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.long("experimental-poh-pinned-cpu-core")
|
||||
.takes_value(true)
|
||||
.value_name("CPU_CORE_INDEX")
|
||||
|
@ -1139,7 +1140,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
|||
)
|
||||
.arg(
|
||||
Arg::with_name("poh_hashes_per_batch")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.long("poh-hashes-per-batch")
|
||||
.takes_value(true)
|
||||
.value_name("NUM")
|
||||
|
@ -1148,7 +1149,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
|||
.arg(
|
||||
Arg::with_name("process_ledger_before_services")
|
||||
.long("process-ledger-before-services")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.help("Process the local ledger fully before starting networking services")
|
||||
)
|
||||
.arg(
|
||||
|
@ -1183,13 +1184,13 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
|||
Arg::with_name("accounts_db_verify_refcounts")
|
||||
.long("accounts-db-verify-refcounts")
|
||||
.help("Debug option to scan all append vecs and verify account index refcounts prior to clean")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("accounts_db_create_ancient_storage_packed")
|
||||
.long("accounts-db-create-ancient-storage-packed")
|
||||
.help("Create ancient storages in one shot instead of appending.")
|
||||
.hidden(true),
|
||||
.hidden(hidden_unless_forced()),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("accounts_db_ancient_append_vecs")
|
||||
|
@ -1198,7 +1199,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
|||
.validator(is_parsable::<i64>)
|
||||
.takes_value(true)
|
||||
.help("AppendVecs that are older than (slots_per_epoch - SLOT-OFFSET) are squashed together.")
|
||||
.hidden(true),
|
||||
.hidden(hidden_unless_forced()),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("accounts_db_cache_limit_mb")
|
||||
|
@ -1297,7 +1298,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
|||
.long("allow-private-addr")
|
||||
.takes_value(false)
|
||||
.help("Allow contacting private ip addresses")
|
||||
.hidden(true),
|
||||
.hidden(hidden_unless_forced()),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("log_messages_bytes_limit")
|
||||
|
@ -1599,17 +1600,17 @@ fn get_deprecated_arguments() -> Vec<Arg<'static, 'static>> {
|
|||
Arg::with_name("accounts_db_skip_shrink")
|
||||
.long("accounts-db-skip-shrink")
|
||||
.help("This is obsolete since it is now enabled by default. Enables faster starting of validators by skipping startup clean and shrink.")
|
||||
.hidden(true),
|
||||
.hidden(hidden_unless_forced()),
|
||||
Arg::with_name("accounts_db_caching_enabled")
|
||||
.long("accounts-db-caching-enabled")
|
||||
.hidden(true),
|
||||
.hidden(hidden_unless_forced()),
|
||||
Arg::with_name("accounts_db_index_hashing")
|
||||
.long("accounts-db-index-hashing")
|
||||
.help(
|
||||
"Enables the use of the index in hash calculation in \
|
||||
AccountsHashVerifier/Accounts Background Service.",
|
||||
)
|
||||
.hidden(true),
|
||||
.hidden(hidden_unless_forced()),
|
||||
Arg::with_name("no_accounts_db_index_hashing")
|
||||
.long("no-accounts-db-index-hashing")
|
||||
.help(
|
||||
|
@ -1617,24 +1618,24 @@ fn get_deprecated_arguments() -> Vec<Arg<'static, 'static>> {
|
|||
Disables the use of the index in hash calculation in \
|
||||
AccountsHashVerifier/Accounts Background Service.",
|
||||
)
|
||||
.hidden(true),
|
||||
.hidden(hidden_unless_forced()),
|
||||
Arg::with_name("bpf_jit")
|
||||
.long("bpf-jit")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.takes_value(false)
|
||||
.conflicts_with("no_bpf_jit"),
|
||||
Arg::with_name("disable_quic_servers")
|
||||
.long("disable-quic-servers")
|
||||
.takes_value(false)
|
||||
.hidden(true),
|
||||
.hidden(hidden_unless_forced()),
|
||||
Arg::with_name("enable_quic_servers")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.long("enable-quic-servers"),
|
||||
Arg::with_name("enable_cpi_and_log_storage")
|
||||
.long("enable-cpi-and-log-storage")
|
||||
.requires("enable_rpc_transaction_history")
|
||||
.takes_value(false)
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.help(
|
||||
"Deprecated, please use \"enable-extended-tx-metadata-storage\". \
|
||||
Include CPI inner instructions, logs and return data in \
|
||||
|
@ -1643,7 +1644,7 @@ fn get_deprecated_arguments() -> Vec<Arg<'static, 'static>> {
|
|||
Arg::with_name("incremental_snapshots")
|
||||
.long("incremental-snapshots")
|
||||
.takes_value(false)
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.conflicts_with("no_incremental_snapshots")
|
||||
.help("Enable incremental snapshots")
|
||||
.long_help(
|
||||
|
@ -1655,29 +1656,29 @@ fn get_deprecated_arguments() -> Vec<Arg<'static, 'static>> {
|
|||
Arg::with_name("minimal_rpc_api")
|
||||
.long("minimal-rpc-api")
|
||||
.takes_value(false)
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.help("Only expose the RPC methods required to serve snapshots to other nodes"),
|
||||
Arg::with_name("no_check_vote_account")
|
||||
.long("no-check-vote-account")
|
||||
.takes_value(false)
|
||||
.conflicts_with("no_voting")
|
||||
.requires("entrypoint")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.help("Skip the RPC vote account sanity check"),
|
||||
Arg::with_name("no_rocksdb_compaction")
|
||||
.long("no-rocksdb-compaction")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.takes_value(false)
|
||||
.help("Disable manual compaction of the ledger database (this is ignored)."),
|
||||
Arg::with_name("rocksdb_compaction_interval")
|
||||
.long("rocksdb-compaction-interval-slots")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.value_name("ROCKSDB_COMPACTION_INTERVAL_SLOTS")
|
||||
.takes_value(true)
|
||||
.help("Number of slots between compacting ledger"),
|
||||
Arg::with_name("rocksdb_max_compaction_jitter")
|
||||
.long("rocksdb-max-compaction-jitter-slots")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.value_name("ROCKSDB_MAX_COMPACTION_JITTER_SLOTS")
|
||||
.takes_value(true)
|
||||
.help("Introduce jitter into the compaction to offset compaction operation"),
|
||||
|
@ -2023,7 +2024,7 @@ pub fn test_app<'a>(version: &'a str, default_args: &'a DefaultTestArgs) -> App<
|
|||
Arg::with_name("enable_rpc_bigtable_ledger_storage")
|
||||
.long("enable-rpc-bigtable-ledger-storage")
|
||||
.takes_value(false)
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.help("Fetch historical transaction info from a BigTable instance \
|
||||
as a fallback to local ledger data"),
|
||||
)
|
||||
|
@ -2032,7 +2033,7 @@ pub fn test_app<'a>(version: &'a str, default_args: &'a DefaultTestArgs) -> App<
|
|||
.long("rpc-bigtable-instance")
|
||||
.value_name("INSTANCE_NAME")
|
||||
.takes_value(true)
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.default_value("solana-ledger")
|
||||
.help("Name of BigTable instance to target"),
|
||||
)
|
||||
|
@ -2041,7 +2042,7 @@ pub fn test_app<'a>(version: &'a str, default_args: &'a DefaultTestArgs) -> App<
|
|||
.long("rpc-bigtable-app-profile-id")
|
||||
.value_name("APP_PROFILE_ID")
|
||||
.takes_value(true)
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
.default_value(solana_storage_bigtable::DEFAULT_APP_PROFILE_ID)
|
||||
.help("Application profile id to use in Bigtable requests")
|
||||
)
|
||||
|
|
|
@ -5,6 +5,7 @@ use {
|
|||
clap::{crate_description, crate_name, value_t, value_t_or_exit, App, Arg},
|
||||
log::*,
|
||||
solana_clap_utils::{
|
||||
hidden_unless_forced,
|
||||
input_parsers::pubkeys_of,
|
||||
input_validators::{is_parsable, is_pubkey_or_keypair, is_url},
|
||||
},
|
||||
|
@ -132,7 +133,7 @@ fn get_config() -> Config {
|
|||
// Deprecated parameter, now always enabled
|
||||
Arg::with_name("no_duplicate_notifications")
|
||||
.long("no-duplicate-notifications")
|
||||
.hidden(true)
|
||||
.hidden(hidden_unless_forced())
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("monitor_active_stake")
|
||||
|
|
Loading…
Reference in New Issue