From 43a5ed3139e6d3611bbd2e34127b212536a4a55b Mon Sep 17 00:00:00 2001 From: behzad nouri Date: Fri, 30 Jun 2023 15:17:56 +0000 Subject: [PATCH] rolls out merkle shreds to ~5% of mainnet slots (#32337) --- turbine/src/broadcast_stage/standard_broadcast_run.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/turbine/src/broadcast_stage/standard_broadcast_run.rs b/turbine/src/broadcast_stage/standard_broadcast_run.rs index e8e43c938..3e51609e4 100644 --- a/turbine/src/broadcast_stage/standard_broadcast_run.rs +++ b/turbine/src/broadcast_stage/standard_broadcast_run.rs @@ -501,8 +501,11 @@ impl BroadcastRun for StandardBroadcastRun { } } -fn should_use_merkle_variant(_: Slot, cluster_type: ClusterType, shred_version: u16) -> bool { - cluster_type == ClusterType::Testnet && shred_version == 28353 +fn should_use_merkle_variant(slot: Slot, cluster_type: ClusterType, shred_version: u16) -> bool { + match cluster_type { + ClusterType::Testnet => shred_version == 28353, + _ => (slot % 19) == 1, + } } #[cfg(test)]