From 157e31027a6bdf39db04d9a413bac3748e2029cd Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Wed, 4 Nov 2020 19:46:42 +0000 Subject: [PATCH] Add warnings for deposits (#1858) ## Issue Addressed NA ## Proposed Changes Add some warnings to discourage users to user Lighthouse for mainnet. ## Additional Info NA --- README.md | 10 ++++++++++ account_manager/src/validator/create.rs | 4 ++++ book/src/intro.md | 4 ++++ book/src/testnet-validator.md | 4 ++++ book/src/validator-create.md | 4 ++++ lighthouse/tests/account_manager.rs | 12 ++++++++---- 6 files changed, 34 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 381b15065..ce01458fa 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,10 @@ An open-source Ethereum 2.0 client, written in Rust and maintained by Sigma Prim ![Banner](https://i.postimg.cc/hjdTGKPd/photo-2020-10-23-09-52-16.jpg) +**🚨🚨🚨 Note: Lighthouse is not *yet* ready to produce mainnet deposits. The developers will require some +time to test against the mainnet deposit contract, once it is released. DO NOT SUBMIT VALIDATOR +DEPOSITS WITH LIGHTHOUSE. 🚨🚨🚨** + ## Overview Lighthouse is: @@ -30,6 +34,12 @@ Lighthouse is: Like all Ethereum 2.0 clients, Lighthouse is a work-in-progress. +## Eth2 Deposit Contract + +The Lighthouse team acknowledges +[`0x00000000219ab540356cBB839Cbe05303d7705Fa`](https://etherscan.io/address/0x00000000219ab540356cbb839cbe05303d7705fa) +as the canonical Eth2 deposit contract address. + ## Development Status Current development overview: diff --git a/account_manager/src/validator/create.rs b/account_manager/src/validator/create.rs index a779a2881..51d466264 100644 --- a/account_manager/src/validator/create.rs +++ b/account_manager/src/validator/create.rs @@ -25,6 +25,8 @@ pub const STORE_WITHDRAW_FLAG: &str = "store-withdrawal-keystore"; pub const COUNT_FLAG: &str = "count"; pub const AT_MOST_FLAG: &str = "at-most"; pub const WALLET_PASSWORD_PROMPT: &str = "Enter your wallet's password:"; +pub const MAINNET_WARNING: &str = "These are *not* mainnet validators! Submitting a mainnet \ + deposit for this validator will result in lost ETH."; pub fn cli_app<'a, 'b>() -> App<'a, 'b> { App::new(CMD) @@ -229,6 +231,8 @@ pub fn cli_run( .map_err(|e| format!("Unable to build validator directory: {:?}", e))?; println!("{}/{}\t{}", i + 1, n, voting_pubkey.to_hex_string()); + + println!("{}", MAINNET_WARNING); } Ok(()) diff --git a/book/src/intro.md b/book/src/intro.md index f5f8b1b66..22fa48adb 100644 --- a/book/src/intro.md +++ b/book/src/intro.md @@ -13,6 +13,10 @@ clients to form a resilient and decentralized proof-of-stake blockchain. We implement the specification as defined in the [ethereum/eth2.0-specs](https://github.com/ethereum/eth2.0-specs) repository. +**🚨🚨🚨 Note: Lighthouse is not *yet* ready to produce mainnet deposits. The developers will require some +time to test against the mainnet deposit contract, once it is released. DO NOT SUBMIT VALIDATOR +DEPOSITS WITH LIGHTHOUSE. 🚨🚨🚨** + ## Topics You may read this book from start to finish, or jump to some of these topics: diff --git a/book/src/testnet-validator.md b/book/src/testnet-validator.md index 3422a0a11..58e2912e1 100644 --- a/book/src/testnet-validator.md +++ b/book/src/testnet-validator.md @@ -3,6 +3,10 @@ Joining an Eth2 testnet is a great way to get familiar with staking in Phase 0. All users should experiment with a testnet prior to staking mainnet ETH. +**🚨🚨🚨 Note: Lighthouse is not *yet* ready to produce mainnet deposits. The developers will require some +time to test against the mainnet deposit contract, once it is released. DO NOT SUBMIT VALIDATOR +DEPOSITS WITH LIGHTHOUSE. 🚨🚨🚨** + ## Supported Testnets Lighthouse supports four testnets: diff --git a/book/src/validator-create.md b/book/src/validator-create.md index 101056140..995c20065 100644 --- a/book/src/validator-create.md +++ b/book/src/validator-create.md @@ -1,5 +1,9 @@ # Create a validator +**🚨🚨🚨 Note: Lighthouse is not *yet* ready to produce mainnet deposits. The developers will require some +time to test against the mainnet deposit contract, once it is released. DO NOT SUBMIT VALIDATOR +DEPOSITS WITH LIGHTHOUSE. 🚨🚨🚨** + Validators are fundamentally represented by a BLS keypair. In Lighthouse, we use a [wallet](./wallet-create.md) to generate these keypairs. Once a wallet exists, the `lighthouse account validator create` command is used to generate diff --git a/lighthouse/tests/account_manager.rs b/lighthouse/tests/account_manager.rs index 4ce7bb8ac..d64dbb977 100644 --- a/lighthouse/tests/account_manager.rs +++ b/lighthouse/tests/account_manager.rs @@ -283,10 +283,14 @@ impl TestValidator { let pubkeys = stdout[..stdout.len() - 1] .split("\n") - .map(|line| { - let tab = line.find("\t").expect("line must have tab"); - let (_, pubkey) = line.split_at(tab + 1); - pubkey.to_string() + .filter_map(|line| { + if line.starts_with(MAINNET_WARNING) { + None + } else { + let tab = line.find("\t").expect("line must have tab"); + let (_, pubkey) = line.split_at(tab + 1); + Some(pubkey.to_string()) + } }) .collect::>();