From e720178a8ad5aa146550fcbd212c910d3fffdfaf Mon Sep 17 00:00:00 2001 From: behzad nouri Date: Fri, 2 Aug 2024 14:35:17 +0000 Subject: [PATCH] rolls out chained Merkle shreds to ~5% of testnet (#2389) (cherry picked from commit a60fbc2288d626a4f1846052c8fcb98d3f9ea58d) --- turbine/src/broadcast_stage/standard_broadcast_run.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/turbine/src/broadcast_stage/standard_broadcast_run.rs b/turbine/src/broadcast_stage/standard_broadcast_run.rs index f108fc08226a6b..0ddbe1020f5f98 100644 --- a/turbine/src/broadcast_stage/standard_broadcast_run.rs +++ b/turbine/src/broadcast_stage/standard_broadcast_run.rs @@ -506,8 +506,14 @@ impl BroadcastRun for StandardBroadcastRun { } } -fn should_chain_merkle_shreds(_slot: Slot, cluster_type: ClusterType) -> bool { - cluster_type == ClusterType::Development +fn should_chain_merkle_shreds(slot: Slot, cluster_type: ClusterType) -> bool { + match cluster_type { + ClusterType::Development => true, + ClusterType::Devnet => false, + ClusterType::MainnetBeta => false, + // Roll out chained Merkle shreds to ~5% of testnet. + ClusterType::Testnet => slot % 19 == 1, + } } #[cfg(test)]