* Improve check for Apple M1 silicon under Rosetta (cherry picked from commit59641623d1
) # Conflicts: # core/src/validator.rs * test-validator: start logging asap (cherry picked from commitee65ffb3c8
) * test-validator: move feature check earlier in startup (cherry picked from commite641f257ef
) * validator: add avx2 runtime check (cherry picked from commitc435f7b3e3
) * validator: start logging asap (cherry picked from commited8285c096
) * validator: check target CPU features earlier (cherry picked from commit8ed0cd0fff
) * validator: remove disused cuda config argument (cherry picked from commit71f6d839f9
) Co-authored-by: Trent Nelson <trent@solana.com>
This commit is contained in:
@@ -2076,6 +2076,33 @@ pub fn main() {
|
||||
.exit();
|
||||
}));
|
||||
|
||||
let logfile = {
|
||||
let logfile = matches
|
||||
.value_of("logfile")
|
||||
.map(|s| s.into())
|
||||
.unwrap_or_else(|| format!("solana-validator-{}.log", identity_keypair.pubkey()));
|
||||
|
||||
if logfile == "-" {
|
||||
None
|
||||
} else {
|
||||
println!("log file: {}", logfile);
|
||||
Some(logfile)
|
||||
}
|
||||
};
|
||||
let use_progress_bar = logfile.is_none();
|
||||
let _logger_thread = redirect_stderr_to_file(logfile);
|
||||
|
||||
info!("{} {}", crate_name!(), solana_version::version!());
|
||||
info!("Starting validator with: {:#?}", std::env::args_os());
|
||||
|
||||
let cuda = matches.is_present("cuda");
|
||||
if cuda {
|
||||
solana_perf::perf_libs::init_cuda();
|
||||
enable_recycler_warming();
|
||||
}
|
||||
|
||||
solana_core::validator::report_target_features();
|
||||
|
||||
let authorized_voter_keypairs = keypairs_of(&matches, "authorized_voter_keypairs")
|
||||
.map(|keypairs| keypairs.into_iter().map(Arc::new).collect())
|
||||
.unwrap_or_else(|| vec![identity_keypair.clone()]);
|
||||
@@ -2197,7 +2224,6 @@ pub fn main() {
|
||||
require_tower: matches.is_present("require_tower"),
|
||||
tower_path: value_t!(matches, "tower", PathBuf).ok(),
|
||||
dev_halt_at_slot: value_t!(matches, "dev_halt_at_slot", Slot).ok(),
|
||||
cuda: matches.is_present("cuda"),
|
||||
expected_genesis_hash: matches
|
||||
.value_of("expected_genesis_hash")
|
||||
.map(|s| Hash::from_str(s).unwrap()),
|
||||
@@ -2471,25 +2497,6 @@ pub fn main() {
|
||||
exit(1);
|
||||
});
|
||||
|
||||
let logfile = {
|
||||
let logfile = matches
|
||||
.value_of("logfile")
|
||||
.map(|s| s.into())
|
||||
.unwrap_or_else(|| format!("solana-validator-{}.log", identity_keypair.pubkey()));
|
||||
|
||||
if logfile == "-" {
|
||||
None
|
||||
} else {
|
||||
println!("log file: {}", logfile);
|
||||
Some(logfile)
|
||||
}
|
||||
};
|
||||
let use_progress_bar = logfile.is_none();
|
||||
let _logger_thread = redirect_stderr_to_file(logfile);
|
||||
|
||||
info!("{} {}", crate_name!(), solana_version::version!());
|
||||
info!("Starting validator with: {:#?}", std::env::args_os());
|
||||
|
||||
let start_progress = Arc::new(RwLock::new(ValidatorStartProgress::default()));
|
||||
admin_rpc_service::run(
|
||||
&ledger_path,
|
||||
@@ -2594,10 +2601,6 @@ pub fn main() {
|
||||
solana_metrics::set_host_id(identity_keypair.pubkey().to_string());
|
||||
solana_metrics::set_panic_hook("validator");
|
||||
|
||||
if validator_config.cuda {
|
||||
solana_perf::perf_libs::init_cuda();
|
||||
enable_recycler_warming();
|
||||
}
|
||||
solana_ledger::entry::init_poh();
|
||||
solana_runtime::snapshot_utils::remove_tmp_snapshot_archives(&snapshot_output_dir);
|
||||
|
||||
|
Reference in New Issue
Block a user