removes deterministic-shred-seed feature
This commit is contained in:
parent
e051c7c162
commit
855801cc95
|
@ -125,7 +125,7 @@ impl ClusterNodes<BroadcastStage> {
|
|||
socket_addr_space: &SocketAddrSpace,
|
||||
) -> Vec<SocketAddr> {
|
||||
const MAX_CONTACT_INFO_AGE: Duration = Duration::from_secs(2 * 60);
|
||||
let shred_seed = shred.seed(self.pubkey, root_bank);
|
||||
let shred_seed = shred.seed(self.pubkey);
|
||||
if !enable_turbine_peers_shuffle_patch(shred.slot(), root_bank) {
|
||||
if let Some(node) = self.get_broadcast_peer(shred_seed) {
|
||||
if socket_addr_space.check(&node.tvu) {
|
||||
|
@ -233,7 +233,7 @@ impl ClusterNodes<RetransmitStage> {
|
|||
Vec<&Node>, // neighbors
|
||||
Vec<&Node>, // children
|
||||
) {
|
||||
let shred_seed = shred.seed(slot_leader, root_bank);
|
||||
let shred_seed = shred.seed(slot_leader);
|
||||
if !enable_turbine_peers_shuffle_patch(shred.slot(), root_bank) {
|
||||
return self.get_retransmit_peers_compat(shred_seed, fanout, slot_leader);
|
||||
}
|
||||
|
|
|
@ -60,16 +60,14 @@ use {
|
|||
solana_measure::measure::Measure,
|
||||
solana_perf::packet::{limited_deserialize, Packet},
|
||||
solana_rayon_threadlimit::get_thread_count,
|
||||
solana_runtime::bank::Bank,
|
||||
solana_sdk::{
|
||||
clock::Slot,
|
||||
feature_set,
|
||||
hash::{hashv, Hash},
|
||||
packet::PACKET_DATA_SIZE,
|
||||
pubkey::Pubkey,
|
||||
signature::{Keypair, Signature, Signer},
|
||||
},
|
||||
std::{cell::RefCell, convert::TryInto, mem::size_of},
|
||||
std::{cell::RefCell, mem::size_of},
|
||||
thiserror::Error,
|
||||
};
|
||||
|
||||
|
@ -609,19 +607,13 @@ impl Shred {
|
|||
self.common_header.signature
|
||||
}
|
||||
|
||||
pub fn seed(&self, leader_pubkey: Pubkey, root_bank: &Bank) -> [u8; 32] {
|
||||
if enable_deterministic_seed(self.slot(), root_bank) {
|
||||
pub fn seed(&self, leader_pubkey: Pubkey) -> [u8; 32] {
|
||||
hashv(&[
|
||||
&self.slot().to_le_bytes(),
|
||||
&self.index().to_le_bytes(),
|
||||
&leader_pubkey.to_bytes(),
|
||||
])
|
||||
.to_bytes()
|
||||
} else {
|
||||
let signature = self.common_header.signature.as_ref();
|
||||
let offset = signature.len().checked_sub(32).unwrap();
|
||||
signature[offset..].try_into().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
@ -711,21 +703,6 @@ impl Shred {
|
|||
}
|
||||
}
|
||||
|
||||
fn enable_deterministic_seed(shred_slot: Slot, bank: &Bank) -> bool {
|
||||
let feature_slot = bank
|
||||
.feature_set
|
||||
.activated_slot(&feature_set::deterministic_shred_seed_enabled::id());
|
||||
match feature_slot {
|
||||
None => false,
|
||||
Some(feature_slot) => {
|
||||
let epoch_schedule = bank.epoch_schedule();
|
||||
let feature_epoch = epoch_schedule.get_epoch(feature_slot);
|
||||
let shred_epoch = epoch_schedule.get_epoch(shred_slot);
|
||||
feature_epoch < shred_epoch
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Shredder {
|
||||
pub slot: Slot,
|
||||
|
|
|
@ -101,10 +101,6 @@ pub mod dedupe_config_program_signers {
|
|||
solana_sdk::declare_id!("8kEuAshXLsgkUEdcFVLqrjCGGHVWFW99ZZpxvAzzMtBp");
|
||||
}
|
||||
|
||||
pub mod deterministic_shred_seed_enabled {
|
||||
solana_sdk::declare_id!("FjSRMpFe7mofQ3WrEMT7Smjk2sME1XdAoRxcv55V6M44");
|
||||
}
|
||||
|
||||
pub mod verify_tx_signatures_len {
|
||||
solana_sdk::declare_id!("EVW9B5xD9FFK7vw1SBARwMA4s5eRo5eKJdKpsBikzKBz");
|
||||
}
|
||||
|
@ -363,7 +359,6 @@ lazy_static! {
|
|||
(system_transfer_zero_check::id(), "perform all checks for transfers of 0 lamports"),
|
||||
(blake3_syscall_enabled::id(), "blake3 syscall"),
|
||||
(dedupe_config_program_signers::id(), "dedupe config program signers"),
|
||||
(deterministic_shred_seed_enabled::id(), "deterministic shred seed"),
|
||||
(verify_tx_signatures_len::id(), "prohibit extra transaction signatures"),
|
||||
(vote_stake_checked_instructions::id(), "vote/state program checked instructions #18345"),
|
||||
(neon_evm_compute_budget::id(), "bump neon_evm's compute budget"),
|
||||
|
|
Loading…
Reference in New Issue