cargo +nightly fix --features=bpf_c,cuda,erasure,chacha --edition
This commit is contained in:
parent
af403ba6fa
commit
c49e2f8bbd
|
@ -4,7 +4,7 @@ use crate::cluster_info::{ClusterInfo, ClusterInfoError, NodeInfo};
|
|||
use crate::counter::Counter;
|
||||
use crate::entry::Entry;
|
||||
#[cfg(feature = "erasure")]
|
||||
use erasure;
|
||||
use crate::erasure;
|
||||
|
||||
use crate::ledger::Block;
|
||||
use crate::packet::{index_blobs, SharedBlobs};
|
||||
|
|
|
@ -59,7 +59,7 @@ pub fn chacha_cbc_encrypt_file(
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use chacha::chacha_cbc_encrypt_file;
|
||||
use crate::chacha::chacha_cbc_encrypt_file;
|
||||
use std::fs::remove_file;
|
||||
use std::fs::File;
|
||||
use std::io::Read;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
use chacha::{CHACHA_BLOCK_SIZE, CHACHA_KEY_SIZE};
|
||||
use ledger::LedgerWindow;
|
||||
use sigverify::{chacha_cbc_encrypt_many_sample, chacha_end_sha_state, chacha_init_sha_state};
|
||||
use crate::chacha::{CHACHA_BLOCK_SIZE, CHACHA_KEY_SIZE};
|
||||
use crate::ledger::LedgerWindow;
|
||||
use crate::sigverify::{chacha_cbc_encrypt_many_sample, chacha_end_sha_state, chacha_init_sha_state};
|
||||
use solana_sdk::hash::Hash;
|
||||
use std::io;
|
||||
use std::mem::size_of;
|
||||
|
||||
use storage_stage::ENTRIES_PER_SLICE;
|
||||
use crate::storage_stage::ENTRIES_PER_SLICE;
|
||||
|
||||
// Encrypt a file with multiple starting IV states, determined by ivecs.len()
|
||||
//
|
||||
|
@ -100,18 +100,18 @@ pub fn chacha_cbc_encrypt_file_many_keys(
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use chacha::chacha_cbc_encrypt_file;
|
||||
use chacha_cuda::chacha_cbc_encrypt_file_many_keys;
|
||||
use ledger::LedgerWriter;
|
||||
use ledger::{get_tmp_ledger_path, make_tiny_test_entries, LEDGER_DATA_FILE};
|
||||
use replicator::sample_file;
|
||||
use crate::chacha::chacha_cbc_encrypt_file;
|
||||
use crate::chacha_cuda::chacha_cbc_encrypt_file_many_keys;
|
||||
use crate::ledger::LedgerWriter;
|
||||
use crate::ledger::{get_tmp_ledger_path, make_tiny_test_entries, LEDGER_DATA_FILE};
|
||||
use crate::replicator::sample_file;
|
||||
use solana_sdk::hash::Hash;
|
||||
use std::fs::{remove_dir_all, remove_file};
|
||||
use std::path::Path;
|
||||
|
||||
#[test]
|
||||
fn test_encrypt_file_many_keys_single() {
|
||||
use logger;
|
||||
use crate::logger;
|
||||
logger::setup();
|
||||
|
||||
let entries = make_tiny_test_entries(32);
|
||||
|
@ -151,7 +151,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn test_encrypt_file_many_keys_multiple_keys() {
|
||||
use logger;
|
||||
use crate::logger;
|
||||
logger::setup();
|
||||
|
||||
let entries = make_tiny_test_entries(32);
|
||||
|
|
|
@ -8,7 +8,7 @@ use crate::packet::{SharedBlob, BLOB_HEADER_SIZE};
|
|||
use crate::result::Result;
|
||||
use crate::streamer::BlobSender;
|
||||
#[cfg(feature = "erasure")]
|
||||
use erasure;
|
||||
use crate::erasure;
|
||||
use log::Level;
|
||||
use rocksdb::DBRawIterator;
|
||||
use solana_metrics::{influxdb, submit};
|
||||
|
@ -404,11 +404,11 @@ mod test {
|
|||
use crate::packet::{Blob, Packet, Packets, SharedBlob, PACKET_DATA_SIZE};
|
||||
use crate::streamer::{receiver, responder, PacketReceiver};
|
||||
#[cfg(all(feature = "erasure", test))]
|
||||
use entry::reconstruct_entries_from_blobs;
|
||||
use crate::entry::reconstruct_entries_from_blobs;
|
||||
#[cfg(all(feature = "erasure", test))]
|
||||
use erasure::test::{generate_db_ledger_from_window, setup_window_ledger};
|
||||
use crate::erasure::test::{generate_db_ledger_from_window, setup_window_ledger};
|
||||
#[cfg(all(feature = "erasure", test))]
|
||||
use erasure::{NUM_CODING, NUM_DATA};
|
||||
use crate::erasure::{NUM_CODING, NUM_DATA};
|
||||
use rocksdb::{Options, DB};
|
||||
use solana_sdk::signature::{Keypair, KeypairUtil};
|
||||
use std::io;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
// Support erasure coding
|
||||
use db_ledger::DbLedger;
|
||||
use db_window::{find_missing_coding_indexes, find_missing_data_indexes};
|
||||
use packet::{Blob, SharedBlob, BLOB_DATA_SIZE, BLOB_HEADER_SIZE, BLOB_SIZE};
|
||||
use result::{Error, Result};
|
||||
use crate::db_ledger::DbLedger;
|
||||
use crate::db_window::{find_missing_coding_indexes, find_missing_data_indexes};
|
||||
use crate::packet::{Blob, SharedBlob, BLOB_DATA_SIZE, BLOB_HEADER_SIZE, BLOB_SIZE};
|
||||
use crate::result::{Error, Result};
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
use std::cmp;
|
||||
use std::sync::{Arc, RwLock};
|
||||
use window::WindowSlot;
|
||||
use crate::window::WindowSlot;
|
||||
|
||||
//TODO(sakridge) pick these values
|
||||
pub const NUM_DATA: usize = 16; // number of data blobs
|
||||
|
@ -554,14 +554,14 @@ fn categorize_blob(
|
|||
#[cfg(test)]
|
||||
pub mod test {
|
||||
use super::*;
|
||||
use db_ledger::{DbLedger, DEFAULT_SLOT_HEIGHT};
|
||||
use ledger::{get_tmp_ledger_path, make_tiny_test_entries, Block};
|
||||
use logger;
|
||||
use packet::{index_blobs, SharedBlob, BLOB_DATA_SIZE, BLOB_SIZE};
|
||||
use crate::db_ledger::{DbLedger, DEFAULT_SLOT_HEIGHT};
|
||||
use crate::ledger::{get_tmp_ledger_path, make_tiny_test_entries, Block};
|
||||
use crate::logger;
|
||||
use crate::packet::{index_blobs, SharedBlob, BLOB_DATA_SIZE, BLOB_SIZE};
|
||||
use rand::{thread_rng, Rng};
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
use solana_sdk::signature::{Keypair, KeypairUtil};
|
||||
use window::WindowSlot;
|
||||
use crate::window::WindowSlot;
|
||||
|
||||
#[test]
|
||||
pub fn test_coding() {
|
||||
|
|
|
@ -13,7 +13,7 @@ use crate::streamer::BlobReceiver;
|
|||
use crate::window;
|
||||
use crate::window_service::window_service;
|
||||
#[cfg(feature = "chacha")]
|
||||
use chacha::{chacha_cbc_encrypt_file, CHACHA_BLOCK_SIZE};
|
||||
use crate::chacha::{chacha_cbc_encrypt_file, CHACHA_BLOCK_SIZE};
|
||||
use rand::thread_rng;
|
||||
use rand::Rng;
|
||||
use solana_drone::drone::{request_airdrop_transaction, DRONE_PORT};
|
||||
|
|
|
@ -8,7 +8,7 @@ use crate::poh_recorder;
|
|||
use crate::vote_stage;
|
||||
use bincode;
|
||||
#[cfg(feature = "erasure")]
|
||||
use erasure;
|
||||
use crate::erasure;
|
||||
use rocksdb;
|
||||
use serde_json;
|
||||
use std;
|
||||
|
|
|
@ -234,7 +234,7 @@ pub fn init() {
|
|||
|
||||
#[cfg(feature = "cuda")]
|
||||
pub fn ed25519_verify(batches: &[SharedPackets]) -> Vec<Vec<u8>> {
|
||||
use packet::PACKET_DATA_SIZE;
|
||||
use crate::packet::PACKET_DATA_SIZE;
|
||||
let count = batch_size(batches);
|
||||
|
||||
// micro-benchmarks show GPU time for smallest batch around 15-20ms
|
||||
|
|
|
@ -6,7 +6,7 @@ use crate::entry::EntryReceiver;
|
|||
use crate::result::{Error, Result};
|
||||
use crate::service::Service;
|
||||
#[cfg(all(feature = "chacha", feature = "cuda"))]
|
||||
use chacha_cuda::chacha_cbc_encrypt_file_many_keys;
|
||||
use crate::chacha_cuda::chacha_cbc_encrypt_file_many_keys;
|
||||
use rand::{Rng, SeedableRng};
|
||||
use rand_chacha::ChaChaRng;
|
||||
use solana_sdk::hash::Hash;
|
||||
|
|
Loading…
Reference in New Issue