From 7c211f379100fad3b44ae0ef91756d2b6b266bdb Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Thu, 12 Sep 2019 10:40:29 -0400 Subject: [PATCH 1/2] Add explicit fails for 32bit architecture --- beacon_node/src/main.rs | 8 ++++++++ validator_client/src/main.rs | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/beacon_node/src/main.rs b/beacon_node/src/main.rs index 54e4529c4..bb88e8f92 100644 --- a/beacon_node/src/main.rs +++ b/beacon_node/src/main.rs @@ -357,6 +357,14 @@ fn main() { let log = slog::Logger::root(drain.fuse(), o!()); + if std::mem::size_of::() != 8 { + crit!( + log, + "Lighthouse only supports 64bit CPUs"; + "detected" => format!("{}bit", std::mem::size_of::() * 8) + ); + } + warn!( log, "Ethereum 2.0 is pre-release. This software is experimental." diff --git a/validator_client/src/main.rs b/validator_client/src/main.rs index e445218eb..58914a9a8 100644 --- a/validator_client/src/main.rs +++ b/validator_client/src/main.rs @@ -157,6 +157,14 @@ fn main() { let mut log = slog::Logger::root(drain.fuse(), o!()); + if std::mem::size_of::() != 8 { + crit!( + log, + "Lighthouse only supports 64bit CPUs"; + "detected" => format!("{}bit", std::mem::size_of::() * 8) + ); + } + let (client_config, eth2_config) = match get_configs(&matches, &mut log) { Ok(tuple) => tuple, Err(e) => { From 62b5f9c5a0ace22f6c2b173b3e45a6b7a4f60097 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Thu, 12 Sep 2019 12:28:31 -0400 Subject: [PATCH 2/2] Move lcli out of the tests dir --- Cargo.toml | 2 +- {tests/lcli => lcli}/.gitignore | 0 {tests/lcli => lcli}/Cargo.toml | 6 +++--- {tests/lcli => lcli}/src/main.rs | 0 {tests/lcli => lcli}/src/parse_hex.rs | 0 {tests/lcli => lcli}/src/transition_blocks.rs | 0 6 files changed, 4 insertions(+), 4 deletions(-) rename {tests/lcli => lcli}/.gitignore (100%) rename {tests/lcli => lcli}/Cargo.toml (71%) rename {tests/lcli => lcli}/src/main.rs (100%) rename {tests/lcli => lcli}/src/parse_hex.rs (100%) rename {tests/lcli => lcli}/src/transition_blocks.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 0a98bb8dd..3600c90ca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,7 @@ members = [ "beacon_node/version", "beacon_node/beacon_chain", "tests/ef_tests", - "tests/lcli", + "lcli", "protos", "validator_client", "account_manager", diff --git a/tests/lcli/.gitignore b/lcli/.gitignore similarity index 100% rename from tests/lcli/.gitignore rename to lcli/.gitignore diff --git a/tests/lcli/Cargo.toml b/lcli/Cargo.toml similarity index 71% rename from tests/lcli/Cargo.toml rename to lcli/Cargo.toml index 3322d8cca..b774d4d12 100644 --- a/tests/lcli/Cargo.toml +++ b/lcli/Cargo.toml @@ -14,6 +14,6 @@ log = "0.4" serde = "1.0" serde_yaml = "0.8" simple_logger = "1.0" -types = { path = "../../eth2/types" } -state_processing = { path = "../../eth2/state_processing" } -eth2_ssz = { path = "../../eth2/utils/ssz" } +types = { path = "../eth2/types" } +state_processing = { path = "../eth2/state_processing" } +eth2_ssz = { path = "../eth2/utils/ssz" } diff --git a/tests/lcli/src/main.rs b/lcli/src/main.rs similarity index 100% rename from tests/lcli/src/main.rs rename to lcli/src/main.rs diff --git a/tests/lcli/src/parse_hex.rs b/lcli/src/parse_hex.rs similarity index 100% rename from tests/lcli/src/parse_hex.rs rename to lcli/src/parse_hex.rs diff --git a/tests/lcli/src/transition_blocks.rs b/lcli/src/transition_blocks.rs similarity index 100% rename from tests/lcli/src/transition_blocks.rs rename to lcli/src/transition_blocks.rs