Skip to content

Commit

Permalink
Merge branch 'v1.17' into mergify/bp/v1.17/pr-33979
Browse files Browse the repository at this point in the history
  • Loading branch information
AshwinSekar authored Dec 1, 2023
2 parents 9ac39f6 + fca44b7 commit 11e6851
Show file tree
Hide file tree
Showing 44 changed files with 1,133 additions and 687 deletions.
217 changes: 109 additions & 108 deletions Cargo.lock

Large diffs are not rendered by default.

150 changes: 75 additions & 75 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ exclude = [
resolver = "2"

[workspace.package]
version = "1.17.6"
version = "1.17.7"
authors = ["Solana Labs Maintainers <maintainers@solanalabs.com>"]
repository = "https://github.com/solana-labs/solana"
homepage = "https://solanalabs.com/"
Expand Down Expand Up @@ -299,80 +299,80 @@ smpl_jwt = "0.7.1"
socket2 = "0.5.4"
soketto = "0.7"
solana_rbpf = "=0.8.0"
solana-account-decoder = { path = "account-decoder", version = "=1.17.6" }
solana-accounts-db = { path = "accounts-db", version = "=1.17.6" }
solana-address-lookup-table-program = { path = "programs/address-lookup-table", version = "=1.17.6" }
solana-banks-client = { path = "banks-client", version = "=1.17.6" }
solana-banks-interface = { path = "banks-interface", version = "=1.17.6" }
solana-banks-server = { path = "banks-server", version = "=1.17.6" }
solana-bench-tps = { path = "bench-tps", version = "=1.17.6" }
solana-bloom = { path = "bloom", version = "=1.17.6" }
solana-bpf-loader-program = { path = "programs/bpf_loader", version = "=1.17.6" }
solana-bucket-map = { path = "bucket_map", version = "=1.17.6" }
solana-connection-cache = { path = "connection-cache", version = "=1.17.6", default-features = false }
solana-clap-utils = { path = "clap-utils", version = "=1.17.6" }
solana-clap-v3-utils = { path = "clap-v3-utils", version = "=1.17.6" }
solana-cli = { path = "cli", version = "=1.17.6" }
solana-cli-config = { path = "cli-config", version = "=1.17.6" }
solana-cli-output = { path = "cli-output", version = "=1.17.6" }
solana-client = { path = "client", version = "=1.17.6" }
solana-compute-budget-program = { path = "programs/compute-budget", version = "=1.17.6" }
solana-config-program = { path = "programs/config", version = "=1.17.6" }
solana-core = { path = "core", version = "=1.17.6" }
solana-cost-model = { path = "cost-model", version = "=1.17.6" }
solana-download-utils = { path = "download-utils", version = "=1.17.6" }
solana-entry = { path = "entry", version = "=1.17.6" }
solana-faucet = { path = "faucet", version = "=1.17.6" }
solana-frozen-abi = { path = "frozen-abi", version = "=1.17.6" }
solana-frozen-abi-macro = { path = "frozen-abi/macro", version = "=1.17.6" }
solana-genesis = { path = "genesis", version = "=1.17.6" }
solana-genesis-utils = { path = "genesis-utils", version = "=1.17.6" }
solana-geyser-plugin-interface = { path = "geyser-plugin-interface", version = "=1.17.6" }
solana-geyser-plugin-manager = { path = "geyser-plugin-manager", version = "=1.17.6" }
solana-gossip = { path = "gossip", version = "=1.17.6" }
solana-loader-v4-program = { path = "programs/loader-v4", version = "=1.17.6" }
solana-ledger = { path = "ledger", version = "=1.17.6" }
solana-local-cluster = { path = "local-cluster", version = "=1.17.6" }
solana-logger = { path = "logger", version = "=1.17.6" }
solana-measure = { path = "measure", version = "=1.17.6" }
solana-merkle-tree = { path = "merkle-tree", version = "=1.17.6" }
solana-metrics = { path = "metrics", version = "=1.17.6" }
solana-net-utils = { path = "net-utils", version = "=1.17.6" }
solana-notifier = { path = "notifier", version = "=1.17.6" }
solana-perf = { path = "perf", version = "=1.17.6" }
solana-poh = { path = "poh", version = "=1.17.6" }
solana-program = { path = "sdk/program", version = "=1.17.6" }
solana-program-runtime = { path = "program-runtime", version = "=1.17.6" }
solana-program-test = { path = "program-test", version = "=1.17.6" }
solana-pubsub-client = { path = "pubsub-client", version = "=1.17.6" }
solana-quic-client = { path = "quic-client", version = "=1.17.6" }
solana-rayon-threadlimit = { path = "rayon-threadlimit", version = "=1.17.6" }
solana-remote-wallet = { path = "remote-wallet", version = "=1.17.6", default-features = false }
solana-rpc = { path = "rpc", version = "=1.17.6" }
solana-rpc-client = { path = "rpc-client", version = "=1.17.6", default-features = false }
solana-rpc-client-api = { path = "rpc-client-api", version = "=1.17.6" }
solana-rpc-client-nonce-utils = { path = "rpc-client-nonce-utils", version = "=1.17.6" }
solana-runtime = { path = "runtime", version = "=1.17.6" }
solana-sdk = { path = "sdk", version = "=1.17.6" }
solana-sdk-macro = { path = "sdk/macro", version = "=1.17.6" }
solana-send-transaction-service = { path = "send-transaction-service", version = "=1.17.6" }
solana-stake-program = { path = "programs/stake", version = "=1.17.6" }
solana-storage-bigtable = { path = "storage-bigtable", version = "=1.17.6" }
solana-storage-proto = { path = "storage-proto", version = "=1.17.6" }
solana-streamer = { path = "streamer", version = "=1.17.6" }
solana-system-program = { path = "programs/system", version = "=1.17.6" }
solana-test-validator = { path = "test-validator", version = "=1.17.6" }
solana-thin-client = { path = "thin-client", version = "=1.17.6" }
solana-tpu-client = { path = "tpu-client", version = "=1.17.6", default-features = false }
solana-transaction-status = { path = "transaction-status", version = "=1.17.6" }
solana-turbine = { path = "turbine", version = "=1.17.6" }
solana-udp-client = { path = "udp-client", version = "=1.17.6" }
solana-version = { path = "version", version = "=1.17.6" }
solana-vote = { path = "vote", version = "=1.17.6" }
solana-vote-program = { path = "programs/vote", version = "=1.17.6" }
solana-zk-keygen = { path = "zk-keygen", version = "=1.17.6" }
solana-zk-token-proof-program = { path = "programs/zk-token-proof", version = "=1.17.6" }
solana-zk-token-sdk = { path = "zk-token-sdk", version = "=1.17.6" }
solana-account-decoder = { path = "account-decoder", version = "=1.17.7" }
solana-accounts-db = { path = "accounts-db", version = "=1.17.7" }
solana-address-lookup-table-program = { path = "programs/address-lookup-table", version = "=1.17.7" }
solana-banks-client = { path = "banks-client", version = "=1.17.7" }
solana-banks-interface = { path = "banks-interface", version = "=1.17.7" }
solana-banks-server = { path = "banks-server", version = "=1.17.7" }
solana-bench-tps = { path = "bench-tps", version = "=1.17.7" }
solana-bloom = { path = "bloom", version = "=1.17.7" }
solana-bpf-loader-program = { path = "programs/bpf_loader", version = "=1.17.7" }
solana-bucket-map = { path = "bucket_map", version = "=1.17.7" }
solana-connection-cache = { path = "connection-cache", version = "=1.17.7", default-features = false }
solana-clap-utils = { path = "clap-utils", version = "=1.17.7" }
solana-clap-v3-utils = { path = "clap-v3-utils", version = "=1.17.7" }
solana-cli = { path = "cli", version = "=1.17.7" }
solana-cli-config = { path = "cli-config", version = "=1.17.7" }
solana-cli-output = { path = "cli-output", version = "=1.17.7" }
solana-client = { path = "client", version = "=1.17.7" }
solana-compute-budget-program = { path = "programs/compute-budget", version = "=1.17.7" }
solana-config-program = { path = "programs/config", version = "=1.17.7" }
solana-core = { path = "core", version = "=1.17.7" }
solana-cost-model = { path = "cost-model", version = "=1.17.7" }
solana-download-utils = { path = "download-utils", version = "=1.17.7" }
solana-entry = { path = "entry", version = "=1.17.7" }
solana-faucet = { path = "faucet", version = "=1.17.7" }
solana-frozen-abi = { path = "frozen-abi", version = "=1.17.7" }
solana-frozen-abi-macro = { path = "frozen-abi/macro", version = "=1.17.7" }
solana-genesis = { path = "genesis", version = "=1.17.7" }
solana-genesis-utils = { path = "genesis-utils", version = "=1.17.7" }
solana-geyser-plugin-interface = { path = "geyser-plugin-interface", version = "=1.17.7" }
solana-geyser-plugin-manager = { path = "geyser-plugin-manager", version = "=1.17.7" }
solana-gossip = { path = "gossip", version = "=1.17.7" }
solana-loader-v4-program = { path = "programs/loader-v4", version = "=1.17.7" }
solana-ledger = { path = "ledger", version = "=1.17.7" }
solana-local-cluster = { path = "local-cluster", version = "=1.17.7" }
solana-logger = { path = "logger", version = "=1.17.7" }
solana-measure = { path = "measure", version = "=1.17.7" }
solana-merkle-tree = { path = "merkle-tree", version = "=1.17.7" }
solana-metrics = { path = "metrics", version = "=1.17.7" }
solana-net-utils = { path = "net-utils", version = "=1.17.7" }
solana-notifier = { path = "notifier", version = "=1.17.7" }
solana-perf = { path = "perf", version = "=1.17.7" }
solana-poh = { path = "poh", version = "=1.17.7" }
solana-program = { path = "sdk/program", version = "=1.17.7" }
solana-program-runtime = { path = "program-runtime", version = "=1.17.7" }
solana-program-test = { path = "program-test", version = "=1.17.7" }
solana-pubsub-client = { path = "pubsub-client", version = "=1.17.7" }
solana-quic-client = { path = "quic-client", version = "=1.17.7" }
solana-rayon-threadlimit = { path = "rayon-threadlimit", version = "=1.17.7" }
solana-remote-wallet = { path = "remote-wallet", version = "=1.17.7", default-features = false }
solana-rpc = { path = "rpc", version = "=1.17.7" }
solana-rpc-client = { path = "rpc-client", version = "=1.17.7", default-features = false }
solana-rpc-client-api = { path = "rpc-client-api", version = "=1.17.7" }
solana-rpc-client-nonce-utils = { path = "rpc-client-nonce-utils", version = "=1.17.7" }
solana-runtime = { path = "runtime", version = "=1.17.7" }
solana-sdk = { path = "sdk", version = "=1.17.7" }
solana-sdk-macro = { path = "sdk/macro", version = "=1.17.7" }
solana-send-transaction-service = { path = "send-transaction-service", version = "=1.17.7" }
solana-stake-program = { path = "programs/stake", version = "=1.17.7" }
solana-storage-bigtable = { path = "storage-bigtable", version = "=1.17.7" }
solana-storage-proto = { path = "storage-proto", version = "=1.17.7" }
solana-streamer = { path = "streamer", version = "=1.17.7" }
solana-system-program = { path = "programs/system", version = "=1.17.7" }
solana-test-validator = { path = "test-validator", version = "=1.17.7" }
solana-thin-client = { path = "thin-client", version = "=1.17.7" }
solana-tpu-client = { path = "tpu-client", version = "=1.17.7", default-features = false }
solana-transaction-status = { path = "transaction-status", version = "=1.17.7" }
solana-turbine = { path = "turbine", version = "=1.17.7" }
solana-udp-client = { path = "udp-client", version = "=1.17.7" }
solana-version = { path = "version", version = "=1.17.7" }
solana-vote = { path = "vote", version = "=1.17.7" }
solana-vote-program = { path = "programs/vote", version = "=1.17.7" }
solana-zk-keygen = { path = "zk-keygen", version = "=1.17.7" }
solana-zk-token-proof-program = { path = "programs/zk-token-proof", version = "=1.17.7" }
solana-zk-token-sdk = { path = "zk-token-sdk", version = "=1.17.7" }
spl-associated-token-account = "=2.2.0"
spl-instruction-padding = "0.1"
spl-memo = "=4.0.0"
Expand Down
7 changes: 2 additions & 5 deletions accounts-db/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4395,11 +4395,12 @@ impl AccountsDb {

/// get a sorted list of slots older than an epoch
/// squash those slots into ancient append vecs
fn shrink_ancient_slots(&self, oldest_non_ancient_slot: Slot) {
pub fn shrink_ancient_slots(&self, epoch_schedule: &EpochSchedule) {
if self.ancient_append_vec_offset.is_none() {
return;
}

let oldest_non_ancient_slot = self.get_oldest_non_ancient_slot(epoch_schedule);
let can_randomly_shrink = true;
let sorted_slots = self.get_sorted_potential_ancient_slots(oldest_non_ancient_slot);
if self.create_ancient_storage == CreateAncientStorage::Append {
Expand Down Expand Up @@ -4744,10 +4745,6 @@ impl AccountsDb {

pub fn shrink_candidate_slots(&self, epoch_schedule: &EpochSchedule) -> usize {
let oldest_non_ancient_slot = self.get_oldest_non_ancient_slot(epoch_schedule);
if !self.shrink_candidate_slots.lock().unwrap().is_empty() {
// this can affect 'shrink_candidate_slots', so don't 'take' it until after this completes
self.shrink_ancient_slots(oldest_non_ancient_slot);
}

let shrink_candidates_slots =
std::mem::take(&mut *self.shrink_candidate_slots.lock().unwrap());
Expand Down
4 changes: 2 additions & 2 deletions accounts-db/src/verify_accounts_hash_in_background.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl VerifyAccountsHashInBackground {
}
let result = lock.take().unwrap().join().unwrap();
if !result {
panic!("initial hash verification failed: {result:?}");
panic!("initial background accounts hash verification failed: {result}");
}
// we never have to check again
self.verification_complete();
Expand Down Expand Up @@ -139,7 +139,7 @@ pub mod tests {
}

#[test]
#[should_panic(expected = "initial hash verification failed")]
#[should_panic(expected = "initial background accounts hash verification failed")]
fn test_panic() {
let verify = Arc::new(VerifyAccountsHashInBackground::default());
start_thread_and_return(&verify, false, || {});
Expand Down
26 changes: 19 additions & 7 deletions core/src/replay_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1360,14 +1360,22 @@ impl ReplayStage {
);
}


// Should not dump slots for which we were the leader
if Some(*my_pubkey) == leader_schedule_cache.slot_leader_at(*duplicate_slot, None) {
panic!("We are attempting to dump a block that we produced. \
This indicates that we are producing duplicate blocks, \
or that there is a bug in our runtime/replay code which \
causes us to compute different bank hashes than the rest of the cluster. \
We froze slot {duplicate_slot} with hash {frozen_hash:?} while the cluster hash is {correct_hash}");
if let Some(bank) = bank_forks.read().unwrap().get(*duplicate_slot) {
bank_hash_details::write_bank_hash_details_file(&bank)
.map_err(|err| {
warn!("Unable to write bank hash details file: {err}");
})
.ok();
} else {
warn!("Unable to get bank for slot {duplicate_slot} from bank forks");
}
panic!("We are attempting to dump a block that we produced. \
This indicates that we are producing duplicate blocks, \
or that there is a bug in our runtime/replay code which \
causes us to compute different bank hashes than the rest of the cluster. \
We froze slot {duplicate_slot} with hash {frozen_hash:?} while the cluster hash is {correct_hash}");
}

let attempt_no = purge_repair_slot_counter
Expand Down Expand Up @@ -1518,7 +1526,11 @@ impl ReplayStage {
let bank = w_bank_forks
.remove(*slot)
.expect("BankForks should not have been purged yet");
let _ = bank_hash_details::write_bank_hash_details_file(&bank);
bank_hash_details::write_bank_hash_details_file(&bank)
.map_err(|err| {
warn!("Unable to write bank hash details file: {err}");
})
.ok();
((*slot, bank.bank_id()), bank)
})
.unzip()
Expand Down
4 changes: 3 additions & 1 deletion cost-model/src/cost_tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ impl CostTracker {
if self.vote_cost.saturating_add(cost) > self.vote_cost_limit {
return Err(CostTrackerError::WouldExceedVoteMaxLimit);
}
} else if self.block_cost.saturating_add(cost) > self.block_cost_limit {
}

if self.block_cost.saturating_add(cost) > self.block_cost_limit {
// check against the total package cost
return Err(CostTrackerError::WouldExceedBlockMaxLimit);
}
Expand Down
2 changes: 1 addition & 1 deletion gossip/src/cluster_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2078,7 +2078,7 @@ impl ClusterInfo {
score
};
let score = match response.data {
CrdsData::LegacyContactInfo(_) => 2 * score,
CrdsData::LegacyContactInfo(_) | CrdsData::ContactInfo(_) => 2 * score,
_ => score,
};
((addr, response), score)
Expand Down
7 changes: 1 addition & 6 deletions gossip/src/crds_gossip_pull.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use {
crds::{Crds, GossipRoute, VersionedCrdsValue},
crds_gossip,
crds_gossip_error::CrdsGossipError,
crds_value::{CrdsData, CrdsValue},
crds_value::CrdsValue,
legacy_contact_info::LegacyContactInfo as ContactInfo,
ping_pong::PingCache,
},
Expand Down Expand Up @@ -488,11 +488,6 @@ impl CrdsGossipPull {
let out: Vec<_> = crds
.filter_bitmask(filter.mask, filter.mask_bits)
.filter(pred)
.filter(|entry| {
// Exclude the new ContactInfo from the pull responses
// until the cluster has upgraded.
!matches!(&entry.value.data, CrdsData::ContactInfo(_))
})
.map(|entry| entry.value.clone())
.take(output_size_limit.load(Ordering::Relaxed).max(0) as usize)
.collect();
Expand Down
7 changes: 1 addition & 6 deletions gossip/src/crds_gossip_push.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use {
cluster_info::{Ping, CRDS_UNIQUE_PUBKEY_CAPACITY},
crds::{Crds, CrdsError, Cursor, GossipRoute},
crds_gossip,
crds_value::{CrdsData, CrdsValue},
crds_value::CrdsValue,
ping_pong::PingCache,
push_active_set::PushActiveSet,
received_cache::ReceivedCache,
Expand Down Expand Up @@ -191,11 +191,6 @@ impl CrdsGossipPush {
let crds = crds.read().unwrap();
let entries = crds
.get_entries(crds_cursor.deref_mut())
.filter(|entry| {
// Exclude the new ContactInfo from outgoing push messages
// until the cluster has upgraded.
!matches!(&entry.value.data, CrdsData::ContactInfo(_))
})
.map(|entry| &entry.value)
.filter(|value| wallclock_window.contains(&value.wallclock()));
for value in entries {
Expand Down
12 changes: 9 additions & 3 deletions ledger-tool/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1132,15 +1132,17 @@ fn main() {
.validator(is_parsable::<usize>)
.takes_value(true)
.default_value("0")
.help("How many accounts to add to stress the system. Accounts are ignored in operations related to correctness.");
.help("How many accounts to add to stress the system. Accounts are ignored in operations related to correctness.")
.hidden(hidden_unless_forced());
let accounts_filler_size = Arg::with_name("accounts_filler_size")
.long("accounts-filler-size")
.value_name("BYTES")
.validator(is_parsable::<usize>)
.takes_value(true)
.default_value("0")
.requires("accounts_filler_count")
.help("Size per filler account in bytes.");
.help("Size per filler account in bytes.")
.hidden(hidden_unless_forced());
let account_paths_arg = Arg::with_name("account_paths")
.long("accounts")
.value_name("PATHS")
Expand Down Expand Up @@ -2691,7 +2693,11 @@ fn main() {
}
if write_bank_file {
let working_bank = bank_forks.read().unwrap().working_bank();
let _ = bank_hash_details::write_bank_hash_details_file(&working_bank);
bank_hash_details::write_bank_hash_details_file(&working_bank)
.map_err(|err| {
warn!("Unable to write bank hash_details file: {err}");
})
.ok();
}
exit_signal.store(true, Ordering::Relaxed);
system_monitor_service.join().unwrap();
Expand Down
Loading

0 comments on commit 11e6851

Please sign in to comment.