bump rust stable to 1.72.1 (#33333)

* bump rust stable to 1.72.1

* bump rust nightly to 2023-09-20

* fix nightly lint -- unused doc comment

-- rustdoc does not generate documentation for expression fields

* fix nightly lint -- unnecessarily eager cloning of iterator items

* fix nightly lint -- loop never actually loops
This commit is contained in:
Trent Nelson 2023-09-20 23:53:36 -06:00 committed by GitHub
parent 62f153ec88
commit 7c545b0ae9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 39 additions and 56 deletions

View File

@ -10146,15 +10146,15 @@ pub mod tests {
let offset = 3;
let hash = Hash::new(&[2; 32]);
let stored_meta = StoredMeta {
/// global write version
// global write version
write_version_obsolete: 0,
/// key for the account
// key for the account
pubkey,
data_len: 43,
};
let account = StoredAccountMeta::AppendVec(AppendVecStoredAccountMeta {
meta: &stored_meta,
/// account data
// account data
account_meta: &account_meta,
data: account.data(),
offset,

View File

@ -1822,15 +1822,15 @@ pub mod tests {
let offset = 3;
let hash = Hash::new(&[2; 32]);
let stored_meta = StoredMeta {
/// global write version
// global write version
write_version_obsolete: 0,
/// key for the account
// key for the account
pubkey,
data_len: 43,
};
let account = StoredAccountMeta::AppendVec(AppendVecStoredAccountMeta {
meta: &stored_meta,
/// account data
// account data
account_meta: &account_meta,
data: account.data(),
offset,

View File

@ -27,13 +27,13 @@ pub struct PartitionedEpochRewardsConfig {
impl Default for PartitionedEpochRewardsConfig {
fn default() -> Self {
Self {
/// reward calculation happens synchronously during the first block of the epoch boundary.
/// So, # blocks for reward calculation is 1.
// reward calculation happens synchronously during the first block of the epoch boundary.
// So, # blocks for reward calculation is 1.
reward_calculation_num_blocks: 1,
/// # stake accounts to store in one block during partitioned reward interval
/// Target to store 64 rewards per entry/tick in a block. A block has a minimum of 64
/// entries/tick. This gives 4096 total rewards to store in one block.
/// This constant affects consensus.
// # stake accounts to store in one block during partitioned reward interval
// Target to store 64 rewards per entry/tick in a block. A block has a minimum of 64
// entries/tick. This gives 4096 total rewards to store in one block.
// This constant affects consensus.
stake_account_stores_per_block: 4096,
test_enable_partitioned_rewards: false,
test_compare_partitioned_epoch_rewards: false,

View File

@ -1,4 +1,4 @@
FROM solanalabs/rust:1.72.0
FROM solanalabs/rust:1.72.1
ARG date
RUN set -x \

View File

@ -1,6 +1,6 @@
# Note: when the rust version is changed also modify
# ci/rust-version.sh to pick up the new image tag
FROM rust:1.72.0
FROM rust:1.72.1
ARG NODE_MAJOR=18

View File

@ -29,7 +29,7 @@ fi
if [[ -n $RUST_NIGHTLY_VERSION ]]; then
nightly_version="$RUST_NIGHTLY_VERSION"
else
nightly_version=2023-08-25
nightly_version=2023-09-20
fi

View File

@ -7134,8 +7134,8 @@ pub mod tests {
let expected_transactions: Vec<VersionedTransactionWithStatusMeta> = entries
.iter()
.cloned()
.filter(|entry| !entry.is_tick())
.cloned()
.flat_map(|entry| entry.transactions)
.map(|transaction| {
let mut pre_balances: Vec<u64> = vec![];
@ -8018,8 +8018,8 @@ pub mod tests {
let expected_transactions: Vec<VersionedTransactionWithStatusMeta> = entries
.iter()
.cloned()
.filter(|entry| !entry.is_tick())
.cloned()
.flat_map(|entry| entry.transactions)
.map(|transaction| {
let mut pre_balances: Vec<u64> = vec![];
@ -8138,8 +8138,8 @@ pub mod tests {
let expected_transactions: Vec<VersionedTransactionWithStatusMeta> = entries
.iter()
.cloned()
.filter(|entry| !entry.is_tick())
.cloned()
.flat_map(|entry| entry.transactions)
.map(|transaction| {
let mut pre_balances: Vec<u64> = vec![];

View File

@ -716,8 +716,8 @@ pub mod tests {
blockstore.insert_shreds(shreds, None, false).unwrap();
let signature = entries
.iter()
.cloned()
.filter(|entry| !entry.is_tick())
.cloned()
.flat_map(|entry| entry.transactions)
.map(|transaction| transaction.signatures[0])
.collect::<Vec<Signature>>()[0];
@ -759,8 +759,8 @@ pub mod tests {
blockstore.insert_shreds(shreds, None, false).unwrap();
let signature: Signature = entries
.iter()
.cloned()
.filter(|entry| !entry.is_tick())
.cloned()
.flat_map(|entry| entry.transactions)
.map(|transaction| transaction.signatures[0])
.collect::<Vec<Signature>>()[0];

View File

@ -4169,8 +4169,8 @@ fn find_latest_replayed_slot_from_ledger(
.filter_map(|(s, _)| if s > latest_slot { Some(s) } else { None })
.collect();
for new_latest_slot in new_latest_slots {
latest_slot = new_latest_slot;
if let Some(new_latest_slot) = new_latest_slots.first() {
latest_slot = *new_latest_slot;
info!("Checking latest_slot {}", latest_slot);
// Wait for the slot to be fully received by the validator
loop {
@ -5293,30 +5293,23 @@ fn test_duplicate_shreds_switch_failure() {
// 2) Wait for a duplicate slot to land on both validators and for the target switch
// fork validator to get another version of the slot. Also ensure all versions of
// the block are playable
let dup_slot;
loop {
dup_slot = duplicate_slot_receiver
.recv_timeout(Duration::from_millis(30_000))
.expect("Duplicate leader failed to make a duplicate slot in allotted time");
let dup_slot = duplicate_slot_receiver
.recv_timeout(Duration::from_millis(30_000))
.expect("Duplicate leader failed to make a duplicate slot in allotted time");
// Make sure both validators received and replay the complete blocks
let dup_frozen_hash = wait_for_duplicate_fork_frozen(
&cluster.ledger_path(&duplicate_fork_validator1_pubkey),
dup_slot,
);
let original_frozen_hash = wait_for_duplicate_fork_frozen(
&cluster.ledger_path(&duplicate_leader_validator_pubkey),
dup_slot,
);
if original_frozen_hash != dup_frozen_hash {
break;
} else {
panic!(
"Duplicate leader and partition target got same hash: {}",
original_frozen_hash
);
}
}
// Make sure both validators received and replay the complete blocks
let dup_frozen_hash = wait_for_duplicate_fork_frozen(
&cluster.ledger_path(&duplicate_fork_validator1_pubkey),
dup_slot,
);
let original_frozen_hash = wait_for_duplicate_fork_frozen(
&cluster.ledger_path(&duplicate_leader_validator_pubkey),
dup_slot,
);
assert_ne!(
original_frozen_hash, dup_frozen_hash,
"Duplicate leader and partition target got same hash: {original_frozen_hash}",
);
// 3) Force `duplicate_fork_validator1_pubkey` to see a duplicate proof
info!("Waiting for duplicate proof for slot: {}", dup_slot);

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "1.72.0"
channel = "1.72.1"

View File

@ -21,30 +21,20 @@ impl VoteStateVersions {
VoteState {
node_pubkey: state.node_pubkey,
/// the signer for withdrawals
authorized_withdrawer: state.authorized_withdrawer,
/// percentage (0-100) that represents what part of a rewards
/// payout should be given to this VoteAccount
commission: state.commission,
votes: Self::landed_votes_from_lockouts(state.votes),
root_slot: state.root_slot,
/// the signer for vote transactions
authorized_voters,
/// history of prior authorized voters and the epochs for which
/// they were set, the bottom end of the range is inclusive,
/// the top of the range is exclusive
prior_voters: CircBuf::default(),
/// history of how many credits earned by the end of each epoch
/// each tuple is (Epoch, credits, prev_credits)
epoch_credits: state.epoch_credits.clone(),
/// most recent timestamp submitted with a vote
last_timestamp: state.last_timestamp.clone(),
}
}