Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Improve compile time #1989

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,047 changes: 197 additions & 850 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ COPY . lighthouse
ARG PORTABLE
ENV PORTABLE $PORTABLE
RUN cd lighthouse && make
RUN cd lighthouse && make install-lcli

FROM debian:buster-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
Expand All @@ -13,4 +12,3 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/cargo/bin/lighthouse /usr/local/bin/lighthouse
COPY --from=builder /usr/local/cargo/bin/lcli /usr/local/bin/lcli
2 changes: 1 addition & 1 deletion account_manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ eth2_ssz_derive = "0.1.0"
hex = "0.4.2"
rayon = "1.4.1"
eth2_testnet_config = { path = "../common/eth2_testnet_config" }
futures = { version = "0.3.7", features = ["compat"] }
futures = "0.3.7"
clap_utils = { path = "../common/clap_utils" }
directory = { path = "../common/directory" }
eth2_wallet = { path = "../crypto/eth2_wallet" }
Expand Down
4 changes: 2 additions & 2 deletions beacon_node/eth1/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ edition = "2018"
[dev-dependencies]
eth1_test_rig = { path = "../../testing/eth1_test_rig" }
toml = "0.5.6"
web3 = "0.11.0"
web3 = "0.13.0"
sloggers = "1.0.1"
environment = { path = "../../lighthouse/environment" }
tokio-compat-02 = "0.1"

[dependencies]
reqwest = { version = "0.10.8", features = ["native-tls-vendored"] }
futures = { version = "0.3.7", features = ["compat"] }
futures = "0.3.7"
serde_json = "1.0.58"
serde = { version = "1.0.116", features = ["derive"] }
hex = "0.4.2"
Expand Down
2 changes: 0 additions & 2 deletions beacon_node/eth1/tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use eth1::http::{get_deposit_count, get_deposit_logs_in_range, get_deposit_root,
use eth1::{Config, Service};
use eth1::{DepositCache, DEFAULT_CHAIN_ID, DEFAULT_NETWORK_ID};
use eth1_test_rig::GanacheEth1Instance;
use futures::compat::Future01CompatExt;
use merkle_proof::verify_merkle_proof;
use slog::Logger;
use sloggers::{null::NullLoggerBuilder, Build};
Expand Down Expand Up @@ -90,7 +89,6 @@ async fn blocking_deposit_count(eth1: &GanacheEth1Instance, block_number: u64) -
async fn get_block_number(web3: &Web3<Http>) -> u64 {
web3.eth()
.block_number()
.compat()
.await
.map(|v| v.as_u64())
.expect("should get block number")
Expand Down
2 changes: 0 additions & 2 deletions beacon_node/genesis/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use environment::{Environment, EnvironmentBuilder};
use eth1::{DEFAULT_CHAIN_ID, DEFAULT_NETWORK_ID};
use eth1_test_rig::{DelayThenDeposit, GanacheEth1Instance};
use futures::compat::Future01CompatExt;
use genesis::{Eth1Config, Eth1GenesisService};
use state_processing::is_valid_genesis_state;
use std::time::Duration;
Expand Down Expand Up @@ -40,7 +39,6 @@ fn basic() {
let now = web3
.eth()
.block_number()
.compat()
.await
.map(|v| v.as_u64())
.expect("should get block number");
Expand Down
4 changes: 2 additions & 2 deletions crypto/bls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
eth2_ssz = "0.1.2"
tree_hash = "0.1.1"
milagro_bls = { git = "https://github.com/sigp/milagro_bls", tag = "v1.4.0" }
milagro_bls = { git = "https://github.com/sigp/milagro_bls", tag = "v1.4.0", optional = true }
rand = "0.7.3"
serde = "1.0.116"
serde_derive = "1.0.116"
Expand All @@ -22,7 +22,7 @@ blst = "0.3.2"
[features]
default = ["supranational"]
fake_crypto = []
milagro = []
milagro = ["milagro_bls"]
supranational = []
supranational-portable = ["supranational", "blst/portable"]
supranational-force-adx = ["supranational", "blst/force-adx"]
1 change: 1 addition & 0 deletions crypto/bls/src/impls/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pub mod blst;
pub mod fake_crypto;
#[cfg(feature = "milagro")]
pub mod milagro;
4 changes: 4 additions & 0 deletions crypto/bls/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@ pub use get_withdrawal_credentials::get_withdrawal_credentials;
pub use zeroize_hash::ZeroizeHash;

use blst::BLST_ERROR as BlstError;
#[cfg(feature = "milagro")]
use milagro_bls::AmclError;

pub type Hash256 = ethereum_types::H256;

#[derive(Clone, Debug, PartialEq)]
pub enum Error {
/// An error was raised from the Milagro BLS library.
#[cfg(feature = "milagro")]
MilagroError(AmclError),
/// An error was raised from the Supranational BLST BLS library.
BlstError(BlstError),
Expand All @@ -62,6 +64,7 @@ pub enum Error {
InvalidZeroSecretKey,
}

#[cfg(feature = "milagro")]
impl From<AmclError> for Error {
fn from(e: AmclError) -> Error {
Error::MilagroError(e)
Expand Down Expand Up @@ -122,6 +125,7 @@ macro_rules! define_mod {
};
}

#[cfg(feature = "milagro")]
define_mod!(milagro_implementations, crate::impls::milagro::types);
define_mod!(blst_implementations, crate::impls::blst::types);
#[cfg(feature = "fake_crypto")]
Expand Down
2 changes: 1 addition & 1 deletion crypto/bls/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ mod blst {
test_suite!(blst_implementations);
}

#[cfg(not(debug_assertions))]
#[cfg(all(feature = "milagro", not(debug_assertions)))]
mod milagro {
test_suite!(milagro_implementations);
}
3 changes: 1 addition & 2 deletions lcli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ types = { path = "../consensus/types" }
state_processing = { path = "../consensus/state_processing" }
eth2_ssz = "0.1.2"
regex = "1.3.9"
futures = { version = "0.3.7", features = ["compat"] }
futures = "0.3.7"
environment = { path = "../lighthouse/environment" }
web3 = "0.11.0"
eth2_testnet_config = { path = "../common/eth2_testnet_config" }
dirs = "3.0.1"
genesis = { path = "../beacon_node/genesis" }
Expand Down
71 changes: 0 additions & 71 deletions lcli/src/deploy_deposit_contract.rs

This file was deleted.

Loading