From 1e9137896b873522ff80c12454ac7ecdecd002e1 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 00:18:53 +0000 Subject: [PATCH] v2.1: rolls out chained Merkle shreds to ~5% of mainnet slots (backport of #4019) (#4131) * rolls out chained Merkle shreds to ~5% of mainnet slots (#4019) (cherry picked from commit d3fe8f8a01725e02c9ca594ffe8b1461f10b0e9a) # Conflicts: # turbine/src/broadcast_stage/standard_broadcast_run.rs * resolves merge conflicts --------- Co-authored-by: behzad nouri --- turbine/src/broadcast_stage/standard_broadcast_run.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/turbine/src/broadcast_stage/standard_broadcast_run.rs b/turbine/src/broadcast_stage/standard_broadcast_run.rs index 6723ed6f32aafe..3ba2f1a96cfb1a 100644 --- a/turbine/src/broadcast_stage/standard_broadcast_run.rs +++ b/turbine/src/broadcast_stage/standard_broadcast_run.rs @@ -503,12 +503,13 @@ impl BroadcastRun for StandardBroadcastRun { } } -fn should_chain_merkle_shreds(_slot: Slot, cluster_type: ClusterType) -> bool { +fn should_chain_merkle_shreds(slot: Slot, cluster_type: ClusterType) -> bool { match cluster_type { ClusterType::Development => true, ClusterType::Devnet => true, - ClusterType::MainnetBeta => false, - ClusterType::Testnet => false, + // Roll out chained Merkle shreds to ~5% of mainnet slots. + ClusterType::MainnetBeta => slot % 19 == 1, + ClusterType::Testnet => true, } }