From 962085c0e49a71f2ab259353639b723e41d57f0f Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 2 Aug 2024 17:43:33 +0000 Subject: [PATCH] v2.0: rolls out chained Merkle shreds to ~5% of testnet (backport of #2389) (#2407) rolls out chained Merkle shreds to ~5% of testnet (#2389) (cherry picked from commit a60fbc2288d626a4f1846052c8fcb98d3f9ea58d) Co-authored-by: behzad nouri --- 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)]