diff --git a/tools/congestion-model/src/main.rs b/tools/congestion-model/src/main.rs index eda41236e3e..9df750775e3 100644 --- a/tools/congestion-model/src/main.rs +++ b/tools/congestion-model/src/main.rs @@ -156,6 +156,7 @@ fn workload(workload_name: &str) -> Box { "One Hop All To One" => Box::new(AllForOneProducer::new(true, false, false)), "Two Hop All To One" => Box::new(AllForOneProducer::new(false, true, false)), "Three Hop All To One" => Box::new(AllForOneProducer::new(false, false, true)), + "Relayed Hot" => Box::new(AllForOneProducer::hot_tg()), "Linear Imbalance" => Box::::default(), "Big Linear Imbalance" => Box::new(LinearImbalanceProducer::big_receipts()), _ => panic!("unknown workload: {}", workload_name), @@ -194,6 +195,7 @@ fn parse_workload_names(workload_name: &str) -> Vec { "One Hop All To One".to_string(), "Two Hop All To One".to_string(), "Three Hop All To One".to_string(), + "Relayed Hot".to_string(), "Linear Imbalance".to_string(), "Big Linear Imbalance".to_string(), ]; diff --git a/tools/congestion-model/src/workload/all_for_one.rs b/tools/congestion-model/src/workload/all_for_one.rs index 0be5950ae3b..1e7b07faa7e 100644 --- a/tools/congestion-model/src/workload/all_for_one.rs +++ b/tools/congestion-model/src/workload/all_for_one.rs @@ -143,6 +143,29 @@ impl AllForOneProducer { pub fn new(enable_one_hop: bool, enable_two_hops: bool, enable_three_hops: bool) -> Self { Self { enable_one_hop, enable_two_hops, enable_three_hops, ..Default::default() } } + + /// Approximates the workload of game.hot.tg + pub fn hot_tg() -> Self { + Self { + // Usually, workloads are function calls through a relayer. + // Therefore, use 2-hop requests only. + enable_one_hop: false, + enable_two_hops: true, + enable_three_hops: false, + // The receipts are small, exact values should not matter. + receipt_size: 1024, + // Gas numbers based on reduced fn base gas costs and what traffic + // I could find on chain. + attached_gas: 30 * TGAS, + light_execution_gas: TGAS / 2, + last_execution_gas: 3 * TGAS, + conversion_gas: TGAS / 2, + // just send plenty + messages_per_round: 3000, + // empty iterator overwritten in init + round_robin_shards: Box::new(std::iter::empty()), + } + } } impl Default for AllForOneProducer {