mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-19 12:56:12 +00:00
Downgrade ADX check to a warning (#1846)
## Issue Addressed Closes #1842 ## Proposed Changes Due to the lies told to us by VPS providers about what CPU features they support, we are forced to check for the availability of CPU features like ADX by just _running code and seeing if it crashes_. The prominent warning should hopefully help users who have truly incompatible CPUs work out what is going on, while not burdening users of cheap VPSs.
This commit is contained in:
@@ -196,13 +196,6 @@ fn run<E: EthSpec>(
|
||||
));
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "modern", target_arch = "x86_64"))]
|
||||
if !std::is_x86_feature_detected!("adx") {
|
||||
return Err(format!(
|
||||
"CPU incompatible with optimized binary, please try Lighthouse portable build"
|
||||
));
|
||||
}
|
||||
|
||||
let debug_level = matches
|
||||
.value_of("debug-level")
|
||||
.ok_or_else(|| "Expected --debug-level flag".to_string())?;
|
||||
@@ -232,6 +225,15 @@ fn run<E: EthSpec>(
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "modern", target_arch = "x86_64"))]
|
||||
if !std::is_x86_feature_detected!("adx") {
|
||||
warn!(
|
||||
log,
|
||||
"CPU seems incompatible with optimized Lighthouse build";
|
||||
"advice" => "If you get a SIGILL, please try Lighthouse portable build"
|
||||
);
|
||||
}
|
||||
|
||||
// Note: the current code technically allows for starting a beacon node _and_ a validator
|
||||
// client at the same time.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user