Skip to content

Commit

Permalink
Merge branch 'unstable' into jemalloc-sea
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhauner committed Feb 15, 2021
2 parents d4010e3 + 4a357c9 commit 4331ef8
Show file tree
Hide file tree
Showing 53 changed files with 1,225 additions and 233 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/cancel-previous-runs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: cancel previous runs
on: [push]
jobs:
cancel:
name: 'Cancel Previous Runs'
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
# https://github.com/styfle/cancel-workflow-action/releases
- uses: styfle/cancel-workflow-action@514c783 # 0.7.0
with:
# https://api.github.com/repos/sigp/lighthouse/actions/workflows
workflow_id: 697364,2434944,4462424,308241,2883401,316
access_token: ${{ github.token }}
4 changes: 4 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
DOCKER_CLI_EXPERIMENTAL: enabled
steps:
- uses: actions/checkout@v2
- name: Update Rust
run: rustup update stable
- name: Dockerhub login
run: |
echo "${DOCKER_PASSWORD}" | docker login --username ${DOCKER_USERNAME} --password-stdin
Expand Down Expand Up @@ -58,6 +60,8 @@ jobs:
needs: [extract-branch-name]
steps:
- uses: actions/checkout@v2
- name: Update Rust
run: rustup update stable
- name: Dockerhub login
run: |
echo "${DOCKER_PASSWORD}" | docker login --username ${DOCKER_USERNAME} --password-stdin
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ jobs:

- name: Create Release Draft
env:
GITHUB_USER: sigp
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# The formatting here is borrowed from OpenEthereum: https://github.com/openethereum/openethereum/blob/main/.github/workflows/build.yml
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Get latest version of stable Rust
run: rustup update stable
- name: Get latest version of stable Rust
run: rustup update stable
- name: Check formatting with cargo fmt
Expand Down Expand Up @@ -78,6 +80,8 @@ jobs:
needs: cargo-fmt
steps:
- uses: actions/checkout@v1
- name: Get latest version of stable Rust
run: rustup update stable
- name: Build the root Dockerfile
run: docker build .
eth1-simulator-ubuntu:
Expand All @@ -86,6 +90,8 @@ jobs:
needs: cargo-fmt
steps:
- uses: actions/checkout@v1
- name: Get latest version of stable Rust
run: rustup update stable
- name: Install ganache-cli
run: sudo npm install -g ganache-cli
- name: Run the beacon chain sim that starts from an eth1 contract
Expand All @@ -96,6 +102,8 @@ jobs:
needs: cargo-fmt
steps:
- uses: actions/checkout@v1
- name: Get latest version of stable Rust
run: rustup update stable
- name: Install ganache-cli
run: sudo npm install -g ganache-cli
- name: Run the beacon chain sim without an eth1 connection
Expand All @@ -106,6 +114,8 @@ jobs:
needs: cargo-fmt
steps:
- uses: actions/checkout@v1
- name: Get latest version of stable Rust
run: rustup update stable
- name: Install ganache-cli
run: sudo npm install -g ganache-cli
- name: Run the syncing simulator
Expand All @@ -116,6 +126,8 @@ jobs:
needs: cargo-fmt
steps:
- uses: actions/checkout@v1
- name: Get latest version of stable Rust
run: rustup update stable
- name: Typecheck benchmark code without running it
run: make check-benches
check-consensus:
Expand All @@ -124,6 +136,8 @@ jobs:
needs: cargo-fmt
steps:
- uses: actions/checkout@v1
- name: Get latest version of stable Rust
run: rustup update stable
- name: Typecheck consensus code in strict mode
run: make check-consensus
clippy:
Expand All @@ -132,6 +146,8 @@ jobs:
needs: cargo-fmt
steps:
- uses: actions/checkout@v1
- name: Get latest version of stable Rust
run: rustup update stable
- name: Lint code for quality and style with Clippy
run: make lint
- name: Certify Cargo.lock freshness
Expand All @@ -142,6 +158,8 @@ jobs:
needs: cargo-fmt
steps:
- uses: actions/checkout@v1
- name: Get latest version of stable Rust
run: rustup update stable
- name: Validate state_processing feature arbitrary-fuzz
run: make arbitrary-fuzz
cargo-audit:
Expand All @@ -150,6 +168,8 @@ jobs:
needs: cargo-fmt
steps:
- uses: actions/checkout@v1
- name: Get latest version of stable Rust
run: rustup update stable
- name: Run cargo audit to identify known security vulnerabilities reported to the RustSec Advisory Database
run: make audit
cargo-udeps:
Expand Down
18 changes: 9 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.47.0 AS builder
FROM rust:1.50.0 AS builder
RUN apt-get update && apt-get install -y cmake
COPY . lighthouse
ARG PORTABLE
Expand Down
4 changes: 2 additions & 2 deletions account_manager/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ pub fn read_mnemonic_from_cli(
})
})?,
None => loop {
eprintln!("");
eprintln!();
eprintln!("{}", MNEMONIC_PROMPT);

let mnemonic = read_input_from_user(stdin_inputs)?;

match Mnemonic::from_phrase(mnemonic.as_str(), Language::English) {
Ok(mnemonic_m) => {
eprintln!("Valid mnemonic provided.");
eprintln!("");
eprintln!();
sleep(Duration::from_secs(1));
break mnemonic_m;
}
Expand Down
2 changes: 1 addition & 1 deletion account_manager/src/validator/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ pub fn read_wallet_password_from_cli(
.map_err(|e| format!("Unable to read {:?}: {:?}", path, e))
.map(|bytes| strip_off_newlines(bytes).into()),
None => {
eprintln!("");
eprintln!();
eprintln!("{}", WALLET_PASSWORD_PROMPT);
let password =
PlainText::from(read_password_from_user(stdin_inputs)?.as_ref().to_vec());
Expand Down
4 changes: 2 additions & 2 deletions account_manager/src/validator/exit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ fn load_voting_keypair(
.map_err(|e| format!("Error while decrypting keypair: {:?}", e))
} else {
// Prompt password from user.
eprintln!("");
eprintln!();
eprintln!(
"{} for validator in {:?}: ",
PASSWORD_PROMPT, voting_keystore_path
Expand All @@ -289,7 +289,7 @@ fn load_voting_keypair(
match keystore.decrypt_keypair(password.as_ref()) {
Ok(keypair) => {
eprintln!("Password is correct.");
eprintln!("");
eprintln!();
std::thread::sleep(std::time::Duration::from_secs(1)); // Provides nicer UX.
Ok(keypair)
}
Expand Down
14 changes: 7 additions & 7 deletions account_manager/src/validator/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ pub fn cli_run(matches: &ArgMatches, validator_dir: PathBuf) -> Result<(), Strin
let keystore = Keystore::from_json_file(src_keystore)
.map_err(|e| format!("Unable to read keystore JSON {:?}: {:?}", src_keystore, e))?;

eprintln!("");
eprintln!();
eprintln!("Keystore found at {:?}:", src_keystore);
eprintln!("");
eprintln!();
eprintln!(" - Public key: 0x{}", keystore.pubkey());
eprintln!(" - UUID: {}", keystore.uuid());
eprintln!("");
eprintln!();
eprintln!(
"If you enter the password it will be stored as plain-text in {} so that it is not \
required each time the validator client starts.",
Expand All @@ -152,7 +152,7 @@ pub fn cli_run(matches: &ArgMatches, validator_dir: PathBuf) -> Result<(), Strin
eprintln!("Reuse previous password.");
break Some(password);
}
eprintln!("");
eprintln!();
eprintln!("{}", PASSWORD_PROMPT);

let password = read_password_from_user(stdin_inputs)?;
Expand All @@ -166,7 +166,7 @@ pub fn cli_run(matches: &ArgMatches, validator_dir: PathBuf) -> Result<(), Strin
match keystore.decrypt_keypair(password.as_ref()) {
Ok(_) => {
eprintln!("Password is correct.");
eprintln!("");
eprintln!();
sleep(Duration::from_secs(1)); // Provides nicer UX.
if reuse_password {
previous_password = Some(password.clone());
Expand Down Expand Up @@ -234,13 +234,13 @@ pub fn cli_run(matches: &ArgMatches, validator_dir: PathBuf) -> Result<(), Strin
eprintln!("Successfully updated {}.", CONFIG_FILENAME);
}

eprintln!("");
eprintln!();
eprintln!(
"Successfully imported {} validators ({} skipped).",
num_imported_keystores,
keystore_paths.len() - num_imported_keystores
);
eprintln!("");
eprintln!();
eprintln!("WARNING: {}", KEYSTORE_REUSE_WARNING);

Ok(())
Expand Down
4 changes: 2 additions & 2 deletions account_manager/src/validator/recover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ pub fn cli_run(matches: &ArgMatches, validator_dir: PathBuf) -> Result<(), Strin
ensure_dir_exists(&validator_dir)?;
ensure_dir_exists(&secrets_dir)?;

eprintln!("");
eprintln!();
eprintln!("WARNING: KEY RECOVERY CAN LEAD TO DUPLICATING VALIDATORS KEYS, WHICH CAN LEAD TO SLASHING.");
eprintln!("");
eprintln!();

let mnemonic = read_mnemonic_from_cli(mnemonic_path, stdin_inputs)?;

Expand Down
2 changes: 1 addition & 1 deletion account_manager/src/wallet/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ pub fn read_new_wallet_password_from_cli(
Ok(password)
}
None => loop {
eprintln!("");
eprintln!();
eprintln!("{}", NEW_WALLET_PASSWORD_PROMPT);
let password =
PlainText::from(read_password_from_user(stdin_inputs)?.as_ref().to_vec());
Expand Down
4 changes: 2 additions & 2 deletions account_manager/src/wallet/recover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ pub fn cli_run(matches: &ArgMatches, wallet_base_dir: PathBuf) -> Result<(), Str
let mnemonic_path: Option<PathBuf> = clap_utils::parse_optional(matches, MNEMONIC_FLAG)?;
let stdin_inputs = matches.is_present(STDIN_INPUTS_FLAG);

eprintln!("");
eprintln!();
eprintln!("WARNING: KEY RECOVERY CAN LEAD TO DUPLICATING VALIDATORS KEYS, WHICH CAN LEAD TO SLASHING.");
eprintln!("");
eprintln!();

let mnemonic = read_mnemonic_from_cli(mnemonic_path, stdin_inputs)?;

Expand Down
2 changes: 1 addition & 1 deletion beacon_node/beacon_chain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ futures = "0.3.7"
genesis = { path = "../genesis" }
integer-sqrt = "0.1.5"
rand = "0.7.3"
rand_core = "0.5.1"
rand_core = "0.6.2"
proto_array = { path = "../../consensus/proto_array" }
lru = "0.6.0"
tempfile = "3.1.0"
Expand Down
Loading

0 comments on commit 4331ef8

Please sign in to comment.