31 lines
1.0 KiB
Rust
31 lines
1.0 KiB
Rust
use crate::simulation::censor;
|
|
|
|
use lox_cli::networking::*;
|
|
use lox_library::IssuerPubKey;
|
|
|
|
pub struct Config {
|
|
pub la_pubkeys: Vec<IssuerPubKey>,
|
|
pub la_net: HyperNet,
|
|
pub tp_net: HyperNet,
|
|
// Define censor behavior
|
|
pub censor_secrecy: censor::Secrecy,
|
|
pub censor_speed: censor::Speed,
|
|
pub censor_event_duration: u32,
|
|
pub censor_totality: censor::Totality,
|
|
pub censor_partial_blocking_percent: f64,
|
|
// We model only one country at a time because Lox assumes censors
|
|
// share information with each other.
|
|
pub country: String,
|
|
pub one_positive_report_per_cred: bool,
|
|
// Probability that a censor-cooperating user can convince an honest
|
|
// user to give them an invite.
|
|
pub prob_censor_gets_invite: f64,
|
|
// Probability that a connection randomly fails, even though censor
|
|
// does not block the bridge
|
|
pub prob_connection_fails: f64,
|
|
pub prob_user_invites_friend: f64,
|
|
pub prob_user_is_censor: f64,
|
|
pub prob_user_submits_reports: f64,
|
|
pub prob_user_treats_throttling_as_blocking: f64,
|
|
}
|