Pipe settings and create mixnode setttings

This commit is contained in:
Daniel Sanchez Quiros 2024-11-08 12:47:34 +07:00
parent 04b1250e75
commit a7dc4aa410
4 changed files with 23 additions and 74 deletions

View File

@ -29,11 +29,23 @@
"seed": 0,
"record_settings": {},
"wards": [
{
"max": 10
},
{
"sum": 10
}
]
{
"max": 10
},
{
"sum": 10
}
],
"connected_peers_count": 3,
"data_message_lottery_interval": "20s",
"stake_proportion": "1.0",
"epoch_duration": "432000s",
"slot_duration": "20s",
"persistent_transmission": {
"max_emission_frequency": "1.0",
"drop_message_probability": "0.0"
},
"number_of_mix_layers": 4,
"max_delay_seconds": 10,
"slots_per_epoch": 21600
}

View File

@ -24,7 +24,7 @@ use parking_lot::Mutex;
use rand::prelude::IteratorRandom;
use rand::rngs::SmallRng;
use rand::seq::SliceRandom;
use rand::SeedableRng;
use rand::{RngCore, SeedableRng};
use serde::de::DeserializeOwned;
use serde::Serialize;
// internal
@ -108,7 +108,7 @@ impl SimulationApp {
.choose_multiple(&mut rng, settings.connected_peers_count),
data_message_lottery_interval: settings.data_message_lottery_interval,
stake_proportion: settings.stake_proportion / node_ids.len() as f64,
seed: settings.seed,
seed: rng.next_u64(),
epoch_duration: settings.epoch_duration, // 5 days seconds
slot_duration: settings.slot_duration,
persistent_transmission: settings.persistent_transmission,
@ -118,7 +118,7 @@ impl SimulationApp {
num_mix_layers: settings.number_of_mix_layers,
},
temporal_processor: TemporalSchedulerSettings {
max_delay_seconds: settings.max_delay_secconds,
max_delay_seconds: settings.max_delay_seconds,
},
},
cover_traffic_settings: CoverTrafficSettings {

View File

@ -10,11 +10,10 @@ pub struct SimSettings {
pub connected_peers_count: usize,
pub data_message_lottery_interval: Duration,
pub stake_proportion: f64,
pub seed: u64,
pub epoch_duration: Duration,
pub slot_duration: Duration,
pub persistent_transmission: PersistentTransmissionSettings,
pub number_of_mix_layers: usize,
pub max_delay_secconds: u64,
pub max_delay_seconds: u64,
pub slots_per_epoch: usize,
}

View File

@ -1,62 +0,0 @@
{
"network_settings": {
"network_behaviors": {
"north america:north america": "10ms",
"north america:europe": "150ms",
"north america:asia": "250ms",
"europe:europe": "10ms",
"europe:asia": "200ms",
"europe:north america": "150ms",
"asia:north america": "250ms",
"asia:europe": "200ms",
"asia:asia": "10ms"
},
"regions": {
"north america": 0.4,
"europe": 0.3,
"asia": 0.3
}
},
"overlay_settings": {
"number_of_committees": 7
},
"node_settings": {
"network_capacity_kbps": 10000024,
"timeout": "10000ms"
},
"step_time": "100ms",
"runner_settings": "Sync",
"stream_settings": {
"path": "tree_500_7_view_1_default.csv",
"format": "csv"
},
"node_count": 500,
"views_count": 10,
"leaders_count": 1,
"seed": 0,
"wards": [
{
"max_view": 1
},
{
"stalled_view": {
"consecutive_viewed_checkpoint": null,
"criterion": 0,
"threshold": 100
}
}
],
"record_settings": {
"current_view": true,
"highest_voted_view": true,
"local_high_qc": true,
"safe_blocks": false,
"last_view_timeout_qc": true,
"latest_committed_block": true,
"latest_committed_view": true,
"root_committee": false,
"parent_committee": false,
"child_committees": false,
"committed_blocks": false
}
}