diff --git a/Cargo.lock b/Cargo.lock index 16d1f8af2..17e83520c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -563,6 +563,7 @@ dependencies = [ [[package]] name = "blst" version = "0.1.1" +source = "git+https://github.com/sigp/blst.git?rev=dad1ad0cd22861e5773bee177bee4e1684792605#dad1ad0cd22861e5773bee177bee4e1684792605" dependencies = [ "cc", "glob", diff --git a/lighthouse/Cargo.toml b/lighthouse/Cargo.toml index f34410aa0..660630866 100644 --- a/lighthouse/Cargo.toml +++ b/lighthouse/Cargo.toml @@ -9,6 +9,8 @@ edition = "2018" write_ssz_files = ["beacon_node/write_ssz_files"] # Compiles the BLS crypto code so that the binary is portable across machines. portable = ["bls/supranational-portable"] +# Uses the slower Milagro BLS library, which is written in native Rust. +milagro = ["bls/milagro"] [dependencies] beacon_node = { "path" = "../beacon_node" } diff --git a/lighthouse/src/main.rs b/lighthouse/src/main.rs index 9cc3ed512..d7091e0db 100644 --- a/lighthouse/src/main.rs +++ b/lighthouse/src/main.rs @@ -21,6 +21,16 @@ pub const VERSION: &str = git_version!( pub const DEFAULT_DATA_DIR: &str = ".lighthouse"; pub const ETH2_CONFIG_FILENAME: &str = "eth2-spec.toml"; +fn bls_library_name() -> &'static str { + if cfg!(feature = "portable") { + "blst-portable" + } else if cfg!(feature = "milagro") { + "milagro" + } else { + "blst" + } +} + fn main() { // Parse the CLI parameters. let matches = App::new("Lighthouse") @@ -31,6 +41,13 @@ fn main() { "Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon \ node, a validator client and utilities for managing validator accounts.", ) + .long_version( + format!( + "{}\n\ + BLS Library: {}", + VERSION, bls_library_name() + ).as_str() + ) .arg( Arg::with_name("spec") .short("s")