Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rolls out chained Merkle shreds to ~5% of testnet #2389

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions turbine/src/broadcast_stage/standard_broadcast_run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

20 should be 5%, is 19 to ensure that it's not always the same leader slot index (1 to 4)?

Copy link
Author

@behzadnouri behzadnouri Aug 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I picked a prime number to avoid those kind of frequencies.

}
}

#[cfg(test)]
Expand Down