Merge branch 'unstable' into vc-fallback

This commit is contained in:
Mac L
2024-04-26 12:46:25 +10:00
261 changed files with 10567 additions and 6425 deletions

View File

@@ -1,10 +1,8 @@
//! This crate provides a simluation that creates `n` beacon node and validator clients, each with
//! `v` validators. A deposit contract is deployed at the start of the simulation using a local
//! `anvil` instance (you must have `anvil` installed and avaliable on your path). All
//! beacon nodes independently listen for genesis from the deposit contract, then start operating.
//! This crate provides various simulations that create both beacon nodes and validator clients,
//! each with `v` validators.
//!
//! As the simulation runs, there are checks made to ensure that all components are running
//! correctly. If any of these checks fail, the simulation will exit immediately.
//! When a simulation runs, there are checks made to ensure that all components are operating
//! as expected. If any of these checks fail, the simulation will exit immediately.
//!
//! ## Future works
//!
@@ -16,15 +14,12 @@
#[macro_use]
extern crate clap;
mod basic_sim;
mod checks;
mod cli;
mod common;
mod eth1_sim;
mod fallback_sim;
mod local_network;
mod no_eth1_sim;
mod retry;
mod sync_sim;
use cli::cli_app;
use env_logger::{Builder, Env};
@@ -47,21 +42,14 @@ fn main() {
let matches = cli_app().get_matches();
match matches.subcommand() {
("eth1-sim", Some(matches)) => match eth1_sim::run_eth1_sim(matches) {
("basic-sim", Some(matches)) => match basic_sim::run_basic_sim(matches) {
Ok(()) => println!("Simulation exited successfully"),
Err(e) => {
eprintln!("Simulation exited with error: {}", e);
std::process::exit(1)
}
},
("no-eth1-sim", Some(matches)) => match no_eth1_sim::run_no_eth1_sim(matches) {
Ok(()) => println!("Simulation exited successfully"),
Err(e) => {
eprintln!("Simulation exited with error: {}", e);
std::process::exit(1)
}
},
("syncing-sim", Some(matches)) => match sync_sim::run_syncing_sim(matches) {
("fallback-sim", Some(matches)) => match fallback_sim::run_fallback_sim(matches) {
Ok(()) => println!("Simulation exited successfully"),
Err(e) => {
eprintln!("Simulation exited with error: {}", e);