lighthouse/lcli/Cargo.toml
Michael Sproul 7d8acc20a0 Add a flag to make lighthouse portable across machines (#1423)
## Issue Addressed

Closes #1395

## Proposed Changes

* Add a feature to `lighthouse` and `lcli` called `portable` which enables the `portable` feature on our fork of BLST. This feature turns off the `-march=native` C compiler flag that produces binaries highly targeted to the host CPU's instruction set.
* Tweak the `Makefile` so that when the `PORTABLE` environment variable is set to `true`, it compiles with this feature.
* Temporarily enable `PORTABLE=true` in the Docker build so that the image on Docker Hub is portable. Eventually I think we should enable `PORTABLE=true` _only on Docker Hub_, so that users building locally can take advantage of the tasty compiler magic. This seems to be possible by setting a Docker Hub environment variable: https://docs.docker.com/docker-hub/builds/#environment-variables-for-builds

## Additional Info

Tested by compiling on a very new CPU (Intel Core i7-8550U) and copying the binary to a very old CPU (Intel Core i3 530). Before the portability fix, this produced the SIGILL crash described in #1395, and after the fix, it worked smoothly.

I'm in the process of testing the Docker build and running some benches to confirm that the performance penalty isn't too severe.
2020-07-31 05:00:39 +00:00

37 lines
1.1 KiB
TOML

[package]
name = "lcli"
description = "Lighthouse CLI (modeled after zcli)"
version = "0.2.0"
authors = ["Paul Hauner <paul@paulhauner.com>"]
edition = "2018"
[features]
portable = ["bls/supranational-portable"]
[dependencies]
bls = { path = "../crypto/bls" }
clap = "2.33.0"
hex = "0.4.2"
log = "0.4.8"
serde = "1.0.110"
serde_yaml = "0.8.11"
simple_logger = "1.6.0"
types = { path = "../consensus/types" }
state_processing = { path = "../consensus/state_processing" }
eth2_ssz = "0.1.2"
regex = "1.3.7"
futures = { version = "0.3.5", features = ["compat"] }
environment = { path = "../lighthouse/environment" }
web3 = "0.11.0"
eth2_testnet_config = { path = "../common/eth2_testnet_config" }
dirs = "2.0.2"
genesis = { path = "../beacon_node/genesis" }
deposit_contract = { path = "../common/deposit_contract" }
tree_hash = "0.1.0"
tokio = { version = "0.2.21", features = ["full"] }
clap_utils = { path = "../common/clap_utils" }
eth2_libp2p = { path = "../beacon_node/eth2_libp2p" }
validator_dir = { path = "../common/validator_dir", features = ["insecure_keys"] }
rand = "0.7.2"
eth2_keystore = { path = "../crypto/eth2_keystore" }