diff --git a/Cargo.lock b/Cargo.lock index c72a23957a..63c06783df 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -628,7 +628,7 @@ dependencies = [ [[package]] name = "beacon_node" -version = "1.2.0" +version = "1.2.1" dependencies = [ "beacon_chain", "clap", @@ -841,7 +841,7 @@ dependencies = [ [[package]] name = "boot_node" -version = "1.2.0" +version = "1.2.1" dependencies = [ "beacon_node", "clap", @@ -3335,7 +3335,7 @@ dependencies = [ [[package]] name = "lcli" -version = "1.2.0" +version = "1.2.1" dependencies = [ "account_utils", "bls", @@ -3707,7 +3707,7 @@ dependencies = [ [[package]] name = "lighthouse" -version = "1.2.0" +version = "1.2.1" dependencies = [ "account_manager", "account_utils", diff --git a/beacon_node/Cargo.toml b/beacon_node/Cargo.toml index 770aec8dc3..2495bbcaac 100644 --- a/beacon_node/Cargo.toml +++ b/beacon_node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "beacon_node" -version = "1.2.0" +version = "1.2.1" authors = ["Paul Hauner ", "Age Manning "] edition = "2018" diff --git a/common/eth2_network_config/built_in_network_configs/prater/boot_enr.yaml b/common/eth2_network_config/built_in_network_configs/prater/boot_enr.yaml index fe51488c70..fcb2d5342b 100644 --- a/common/eth2_network_config/built_in_network_configs/prater/boot_enr.yaml +++ b/common/eth2_network_config/built_in_network_configs/prater/boot_enr.yaml @@ -1 +1,10 @@ -[] +# q9f bootnode errai (lighthouse) +# /ip4/135.181.181.239/tcp/9000/p2p/16Uiu2HAmPitcpwsGZf1vGiu6hdwZHsVLyFzVZeNqaSmUaSyM7Xvj +- enr:-LK4QH1xnjotgXwg25IDPjrqRGFnH1ScgNHA3dv1Z8xHCp4uP3N3Jjl_aYv_WIxQRdwZvSukzbwspXZ7JjpldyeVDzMCh2F0dG5ldHOIAAAAAAAAAACEZXRoMpB53wQoAAAQIP__________gmlkgnY0gmlwhIe1te-Jc2VjcDI1NmsxoQOkcGXqbCJYbcClZ3z5f6NWhX_1YPFRYRRWQpJjwSHpVIN0Y3CCIyiDdWRwgiMo +# q9f bootnode gudja (teku) +# /ip4/135.181.182.51/tcp/9000/p2p/16Uiu2HAmTttt9ZTmCmwmKiV3QR7iTAfnAckwzhswrNmWkthi6meB +- enr:-KG4QCIzJZTY_fs_2vqWEatJL9RrtnPwDCv-jRBuO5FQ2qBrfJubWOWazri6s9HsyZdu-fRUfEzkebhf1nvO42_FVzwDhGV0aDKQed8EKAAAECD__________4JpZIJ2NIJpcISHtbYziXNlY3AyNTZrMaED4m9AqVs6F32rSCGsjtYcsyfQE2K8nDiGmocUY_iq-TSDdGNwgiMog3VkcIIjKA +# Prysm bootnode #1 +- enr:-Ku4QFmUkNp0g9bsLX2PfVeIyT-9WO-PZlrqZBNtEyofOOfLMScDjaTzGxIb1Ns9Wo5Pm_8nlq-SZwcQfTH2cgO-s88Bh2F0dG5ldHOIAAAAAAAAAACEZXRoMpDkvpOTAAAQIP__________gmlkgnY0gmlwhBLf22SJc2VjcDI1NmsxoQLV_jMOIxKbjHFKgrkFvwDvpexo6Nd58TK5k7ss4Vt0IoN1ZHCCG1g +# Lighthouse bootnode #1 +- enr:-LK4QLINdtobGquK7jukLDAKmsrH2ZuHM4k0TklY5jDTD4ZgfxR9weZmo5Jwu81hlKu3qPAvk24xHGBDjYs4o8f1gZ0Bh2F0dG5ldHOIAAAAAAAAAACEZXRoMpB53wQoAAAQIP__________gmlkgnY0gmlwhDRN_P6Jc2VjcDI1NmsxoQJuNujTgsJUHUgVZML3pzrtgNtYg7rQ4K1tkWERgl0DdoN0Y3CCIyiDdWRwgiMo diff --git a/common/lighthouse_version/src/lib.rs b/common/lighthouse_version/src/lib.rs index 8fdb109b23..76f9cb411b 100644 --- a/common/lighthouse_version/src/lib.rs +++ b/common/lighthouse_version/src/lib.rs @@ -16,7 +16,7 @@ pub const VERSION: &str = git_version!( // NOTE: using --match instead of --exclude for compatibility with old Git "--match=thiswillnevermatchlol" ], - prefix = "Lighthouse/v1.2.0-", + prefix = "Lighthouse/v1.2.1-", fallback = "unknown" ); diff --git a/lcli/Cargo.toml b/lcli/Cargo.toml index a8bb757676..45a3dd582a 100644 --- a/lcli/Cargo.toml +++ b/lcli/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "lcli" description = "Lighthouse CLI (modeled after zcli)" -version = "1.2.0" +version = "1.2.1" authors = ["Paul Hauner "] edition = "2018" diff --git a/lighthouse/Cargo.toml b/lighthouse/Cargo.toml index 00966c9ffc..a96112e392 100644 --- a/lighthouse/Cargo.toml +++ b/lighthouse/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lighthouse" -version = "1.2.0" +version = "1.2.1" authors = ["Sigma Prime "] edition = "2018" diff --git a/testing/simulator/src/no_eth1_sim.rs b/testing/simulator/src/no_eth1_sim.rs index 48b9c318bc..09ab132bc3 100644 --- a/testing/simulator/src/no_eth1_sim.rs +++ b/testing/simulator/src/no_eth1_sim.rs @@ -9,7 +9,7 @@ use rayon::prelude::*; use std::cmp::max; use std::net::{IpAddr, Ipv4Addr}; use std::time::{Duration, SystemTime, UNIX_EPOCH}; -use tokio::time::{sleep_until, Instant}; +use tokio::time::sleep; use types::{Epoch, EthSpec, MainnetEthSpec}; pub fn run_no_eth1_sim(matches: &ArgMatches) -> Result<(), String> { @@ -68,7 +68,6 @@ pub fn run_no_eth1_sim(matches: &ArgMatches) -> Result<(), String> { .duration_since(UNIX_EPOCH) .map_err(|_| "should get system time")? + genesis_delay; - let genesis_instant = Instant::now() + genesis_delay; let slot_duration = Duration::from_secs(spec.seconds_per_slot); @@ -86,7 +85,7 @@ pub fn run_no_eth1_sim(matches: &ArgMatches) -> Result<(), String> { beacon_config.network.enr_address = Some(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1))); let main_future = async { - let network = LocalNetwork::new(context, beacon_config.clone()).await?; + let network = LocalNetwork::new(context.clone(), beacon_config.clone()).await?; /* * One by one, add beacon nodes to the network. */ @@ -97,44 +96,39 @@ pub fn run_no_eth1_sim(matches: &ArgMatches) -> Result<(), String> { /* * Create a future that will add validator clients to the network. Each validator client is - * attached to a single corresponding beacon node. + * attached to a single corresponding beacon node. Spawn each validator in a new task. */ - let add_validators_fut = async { - for (i, files) in validator_files.into_iter().enumerate() { - network - .add_validator_client(testing_validator_config(), i, files, i % 2 == 0) - .await?; - } - - Ok::<(), String>(()) - }; - - /* - * The processes that will run checks on the network as it runs. - */ - let checks_fut = async { - sleep_until(genesis_instant).await; - - let (finalization, block_prod) = futures::join!( - // Check that the chain finalizes at the first given opportunity. - checks::verify_first_finalization(network.clone(), slot_duration), - // Check that a block is produced at every slot. - checks::verify_full_block_production_up_to( - network.clone(), - Epoch::new(4).start_slot(MainnetEthSpec::slots_per_epoch()), - slot_duration, - ) + let executor = context.executor.clone(); + for (i, files) in validator_files.into_iter().enumerate() { + let network_1 = network.clone(); + executor.spawn( + async move { + println!("Adding validator client {}", i); + network_1 + .add_validator_client(testing_validator_config(), i, files, i % 2 == 0) + .await + .expect("should add validator"); + }, + "vc", ); - finalization?; - block_prod?; + } - Ok::<(), String>(()) - }; + let duration_to_genesis = network.duration_to_genesis().await; + println!("Duration to genesis: {}", duration_to_genesis.as_secs()); + sleep(duration_to_genesis).await; - let (add_validators, start_checks) = futures::join!(add_validators_fut, checks_fut); - - add_validators?; - start_checks?; + let (finalization, block_prod) = futures::join!( + // Check that the chain finalizes at the first given opportunity. + checks::verify_first_finalization(network.clone(), slot_duration), + // Check that a block is produced at every slot. + checks::verify_full_block_production_up_to( + network.clone(), + Epoch::new(4).start_slot(MainnetEthSpec::slots_per_epoch()), + slot_duration, + ) + ); + finalization?; + block_prod?; // The `final_future` either completes immediately or never completes, depending on the value // of `continue_after_checks`.