upgrade rust to 1.37 (#5611)
This commit is contained in:
parent
aeaa0feb61
commit
52f6da5cee
|
@ -4,7 +4,7 @@ os:
|
||||||
language: rust
|
language: rust
|
||||||
cache: cargo
|
cache: cargo
|
||||||
rust:
|
rust:
|
||||||
- 1.36.0
|
- 1.37.0
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- source ci/rust-version.sh
|
- source ci/rust-version.sh
|
||||||
|
|
|
@ -78,7 +78,7 @@ $ source $HOME/.cargo/env
|
||||||
$ rustup component add rustfmt
|
$ rustup component add rustfmt
|
||||||
```
|
```
|
||||||
|
|
||||||
If your rustc version is lower than 1.36.0, please update it:
|
If your rustc version is lower than 1.37.0, please update it:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ rustup update
|
$ rustup update
|
||||||
|
@ -240,5 +240,3 @@ problem is solved by this code?" On the other hand, if a test does fail and you
|
||||||
better way to solve the same problem, a Pull Request with your solution would most certainly be
|
better way to solve the same problem, a Pull Request with your solution would most certainly be
|
||||||
welcome! Likewise, if rewriting a test can better communicate what code it's protecting, please
|
welcome! Likewise, if rewriting a test can better communicate what code it's protecting, please
|
||||||
send us that patch!
|
send us that patch!
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Note: when the rust version is changed also modify
|
# Note: when the rust version is changed also modify
|
||||||
# ci/rust-version.sh to pick up the new image tag
|
# ci/rust-version.sh to pick up the new image tag
|
||||||
FROM rust:1.36.0
|
FROM rust:1.37.0
|
||||||
|
|
||||||
# Add Google Protocol Buffers for Libra's metrics library.
|
# Add Google Protocol Buffers for Libra's metrics library.
|
||||||
ENV PROTOC_VERSION 3.8.0
|
ENV PROTOC_VERSION 3.8.0
|
||||||
|
@ -10,9 +10,7 @@ RUN set -x \
|
||||||
&& apt update \
|
&& apt update \
|
||||||
&& apt-get install apt-transport-https \
|
&& apt-get install apt-transport-https \
|
||||||
&& echo deb https://apt.buildkite.com/buildkite-agent stable main > /etc/apt/sources.list.d/buildkite-agent.list \
|
&& echo deb https://apt.buildkite.com/buildkite-agent stable main > /etc/apt/sources.list.d/buildkite-agent.list \
|
||||||
&& echo deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch-7 main > /etc/apt/sources.list.d/llvm.list \
|
|
||||||
&& apt-key adv --no-tty --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 32A37959C2FA5C3C99EFBC32A79206696452D198 \
|
&& apt-key adv --no-tty --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 32A37959C2FA5C3C99EFBC32A79206696452D198 \
|
||||||
&& wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
|
|
||||||
&& apt update \
|
&& apt update \
|
||||||
&& apt install -y \
|
&& apt install -y \
|
||||||
buildkite-agent \
|
buildkite-agent \
|
||||||
|
@ -20,7 +18,6 @@ RUN set -x \
|
||||||
cmake \
|
cmake \
|
||||||
lcov \
|
lcov \
|
||||||
libclang-common-7-dev \
|
libclang-common-7-dev \
|
||||||
llvm-7 \
|
|
||||||
mscgen \
|
mscgen \
|
||||||
rsync \
|
rsync \
|
||||||
sudo \
|
sudo \
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
# $ source ci/rust-version.sh
|
# $ source ci/rust-version.sh
|
||||||
#
|
#
|
||||||
|
|
||||||
stable_version=1.36.0
|
stable_version=1.37.0
|
||||||
nightly_version=2019-07-19
|
nightly_version=2019-08-21
|
||||||
|
|
||||||
export rust_stable="$stable_version"
|
export rust_stable="$stable_version"
|
||||||
export rust_stable_docker_image=solanalabs/rust:"$stable_version"
|
export rust_stable_docker_image=solanalabs/rust:"$stable_version"
|
||||||
|
|
|
@ -18,7 +18,7 @@ _ cargo +"$rust_stable" clippy --version
|
||||||
_ cargo +"$rust_stable" clippy --all --exclude solana-sdk-c -- --deny=warnings
|
_ cargo +"$rust_stable" clippy --all --exclude solana-sdk-c -- --deny=warnings
|
||||||
_ cargo +"$rust_stable" clippy --manifest-path sdk-c/Cargo.toml -- --deny=warnings
|
_ cargo +"$rust_stable" clippy --manifest-path sdk-c/Cargo.toml -- --deny=warnings
|
||||||
|
|
||||||
_ cargo +"$rust_stable" audit --version
|
# _ cargo +"$rust_stable" audit --version ### cargo-audit stopped supporting --version?? https://github.com/RustSec/cargo-audit/issues/100
|
||||||
_ cargo +"$rust_stable" audit
|
_ cargo +"$rust_stable" audit
|
||||||
_ ci/nits.sh
|
_ ci/nits.sh
|
||||||
_ ci/order-crates-for-publishing.py
|
_ ci/order-crates-for-publishing.py
|
||||||
|
|
|
@ -198,6 +198,7 @@ impl BankingStage {
|
||||||
if processed < verified_txs_len {
|
if processed < verified_txs_len {
|
||||||
let next_leader = poh_recorder.lock().unwrap().next_slot_leader();
|
let next_leader = poh_recorder.lock().unwrap().next_slot_leader();
|
||||||
// Walk thru rest of the transactions and filter out the invalid (e.g. too old) ones
|
// Walk thru rest of the transactions and filter out the invalid (e.g. too old) ones
|
||||||
|
#[allow(clippy::while_let_on_iterator)]
|
||||||
while let Some((msgs, unprocessed_indexes)) = buffered_packets_iter.next() {
|
while let Some((msgs, unprocessed_indexes)) = buffered_packets_iter.next() {
|
||||||
let unprocessed_indexes = Self::filter_unprocessed_packets(
|
let unprocessed_indexes = Self::filter_unprocessed_packets(
|
||||||
&bank,
|
&bank,
|
||||||
|
@ -849,6 +850,7 @@ impl BankingStage {
|
||||||
if processed < verified_txs_len {
|
if processed < verified_txs_len {
|
||||||
let next_leader = poh.lock().unwrap().next_slot_leader();
|
let next_leader = poh.lock().unwrap().next_slot_leader();
|
||||||
// Walk thru rest of the transactions and filter out the invalid (e.g. too old) ones
|
// Walk thru rest of the transactions and filter out the invalid (e.g. too old) ones
|
||||||
|
#[allow(clippy::while_let_on_iterator)]
|
||||||
while let Some((msgs, vers)) = mms_iter.next() {
|
while let Some((msgs, vers)) = mms_iter.next() {
|
||||||
let packet_indexes = Self::generate_packet_indexes(vers);
|
let packet_indexes = Self::generate_packet_indexes(vers);
|
||||||
let unprocessed_indexes = Self::filter_unprocessed_packets(
|
let unprocessed_indexes = Self::filter_unprocessed_packets(
|
||||||
|
|
|
@ -46,7 +46,7 @@ use std::sync::{Arc, RwLock};
|
||||||
use std::thread::{sleep, spawn, JoinHandle};
|
use std::thread::{sleep, spawn, JoinHandle};
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
static ENCRYPTED_FILENAME: &'static str = "ledger.enc";
|
static ENCRYPTED_FILENAME: &str = "ledger.enc";
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize)]
|
#[derive(Serialize, Deserialize)]
|
||||||
pub enum ReplicatorRequest {
|
pub enum ReplicatorRequest {
|
||||||
|
|
|
@ -11,6 +11,7 @@ use solana_sdk::signature::Signature;
|
||||||
use solana_sdk::transaction;
|
use solana_sdk::transaction;
|
||||||
use std::sync::{atomic, Arc};
|
use std::sync::{atomic, Arc};
|
||||||
|
|
||||||
|
#[allow(clippy::needless_return)] // TODO remove me when rpc is updated?
|
||||||
#[rpc(server)]
|
#[rpc(server)]
|
||||||
pub trait RpcSolPubSub {
|
pub trait RpcSolPubSub {
|
||||||
type Metadata;
|
type Metadata;
|
||||||
|
|
|
@ -72,11 +72,11 @@ impl Default for ValidatorConfig {
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct ValidatorExit {
|
pub struct ValidatorExit {
|
||||||
exits: Vec<Box<FnOnce() + Send + Sync>>,
|
exits: Vec<Box<dyn FnOnce() + Send + Sync>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ValidatorExit {
|
impl ValidatorExit {
|
||||||
pub fn register_exit(&mut self, exit: Box<FnOnce() -> () + Send + Sync>) {
|
pub fn register_exit(&mut self, exit: Box<dyn FnOnce() -> () + Send + Sync>) {
|
||||||
self.exits.push(exit);
|
self.exits.push(exit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -115,9 +115,9 @@ impl<T: Clone> AccountsIndex<T> {
|
||||||
);
|
);
|
||||||
fork_vec.retain(|(fork, _)| !Self::can_purge(max_root, *fork));
|
fork_vec.retain(|(fork, _)| !Self::can_purge(max_root, *fork));
|
||||||
|
|
||||||
return None;
|
None
|
||||||
} else {
|
} else {
|
||||||
return Some(account_info);
|
Some(account_info)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue