@ -1,4 +1,4 @@
|
|||||||
FROM solanalabs/rust:1.40.0
|
FROM solanalabs/rust:1.41.0
|
||||||
ARG date
|
ARG date
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
|
@ -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.40.0
|
FROM rust:1.41.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
|
||||||
|
@ -16,13 +16,13 @@
|
|||||||
if [[ -n $RUST_STABLE_VERSION ]]; then
|
if [[ -n $RUST_STABLE_VERSION ]]; then
|
||||||
stable_version="$RUST_STABLE_VERSION"
|
stable_version="$RUST_STABLE_VERSION"
|
||||||
else
|
else
|
||||||
stable_version=1.40.0
|
stable_version=1.41.0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n $RUST_NIGHTLY_VERSION ]]; then
|
if [[ -n $RUST_NIGHTLY_VERSION ]]; then
|
||||||
nightly_version="$RUST_NIGHTLY_VERSION"
|
nightly_version="$RUST_NIGHTLY_VERSION"
|
||||||
else
|
else
|
||||||
nightly_version=2019-12-19
|
nightly_version=2020-02-06
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
fn main() {
|
|
||||||
// Until https://github.com/rust-lang/rust/issues/44839 is resolved
|
|
||||||
// `#[target_feature(enable = "avx512f")]` is not available.
|
|
||||||
// Use an env flag instead:
|
|
||||||
if is_x86_feature_detected!("avx512f") {
|
|
||||||
println!("cargo:rustc-env=TARGET_FEATURE_AVX512F=1");
|
|
||||||
}
|
|
||||||
}
|
|
@ -659,16 +659,6 @@ fn report_target_features() {
|
|||||||
process::exit(1);
|
process::exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TARGET_FEATURE_AVX512F is defined by build.rs
|
|
||||||
if option_env!("TARGET_FEATURE_AVX512F").is_some() {
|
|
||||||
if is_x86_feature_detected!("avx512f") {
|
|
||||||
info!("AVX512 detected");
|
|
||||||
} else {
|
|
||||||
error!("Your machine does not have AVX512 support, please rebuild from source on your machine");
|
|
||||||
process::exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the activated stake percentage (based on the provided bank) that is visible in gossip
|
// Get the activated stake percentage (based on the provided bank) that is visible in gossip
|
||||||
|
@ -57,7 +57,7 @@ pub const MAX_TRANSACTION_FORWARDING_DELAY: usize = 6;
|
|||||||
|
|
||||||
/// Converts a slot to a storage segment. Does not indicate that a segment is complete.
|
/// Converts a slot to a storage segment. Does not indicate that a segment is complete.
|
||||||
pub fn get_segment_from_slot(rooted_slot: Slot, slots_per_segment: u64) -> Segment {
|
pub fn get_segment_from_slot(rooted_slot: Slot, slots_per_segment: u64) -> Segment {
|
||||||
((rooted_slot + (slots_per_segment - 1)) / slots_per_segment)
|
(rooted_slot + (slots_per_segment - 1)) / slots_per_segment
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Given a slot returns the latest complete segment, if no segment could possibly be complete
|
/// Given a slot returns the latest complete segment, if no segment could possibly be complete
|
||||||
|
@ -71,7 +71,7 @@ pub unsafe fn deserialize<'a>(input: *mut u8) -> (&'a Pubkey, Vec<AccountInfo<'a
|
|||||||
let is_signer = {
|
let is_signer = {
|
||||||
#[allow(clippy::cast_ptr_alignment)]
|
#[allow(clippy::cast_ptr_alignment)]
|
||||||
let is_signer = *(input.add(offset) as *const u64);
|
let is_signer = *(input.add(offset) as *const u64);
|
||||||
(is_signer != 0)
|
is_signer != 0
|
||||||
};
|
};
|
||||||
offset += size_of::<u64>();
|
offset += size_of::<u64>();
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
//! The `hash` module provides functions for creating SHA-256 hashes.
|
//! The `hash` module provides functions for creating SHA-256 hashes.
|
||||||
|
|
||||||
use bs58;
|
|
||||||
use sha2::{Digest, Sha256};
|
use sha2::{Digest, Sha256};
|
||||||
use std::convert::TryFrom;
|
use std::convert::TryFrom;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
@ -100,7 +99,6 @@ pub fn extend_and_hash(id: &Hash, val: &[u8]) -> Hash {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use bs58;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_hash_fromstr() {
|
fn test_hash_fromstr() {
|
||||||
|
Reference in New Issue
Block a user