diff --git a/Cargo.toml b/Cargo.toml index f1b7cb4..b1b09ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,5 +39,5 @@ name = "server" path = "src/bin/server.rs" [[bin]] -name = "leader" -path = "src/bin/leader.rs" +name = "driver" +path = "src/bin/driver.rs" diff --git a/README.md b/README.md index 47b1439..0600771 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ Page](https://datatracker.ietf.org/doc/draft-mouris-cfrg-mastic/). ## Building + +Please note that this repository relies on `x86_64` specific instructions in [prg.rs](src/prg.rs). First, make sure that you have a working Rust installation: ```bash ❯❯ rustc --version @@ -39,14 +41,14 @@ Now, the servers should be ready to process client requests. #### Clients: In another shell, run the following command to send 100 client requests to the servers. ```bash -cargo run --release --bin leader -- --config src/bin/config.json -n 100 +cargo run --release --bin driver -- --config src/bin/config.json -n 100 ``` To run with the presence of malicious clients include the `--malicious` flag followed by the percentage of malicious clients to generate ([0.0, 0.9]). For instance, to run with 5% malicious clients use: ```bash -cargo run --release --bin leader -- --config src/bin/config.json -n 100 --malicious 0.05 +cargo run --release --bin driver -- --config src/bin/config.json -n 100 --malicious 0.05 ``` diff --git a/src/bin/leader.rs b/src/bin/driver.rs similarity index 99% rename from src/bin/leader.rs rename to src/bin/driver.rs index e2569b1..0fb4524 100644 --- a/src/bin/leader.rs +++ b/src/bin/driver.rs @@ -406,7 +406,7 @@ async fn run_level_last( #[tokio::main] async fn main() -> io::Result<()> { - let (cfg, _, num_clients, malicious) = config::get_args("Leader", false, true, true); + let (cfg, _, num_clients, malicious) = config::get_args("Driver", false, true, true); assert!((0.0..0.8).contains(&malicious)); println!("Running with {}% malicious clients", malicious * 100.0); let client_0 = Client::new( diff --git a/src/config.rs b/src/config.rs index b886682..41f3fc4 100644 --- a/src/config.rs +++ b/src/config.rs @@ -60,15 +60,18 @@ pub fn get_args( get_n_reqs: bool, get_malicious: bool, ) -> (Config, i8, usize, f32) { - let mut flags = App::new(name).version("0.1").about("Mastic.").arg( - Arg::with_name("config") - .short("c") - .long("config") - .value_name("FILENAME") - .help("Location of JSON config file") - .required(true) - .takes_value(true), - ); + let mut flags = App::new(name) + .version("0.1") + .about("Mastic: Private Aggregated Statistics through Fully Linear Proofs") + .arg( + Arg::with_name("config") + .short("c") + .long("config") + .value_name("FILENAME") + .help("Location of JSON config file") + .required(true) + .takes_value(true), + ); if get_server_id { flags = flags.arg( Arg::with_name("server_id")