2024-05-28 15:23:25 -04:00
|
|
|
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_hides: censor::Hides,
|
|
|
|
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,
|
2024-05-28 16:20:28 -04:00
|
|
|
pub one_positive_report_per_cred: bool,
|
2024-05-28 15:23:25 -04:00
|
|
|
// 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,
|
2024-06-04 09:45:44 -04:00
|
|
|
pub prob_user_treats_throttling_as_blocking: f64,
|
2024-05-28 15:23:25 -04:00
|
|
|
}
|