Skip to content

Commit 245ac25

Browse files
committed
sim-rs: tweak config to fix throughput
1 parent f522707 commit 245ac25

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

sim-rs/sim-cli/src/events.rs

+8
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,10 @@ impl EventMonitor {
341341
.values()
342342
.filter(|tx| tx.included_in_ib.is_some())
343343
.collect();
344+
let txs_which_reached_eb: BTreeSet<_> = eb_ibs.values()
345+
.flatten()
346+
.flat_map(|ib_id| ib_txs.get(ib_id).cloned().unwrap_or_default())
347+
.collect();
344348
let empty_ebs = generated_ebs - ibs_in_eb.len() as u64;
345349
let ibs_which_reached_eb = ebs_containing_ib.len();
346350
let bundle_count = votes_per_bundle.len();
@@ -418,6 +422,10 @@ impl EventMonitor {
418422
"{} out of {} IBs expired before they reached an EB.",
419423
expired_ibs, generated_ibs,
420424
);
425+
info!(
426+
"{} out of {} transaction(s) were included in at least one EB.",
427+
txs_which_reached_eb.len(), txs.len(),
428+
);
421429
info!("{} total votes were generated.", total_votes);
422430
info!("Each stake pool produced an average of {:.3} vote(s) (stddev {:.3}).",
423431
votes_per_pool.mean, votes_per_pool.std_dev);

sim-rs/sim-core/src/clock.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ impl ClockBarrier {
123123
};
124124
if rx.await.is_ok() {
125125
assert_eq!(self.now(), timestamp);
126-
std::mem::forget(guard);
126+
std::mem::forget(guard);
127127
}
128128
}
129129
}

sim-rs/test_data/thousand.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ vote_probability = 500.0
55
vote_threshold = 150
66
max_block_size = 90112
77
max_tx_size = 16384
8-
stage_length = 2
8+
stage_length = 20
99
deliver_stage_count = 2
1010
uniform_ib_generation = true
1111
max_ib_size = 327680
1212
max_ib_requests_per_peer = 1
1313
ib_shards = 8
14-
one_vote_per_vrf = true
14+
one_vote_per_vrf = false
1515

1616
[[nodes]]
1717
location = [
@@ -33754,7 +33754,7 @@ nodes = [
3375433754
[transaction_frequency_ms]
3375533755
distribution = "exp"
3375633756
lambda = 0.85
33757-
scale = 1000.0
33757+
scale = 40.0
3375833758

3375933759
[transaction_size_bytes]
3376033760
distribution = "log_normal"

0 commit comments

Comments
 (0)