Move entry/poh to own crate to speed up poh bench build (#18225)

This commit is contained in:
sakridge 2021-07-14 14:16:29 +02:00 committed by GitHub
parent a4a24b6531
commit 7f2254225e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
57 changed files with 152 additions and 90 deletions

35
Cargo.lock generated
View File

@ -4591,6 +4591,7 @@ dependencies = [
"solana-clap-utils",
"solana-client",
"solana-config-program",
"solana-entry",
"solana-frozen-abi 1.8.0",
"solana-frozen-abi-macro 1.8.0",
"solana-gossip",
@ -4678,6 +4679,27 @@ dependencies = [
"tar",
]
[[package]]
name = "solana-entry"
version = "1.8.0"
dependencies = [
"bincode",
"dlopen",
"dlopen_derive",
"log 0.4.14",
"matches",
"rand 0.7.3",
"rayon",
"serde",
"solana-logger 1.8.0",
"solana-measure",
"solana-merkle-tree",
"solana-metrics",
"solana-perf",
"solana-rayon-threadlimit",
"solana-sdk",
]
[[package]]
name = "solana-failure-program"
version = "1.8.0"
@ -4779,6 +4801,7 @@ dependencies = [
"serde_yaml",
"solana-clap-utils",
"solana-cli-config",
"solana-entry",
"solana-ledger",
"solana-logger 1.8.0",
"solana-runtime",
@ -4823,6 +4846,7 @@ dependencies = [
"serial_test 0.5.1",
"solana-clap-utils",
"solana-client",
"solana-entry",
"solana-frozen-abi 1.8.0",
"solana-frozen-abi-macro 1.8.0",
"solana-ledger",
@ -4899,8 +4923,6 @@ dependencies = [
"chrono",
"chrono-humanize",
"crossbeam-channel",
"dlopen",
"dlopen_derive",
"ed25519-dalek",
"fs_extra",
"futures 0.3.15",
@ -4923,6 +4945,7 @@ dependencies = [
"sha2 0.9.5",
"solana-account-decoder",
"solana-bpf-loader-program",
"solana-entry",
"solana-frozen-abi 1.8.0",
"solana-frozen-abi-macro 1.8.0",
"solana-logger 1.8.0",
@ -4966,6 +4989,7 @@ dependencies = [
"solana-clap-utils",
"solana-cli-output",
"solana-core",
"solana-entry",
"solana-ledger",
"solana-logger 1.8.0",
"solana-measure",
@ -4997,6 +5021,7 @@ dependencies = [
"solana-config-program",
"solana-core",
"solana-download-utils",
"solana-entry",
"solana-faucet",
"solana-gossip",
"solana-ledger",
@ -5048,7 +5073,6 @@ name = "solana-measure"
version = "1.8.0"
dependencies = [
"log 0.4.14",
"solana-metrics",
"solana-sdk",
]
@ -5181,6 +5205,7 @@ dependencies = [
"log 0.4.14",
"matches",
"rand 0.7.3",
"solana-entry",
"solana-ledger",
"solana-logger 1.8.0",
"solana-measure",
@ -5201,7 +5226,7 @@ dependencies = [
"rand 0.7.3",
"rayon",
"solana-clap-utils",
"solana-ledger",
"solana-entry",
"solana-logger 1.8.0",
"solana-measure",
"solana-perf",
@ -5355,6 +5380,7 @@ dependencies = [
"serial_test 0.4.0",
"solana-account-decoder",
"solana-client",
"solana-entry",
"solana-faucet",
"solana-gossip",
"solana-ledger",
@ -5733,6 +5759,7 @@ dependencies = [
"solana-client",
"solana-core",
"solana-download-utils",
"solana-entry",
"solana-faucet",
"solana-genesis-utils",
"solana-gossip",

View File

@ -15,6 +15,7 @@ members = [
"core",
"dos",
"download-utils",
"entry",
"faucet",
"frozen-abi",
"perf",

View File

@ -48,6 +48,7 @@ solana-banks-server = { path = "../banks-server", version = "=1.8.0" }
solana-clap-utils = { path = "../clap-utils", version = "=1.8.0" }
solana-client = { path = "../client", version = "=1.8.0" }
solana-config-program = { path = "../programs/config", version = "=1.8.0" }
solana-entry = { path = "../entry", version = "=1.8.0" }
solana-gossip = { path = "../gossip", version = "=1.8.0" }
solana-ledger = { path = "../ledger", version = "=1.8.0" }
solana-logger = { path = "../logger", version = "=1.8.0" }

View File

@ -10,10 +10,10 @@ use rayon::prelude::*;
use solana_core::banking_stage::{BankingStage, BankingStageStats};
use solana_core::cost_model::CostModel;
use solana_core::cost_tracker::CostTracker;
use solana_entry::entry::{next_hash, Entry};
use solana_gossip::cluster_info::ClusterInfo;
use solana_gossip::cluster_info::Node;
use solana_ledger::blockstore_processor::process_entries;
use solana_ledger::entry::{next_hash, Entry};
use solana_ledger::genesis_utils::{create_genesis_config, GenesisConfigInfo};
use solana_ledger::{blockstore::Blockstore, get_tmp_ledger_path};
use solana_perf::packet::to_packets_chunked;

View File

@ -4,9 +4,9 @@ extern crate solana_ledger;
extern crate test;
use rand::Rng;
use solana_entry::entry::{create_ticks, Entry};
use solana_ledger::{
blockstore::{entries_to_test_shreds, Blockstore},
entry::{create_ticks, Entry},
get_tmp_ledger_path,
};
use solana_sdk::{clock::Slot, hash::Hash};

View File

@ -5,9 +5,9 @@ extern crate test;
use log::*;
use solana_core::retransmit_stage::retransmitter;
use solana_entry::entry::Entry;
use solana_gossip::cluster_info::{ClusterInfo, Node};
use solana_gossip::contact_info::ContactInfo;
use solana_ledger::entry::Entry;
use solana_ledger::genesis_utils::{create_genesis_config, GenesisConfigInfo};
use solana_ledger::leader_schedule_cache::LeaderScheduleCache;
use solana_ledger::shred::Shredder;

View File

@ -5,7 +5,7 @@ extern crate test;
use rand::seq::SliceRandom;
use raptorq::{Decoder, Encoder};
use solana_ledger::entry::{create_ticks, Entry};
use solana_entry::entry::{create_ticks, Entry};
use solana_ledger::shred::{
max_entries_per_n_shred, max_ticks_per_n_shreds, ProcessShredsStats, Shred, Shredder,
MAX_DATA_SHREDS_PER_FEC_BLOCK, SHRED_PAYLOAD_SIZE, SIZE_OF_CODING_SHRED_HEADERS,

View File

@ -6,8 +6,9 @@ use crossbeam_channel::{Receiver as CrossbeamReceiver, RecvTimeoutError};
use itertools::Itertools;
use lru::LruCache;
use retain_mut::RetainMut;
use solana_entry::entry::hash_transactions;
use solana_gossip::cluster_info::ClusterInfo;
use solana_ledger::{blockstore_processor::TransactionStatusSender, entry::hash_transactions};
use solana_ledger::blockstore_processor::TransactionStatusSender;
use solana_measure::measure::Measure;
use solana_metrics::{inc_new_counter_debug, inc_new_counter_info};
use solana_perf::{
@ -23,10 +24,10 @@ use solana_runtime::{
TransactionExecutionResult,
},
bank_utils,
hashed_transaction::HashedTransaction,
transaction_batch::TransactionBatch,
vote_sender_types::ReplayVoteSender,
};
use solana_sdk::hashed_transaction::HashedTransaction;
use solana_sdk::{
clock::{
Slot, DEFAULT_TICKS_PER_SLOT, MAX_PROCESSING_AGE, MAX_TRANSACTION_FORWARDING_DELAY,
@ -1572,10 +1573,10 @@ mod tests {
use crate::cost_model::CostModel;
use crossbeam_channel::unbounded;
use itertools::Itertools;
use solana_entry::entry::{next_entry, Entry, EntrySlice};
use solana_gossip::cluster_info::Node;
use solana_ledger::{
blockstore::{entries_to_test_shreds, Blockstore},
entry::{next_entry, Entry, EntrySlice},
genesis_utils::{create_genesis_config, GenesisConfigInfo},
get_tmp_ledger_path,
leader_schedule_cache::LeaderScheduleCache,

View File

@ -446,10 +446,10 @@ pub fn broadcast_shreds(
pub mod test {
use super::*;
use crossbeam_channel::unbounded;
use solana_entry::entry::create_ticks;
use solana_gossip::cluster_info::{ClusterInfo, Node};
use solana_ledger::{
blockstore::{make_slot_entries, Blockstore},
entry::create_ticks,
genesis_utils::{create_genesis_config, GenesisConfigInfo},
get_tmp_ledger_path,
shred::{max_ticks_per_n_shreds, ProcessShredsStats, Shredder},

View File

@ -1,5 +1,6 @@
use super::*;
use solana_ledger::{entry::Entry, shred::Shredder};
use solana_entry::entry::Entry;
use solana_ledger::shred::Shredder;
use solana_runtime::blockhash_queue::BlockhashQueue;
use solana_sdk::{
hash::Hash,

View File

@ -1,5 +1,5 @@
use super::*;
use solana_ledger::entry::Entry;
use solana_entry::entry::Entry;
use solana_ledger::shred::Shredder;
use solana_sdk::hash::Hash;
use solana_sdk::signature::Keypair;

View File

@ -1,5 +1,6 @@
use crate::result::Result;
use solana_ledger::{entry::Entry, shred::Shred};
use solana_entry::entry::Entry;
use solana_ledger::shred::Shred;
use solana_poh::poh_recorder::WorkingBankEntry;
use solana_runtime::bank::Bank;
use solana_sdk::clock::Slot;

View File

@ -5,12 +5,9 @@ use super::{
*,
};
use crate::{broadcast_stage::broadcast_utils::UnfinishedSlotInfo, cluster_nodes::ClusterNodes};
use solana_ledger::{
entry::Entry,
shred::{
ProcessShredsStats, Shred, Shredder, MAX_DATA_SHREDS_PER_FEC_BLOCK,
SHRED_TICK_REFERENCE_MASK,
},
use solana_entry::entry::Entry;
use solana_ledger::shred::{
ProcessShredsStats, Shred, Shredder, MAX_DATA_SHREDS_PER_FEC_BLOCK, SHRED_TICK_REFERENCE_MASK,
};
use solana_sdk::{pubkey::Pubkey, signature::Keypair, timing::duration_as_us};
use std::{collections::HashMap, sync::RwLock, time::Duration};
@ -502,11 +499,11 @@ impl BroadcastRun for StandardBroadcastRun {
#[cfg(test)]
mod test {
use super::*;
use solana_entry::entry::create_ticks;
use solana_gossip::cluster_info::{ClusterInfo, Node};
use solana_ledger::genesis_utils::create_genesis_config;
use solana_ledger::{
blockstore::Blockstore, entry::create_ticks, get_tmp_ledger_path,
shred::max_ticks_per_n_shreds,
blockstore::Blockstore, get_tmp_ledger_path, shred::max_ticks_per_n_shreds,
};
use solana_runtime::bank::Bank;
use solana_sdk::{

View File

@ -1,6 +1,6 @@
use crossbeam_channel::{Receiver, RecvTimeoutError, Sender};
use solana_entry::entry::Entry;
use solana_ledger::blockstore::{Blockstore, CompletedDataSetInfo};
use solana_ledger::entry::Entry;
use solana_rpc::{max_slots::MaxSlots, rpc_subscriptions::RpcSubscriptions};
use solana_sdk::signature::Signature;
use std::{

View File

@ -23,12 +23,12 @@ use crate::{
window_service::DuplicateSlotReceiver,
};
use solana_client::rpc_response::SlotUpdate;
use solana_entry::entry::VerifyRecyclers;
use solana_gossip::cluster_info::ClusterInfo;
use solana_ledger::{
block_error::BlockError,
blockstore::Blockstore,
blockstore_processor::{self, BlockstoreProcessorError, TransactionStatusSender},
entry::VerifyRecyclers,
leader_schedule_cache::LeaderScheduleCache,
};
use solana_measure::measure::Measure;
@ -2674,12 +2674,12 @@ mod tests {
vote_simulator::{self, VoteSimulator},
};
use crossbeam_channel::unbounded;
use solana_entry::entry::{self, Entry};
use solana_gossip::{cluster_info::Node, crds::Cursor};
use solana_ledger::{
blockstore::make_slot_entries,
blockstore::{entries_to_test_shreds, BlockstoreError},
create_new_tmp_ledger,
entry::{self, Entry},
genesis_utils::{create_genesis_config, create_genesis_config_with_leader},
get_tmp_ledger_path,
shred::{

View File

@ -18,6 +18,7 @@ use crate::{
};
use crossbeam_channel::{bounded, unbounded};
use rand::{thread_rng, Rng};
use solana_entry::poh::compute_hash_time_ns;
use solana_gossip::{
cluster_info::{
ClusterInfo, Node, DEFAULT_CONTACT_DEBUG_INTERVAL_MILLIS,
@ -33,7 +34,6 @@ use solana_ledger::{
blockstore_processor::{self, TransactionStatusSender},
leader_schedule::FixedSchedule,
leader_schedule_cache::LeaderScheduleCache,
poh::compute_hash_time_ns,
};
use solana_measure::measure::Measure;
use solana_metrics::datapoint_info;
@ -1626,8 +1626,8 @@ mod tests {
fn test_backup_and_clear_blockstore() {
use std::time::Instant;
solana_logger::setup();
use solana_ledger::get_tmp_ledger_path;
use solana_ledger::{blockstore, entry};
use solana_entry::entry;
use solana_ledger::{blockstore, get_tmp_ledger_path};
let blockstore_path = get_tmp_ledger_path!();
{
let blockstore = Blockstore::open(&blockstore_path).unwrap();

View File

@ -625,10 +625,10 @@ impl WindowService {
#[cfg(test)]
mod test {
use super::*;
use solana_entry::entry::{create_ticks, Entry};
use solana_gossip::contact_info::ContactInfo;
use solana_ledger::{
blockstore::{make_many_slot_entries, Blockstore},
entry::{create_ticks, Entry},
genesis_utils::create_genesis_config_with_leader,
get_tmp_ledger_path,
shred::{DataShredHeader, Shredder},

36
entry/Cargo.toml Normal file
View File

@ -0,0 +1,36 @@
[package]
name = "solana-entry"
version = "1.8.0"
description = "Solana Entry"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-poh"
edition = "2018"
[dependencies]
bincode = "1.3.3"
dlopen = "0.1.8"
dlopen_derive = "0.1.4"
log = "0.4.11"
rand = "0.7.0"
rayon = "1.5.1"
serde = "1.0.126"
solana-measure = { path = "../measure", version = "=1.8.0" }
solana-merkle-tree = { path = "../merkle-tree", version = "=1.8.0" }
solana-metrics = { path = "../metrics", version = "=1.8.0" }
solana-perf = { path = "../perf", version = "=1.8.0" }
solana-rayon-threadlimit = { path = "../rayon-threadlimit", version = "=1.8.0" }
solana-sdk = { path = "../sdk", version = "=1.8.0" }
[dev-dependencies]
matches = "0.1.6"
solana-logger = { path = "../logger", version = "=1.8.0" }
[lib]
crate-type = ["lib"]
name = "solana_entry"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@ -17,8 +17,8 @@ use solana_perf::cuda_runtime::PinnedVec;
use solana_perf::perf_libs;
use solana_perf::recycler::Recycler;
use solana_rayon_threadlimit::get_thread_count;
use solana_runtime::hashed_transaction::HashedTransaction;
use solana_sdk::hash::Hash;
use solana_sdk::hashed_transaction::HashedTransaction;
use solana_sdk::packet::PACKET_DATA_SIZE;
use solana_sdk::timing;
use solana_sdk::transaction::Transaction;

5
entry/src/lib.rs Normal file
View File

@ -0,0 +1,5 @@
#![allow(clippy::integer_arithmetic)]
pub mod entry;
pub mod poh;
extern crate log;

View File

@ -18,6 +18,7 @@ serde_json = "1.0.64"
serde_yaml = "0.8.17"
solana-clap-utils = { path = "../clap-utils", version = "=1.8.0" }
solana-cli-config = { path = "../cli-config", version = "=1.8.0" }
solana-entry = { path = "../entry", version = "=1.8.0" }
solana-ledger = { path = "../ledger", version = "=1.8.0" }
solana-logger = { path = "../logger", version = "=1.8.0" }
solana-runtime = { path = "../runtime", version = "=1.8.0" }

View File

@ -6,10 +6,9 @@ use solana_clap_utils::{
input_parsers::{cluster_type_of, pubkey_of, pubkeys_of, unix_timestamp_from_rfc3339_datetime},
input_validators::{is_pubkey_or_keypair, is_rfc3339_datetime, is_slot, is_valid_percentage},
};
use solana_entry::poh::compute_hashes_per_tick;
use solana_genesis::{genesis_accounts::add_genesis_accounts, Base64Account};
use solana_ledger::{
blockstore::create_new_ledger, blockstore_db::AccessType, poh::compute_hashes_per_tick,
};
use solana_ledger::{blockstore::create_new_ledger, blockstore_db::AccessType};
use solana_runtime::hardened_unpack::MAX_GENESIS_ARCHIVE_UNPACKED_SIZE;
use solana_sdk::{
account::{Account, AccountSharedData, ReadableAccount, WritableAccount},

View File

@ -28,6 +28,7 @@ serde_bytes = "0.11"
serde_derive = "1.0.103"
solana-clap-utils = { path = "../clap-utils", version = "=1.8.0" }
solana-client = { path = "../client", version = "=1.8.0" }
solana-entry = { path = "../entry", version = "=1.8.0" }
solana-frozen-abi = { path = "../frozen-abi", version = "=1.8.0" }
solana-frozen-abi-macro = { path = "../frozen-abi/macro", version = "=1.8.0" }
solana-ledger = { path = "../ledger", version = "=1.8.0" }

View File

@ -287,7 +287,8 @@ impl Sanitize for DuplicateShred {
pub(crate) mod tests {
use super::*;
use rand::Rng;
use solana_ledger::{entry::Entry, shred::Shredder};
use solana_entry::entry::Entry;
use solana_ledger::shred::Shredder;
use solana_sdk::{hash, signature::Keypair, signature::Signer, system_transaction};
use std::sync::Arc;

View File

@ -26,6 +26,7 @@ serde_yaml = "0.8.17"
solana-clap-utils = { path = "../clap-utils", version = "=1.8.0" }
solana-cli-output = { path = "../cli-output", version = "=1.8.0" }
solana-core = { path = "../core", version = "=1.8.0" }
solana-entry = { path = "../entry", version = "=1.8.0" }
solana-ledger = { path = "../ledger", version = "=1.8.0" }
solana-logger = { path = "../logger", version = "=1.8.0" }
solana-measure = { path = "../measure", version = "=1.8.0" }

View File

@ -16,7 +16,7 @@ use solana_clap_utils::{
};
use solana_core::cost_model::CostModel;
use solana_core::cost_tracker::CostTracker;
use solana_ledger::entry::Entry;
use solana_entry::entry::Entry;
use solana_ledger::{
ancestor_iterator::AncestorIterator,
bank_forks_utils,

View File

@ -15,8 +15,6 @@ byteorder = "1.4.3"
chrono = { version = "0.4.11", features = ["serde"] }
chrono-humanize = "0.2.1"
crossbeam-channel = "0.5"
dlopen_derive = "0.1.4"
dlopen = "0.1.8"
ed25519-dalek = "1.0.1"
fs_extra = "1.2.0"
futures = "0.3.15"
@ -34,6 +32,7 @@ serde = "1.0.126"
serde_bytes = "0.11.5"
sha2 = "0.9.5"
solana-bpf-loader-program = { path = "../programs/bpf_loader", version = "=1.8.0" }
solana-entry = { path = "../entry", version = "=1.8.0" }
solana-frozen-abi = { path = "../frozen-abi", version = "=1.8.0" }
solana-frozen-abi-macro = { path = "../frozen-abi/macro", version = "=1.8.0" }
solana-transaction-status = { path = "../transaction-status", version = "=1.8.0" }

View File

@ -4,10 +4,10 @@ use crate::{
self, BlockstoreProcessorError, BlockstoreProcessorResult, CacheBlockMetaSender,
ProcessOptions, TransactionStatusSender,
},
entry::VerifyRecyclers,
leader_schedule_cache::LeaderScheduleCache,
};
use log::*;
use solana_entry::entry::VerifyRecyclers;
use solana_runtime::{
bank_forks::BankForks,
snapshot_config::SnapshotConfig,

View File

@ -8,7 +8,6 @@ use crate::{
IteratorMode, LedgerColumn, Result, WriteBatch,
},
blockstore_meta::*,
entry::{create_ticks, Entry},
erasure::ErasureConfig,
leader_schedule_cache::LeaderScheduleCache,
next_slots_iterator::NextSlotsIterator,
@ -22,6 +21,7 @@ use rayon::{
ThreadPool,
};
use rocksdb::DBRawIterator;
use solana_entry::entry::{create_ticks, Entry};
use solana_measure::measure::Measure;
use solana_metrics::{datapoint_debug, datapoint_error};
use solana_rayon_threadlimit::get_thread_count;
@ -3981,7 +3981,6 @@ fn adjust_ulimit_nofile(enforce_ulimit_nofile: bool) -> Result<()> {
pub mod tests {
use super::*;
use crate::{
entry::{next_entry, next_entry_mut},
genesis_utils::{create_genesis_config, GenesisConfigInfo},
leader_schedule::{FixedSchedule, LeaderSchedule},
shred::{max_ticks_per_n_shreds, DataShredHeader},
@ -3991,6 +3990,7 @@ pub mod tests {
use itertools::Itertools;
use rand::{seq::SliceRandom, thread_rng};
use solana_account_decoder::parse_token::UiTokenAmount;
use solana_entry::entry::{next_entry, next_entry_mut};
use solana_runtime::bank::{Bank, RewardType};
use solana_sdk::{
hash::{self, hash, Hash},

View File

@ -392,11 +392,9 @@ impl Blockstore {
#[cfg(test)]
pub mod tests {
use super::*;
use crate::{
blockstore::tests::make_slot_entries_with_transactions, entry::next_entry_mut,
get_tmp_ledger_path,
};
use crate::{blockstore::tests::make_slot_entries_with_transactions, get_tmp_ledger_path};
use bincode::serialize;
use solana_entry::entry::next_entry_mut;
use solana_sdk::{
hash::{hash, Hash},
message::Message,

View File

@ -1,10 +1,6 @@
use crate::{
block_error::BlockError,
blockstore::Blockstore,
blockstore_db::BlockstoreError,
blockstore_meta::SlotMeta,
entry::{create_ticks, Entry, EntrySlice, EntryType, EntryVerificationStatus, VerifyRecyclers},
leader_schedule_cache::LeaderScheduleCache,
block_error::BlockError, blockstore::Blockstore, blockstore_db::BlockstoreError,
blockstore_meta::SlotMeta, leader_schedule_cache::LeaderScheduleCache,
};
use chrono_humanize::{Accuracy, HumanTime, Tense};
use crossbeam_channel::Sender;
@ -12,6 +8,9 @@ use itertools::Itertools;
use log::*;
use rand::{seq::SliceRandom, thread_rng};
use rayon::{prelude::*, ThreadPool};
use solana_entry::entry::{
create_ticks, Entry, EntrySlice, EntryType, EntryVerificationStatus, VerifyRecyclers,
};
use solana_measure::measure::Measure;
use solana_metrics::{datapoint_error, inc_new_counter_debug};
use solana_rayon_threadlimit::get_thread_count;
@ -1305,15 +1304,13 @@ pub fn fill_blockstore_slot_with_ticks(
#[cfg(test)]
pub mod tests {
use super::*;
use crate::{
entry::{create_ticks, next_entry, next_entry_mut},
genesis_utils::{
create_genesis_config, create_genesis_config_with_leader, GenesisConfigInfo,
},
use crate::genesis_utils::{
create_genesis_config, create_genesis_config_with_leader, GenesisConfigInfo,
};
use crossbeam_channel::unbounded;
use matches::assert_matches;
use rand::{thread_rng, Rng};
use solana_entry::entry::{create_ticks, next_entry, next_entry_mut};
use solana_runtime::genesis_utils::{
self, create_genesis_config_with_vote_accounts, ValidatorVoteKeypairs,
};

View File

@ -14,14 +14,12 @@ pub mod blockstore_db;
pub mod blockstore_meta;
pub mod blockstore_processor;
pub mod builtins;
pub mod entry;
pub mod erasure;
pub mod genesis_utils;
pub mod leader_schedule;
pub mod leader_schedule_cache;
pub mod leader_schedule_utils;
pub mod next_slots_iterator;
pub mod poh;
pub mod rooted_slot_iterator;
pub mod shred;
pub mod sigverify_shreds;

View File

@ -49,11 +49,7 @@
//! So, given a) - c), we must restrict data shred's payload length such that the entire coding
//! payload can fit into one coding shred / packet.
use crate::{
blockstore::MAX_DATA_SHREDS_PER_SLOT,
entry::{create_ticks, Entry},
erasure::Session,
};
use crate::{blockstore::MAX_DATA_SHREDS_PER_SLOT, erasure::Session};
use bincode::config::Options;
use core::cell::RefCell;
use rayon::{
@ -62,6 +58,7 @@ use rayon::{
ThreadPool,
};
use serde::{Deserialize, Serialize};
use solana_entry::entry::{create_ticks, Entry};
use solana_measure::measure::Measure;
use solana_perf::packet::{limited_deserialize, Packet};
use solana_rayon_threadlimit::get_thread_count;

View File

@ -1,4 +1,4 @@
use solana_ledger::entry;
use solana_entry::entry;
use solana_ledger::{
blockstore::{self, Blockstore},
get_tmp_ledger_path,

View File

@ -1,5 +1,5 @@
#![allow(clippy::integer_arithmetic)]
use solana_ledger::entry::Entry;
use solana_entry::entry::Entry;
use solana_ledger::shred::{
max_entries_per_n_shred, verify_test_data_shred, Shred, Shredder,
MAX_DATA_SHREDS_PER_FEC_BLOCK, SIZE_OF_DATA_SHRED_PAYLOAD,

View File

@ -21,6 +21,7 @@ solana-config-program = { path = "../programs/config", version = "=1.8.0" }
solana-core = { path = "../core", version = "=1.8.0" }
solana-client = { path = "../client", version = "=1.8.0" }
solana-download-utils = { path = "../download-utils", version = "=1.8.0" }
solana-entry = { path = "../entry", version = "=1.8.0" }
solana-faucet = { path = "../faucet", version = "=1.8.0" }
solana-gossip = { path = "../gossip", version = "=1.8.0" }
solana-ledger = { path = "../ledger", version = "=1.8.0" }

View File

@ -7,6 +7,7 @@ use rand::{thread_rng, Rng};
use rayon::prelude::*;
use solana_client::thin_client::create_client;
use solana_core::consensus::VOTE_THRESHOLD_DEPTH;
use solana_entry::entry::{Entry, EntrySlice};
use solana_gossip::{
cluster_info::{self, VALIDATOR_PORT_RANGE},
contact_info::ContactInfo,
@ -14,10 +15,7 @@ use solana_gossip::{
gossip_error::GossipError,
gossip_service::discover_cluster,
};
use solana_ledger::{
blockstore::Blockstore,
entry::{Entry, EntrySlice},
};
use solana_ledger::blockstore::Blockstore;
use solana_sdk::{
client::SyncClient,
clock::{self, Slot, NUM_CONSECUTIVE_LEADER_SLOTS},

View File

@ -13,7 +13,6 @@ edition = "2018"
[dependencies]
log = "0.4.14"
solana-sdk = { path = "../sdk", version = "=1.8.0" }
solana-metrics = { path = "../metrics", version = "=1.8.0" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@ -14,7 +14,7 @@ log = "0.4.14"
rand = "0.7.0"
rayon = "1.5.1"
solana-logger = { path = "../logger", version = "=1.8.0" }
solana-ledger = { path = "../ledger", version = "=1.8.0" }
solana-entry = { path = "../entry", version = "=1.8.0" }
solana-sdk = { path = "../sdk", version = "=1.8.0" }
solana-clap-utils = { path = "../clap-utils", version = "=1.8.0" }
solana-measure = { path = "../measure", version = "=1.8.0" }

View File

@ -1,9 +1,9 @@
#![allow(clippy::integer_arithmetic)]
use clap::{crate_description, crate_name, value_t, App, Arg};
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
use solana_ledger::entry::{self, create_ticks, init_poh, EntrySlice, VerifyRecyclers};
use solana_entry::entry::{self, create_ticks, init_poh, EntrySlice, VerifyRecyclers};
#[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))]
use solana_ledger::entry::{create_ticks, init_poh, EntrySlice, VerifyRecyclers};
use solana_entry::entry::{create_ticks, init_poh, EntrySlice, VerifyRecyclers};
use solana_measure::measure::Measure;
use solana_perf::perf_libs;
use solana_sdk::hash::hash;

View File

@ -13,6 +13,7 @@ edition = "2018"
core_affinity = "0.5.10"
crossbeam-channel = "0.5"
log = "0.4.14"
solana-entry = { path = "../entry", version = "=1.8.0" }
solana-ledger = { path = "../ledger", version = "=1.8.0" }
solana-measure = { path = "../measure", version = "=1.8.0" }
solana-metrics = { path = "../metrics", version = "=1.8.0" }

View File

@ -4,7 +4,7 @@
extern crate test;
use {
solana_ledger::poh::Poh,
solana_entry::poh::Poh,
solana_poh::poh_service::DEFAULT_HASHES_PER_BATCH,
solana_sdk::hash::Hash,
std::sync::{

View File

@ -2,7 +2,7 @@
extern crate test;
use {
solana_ledger::entry::{next_entry_mut, Entry, EntrySlice},
solana_entry::entry::{next_entry_mut, Entry, EntrySlice},
solana_sdk::{
hash::{hash, Hash},
signature::{Keypair, Signer},

View File

@ -17,9 +17,8 @@ use {
unbounded, Receiver as CrossbeamReceiver, RecvTimeoutError, Sender as CrossbeamSender,
},
log::*,
solana_ledger::{
blockstore::Blockstore, entry::Entry, leader_schedule_cache::LeaderScheduleCache, poh::Poh,
},
solana_entry::{entry::Entry, poh::Poh},
solana_ledger::{blockstore::Blockstore, leader_schedule_cache::LeaderScheduleCache},
solana_runtime::bank::Bank,
solana_sdk::{
clock::NUM_CONSECUTIVE_LEADER_SLOTS, hash::Hash, poh_config::PohConfig, pubkey::Pubkey,

View File

@ -4,7 +4,7 @@ use {
crate::poh_recorder::{PohRecorder, Record},
crossbeam_channel::Receiver,
log::*,
solana_ledger::poh::Poh,
solana_entry::poh::Poh,
solana_measure::measure::Measure,
solana_sdk::poh_config::PohConfig,
std::{

View File

@ -3177,7 +3177,6 @@ name = "solana-measure"
version = "1.8.0"
dependencies = [
"log",
"solana-metrics",
"solana-sdk",
]

View File

@ -29,6 +29,7 @@ serde_derive = "1.0.103"
serde_json = "1.0.56"
solana-account-decoder = { path = "../account-decoder", version = "=1.8.0" }
solana-client = { path = "../client", version = "=1.8.0" }
solana-entry = { path = "../entry", version = "=1.8.0" }
solana-faucet = { path = "../faucet", version = "=1.8.0" }
solana-gossip = { path = "../gossip", version = "=1.8.0" }
solana-ledger = { path = "../ledger", version = "=1.8.0" }

View File

@ -3852,12 +3852,12 @@ pub fn create_test_transactions_and_populate_blockstore(
let success_tx =
solana_sdk::system_transaction::transfer(mint_keypair, &keypair1.pubkey(), 2, blockhash);
let success_signature = success_tx.signatures[0];
let entry_1 = solana_ledger::entry::next_entry(&blockhash, 1, vec![success_tx]);
let entry_1 = solana_entry::entry::next_entry(&blockhash, 1, vec![success_tx]);
// Failed transaction, InstructionError
let ix_error_tx =
solana_sdk::system_transaction::transfer(keypair2, &keypair3.pubkey(), 10, blockhash);
let ix_error_signature = ix_error_tx.signatures[0];
let entry_2 = solana_ledger::entry::next_entry(&entry_1.hash, 1, vec![ix_error_tx]);
let entry_2 = solana_entry::entry::next_entry(&entry_1.hash, 1, vec![ix_error_tx]);
// Failed transaction
let fail_tx = solana_sdk::system_transaction::transfer(
mint_keypair,
@ -3865,7 +3865,7 @@ pub fn create_test_transactions_and_populate_blockstore(
2,
Hash::default(),
);
let entry_3 = solana_ledger::entry::next_entry(&entry_2.hash, 1, vec![fail_tx]);
let entry_3 = solana_entry::entry::next_entry(&entry_2.hash, 1, vec![fail_tx]);
let mut entries = vec![entry_1, entry_2, entry_3];
let shreds = solana_ledger::blockstore::entries_to_test_shreds(

View File

@ -44,7 +44,6 @@ use crate::{
blockhash_queue::BlockhashQueue,
builtins::{self, ActivationType},
epoch_stakes::{EpochStakes, NodeVoteAccounts},
hashed_transaction::{HashedTransaction, HashedTransactionSlice},
inline_spl_token_v2_0,
instruction_recorder::InstructionRecorder,
log_collector::LogCollector,
@ -85,6 +84,7 @@ use solana_sdk::{
genesis_config::{ClusterType, GenesisConfig},
hard_forks::HardForks,
hash::{extend_and_hash, hashv, Hash},
hashed_transaction::{HashedTransaction, HashedTransactionSlice},
incinerator,
inflation::Inflation,
instruction::CompiledInstruction,

View File

@ -1,10 +1,9 @@
use crate::{
bank::{Bank, TransactionResults},
genesis_utils::{self, GenesisConfigInfo, ValidatorVoteKeypairs},
hashed_transaction::HashedTransaction,
vote_sender_types::ReplayVoteSender,
};
use solana_sdk::{pubkey::Pubkey, signature::Signer};
use solana_sdk::{hashed_transaction::HashedTransaction, pubkey::Pubkey, signature::Signer};
use solana_vote_program::vote_transaction;
pub fn setup_bank_and_vote_pubkeys(num_vote_accounts: usize, stake: u64) -> (Bank, Vec<Pubkey>) {

View File

@ -20,7 +20,6 @@ pub mod contains;
pub mod epoch_stakes;
pub mod genesis_utils;
pub mod hardened_unpack;
pub mod hashed_transaction;
pub mod inline_spl_token_v2_0;
pub mod instruction_recorder;
pub mod loader_utils;

View File

@ -1,5 +1,5 @@
use crate::bank::Bank;
use crate::hashed_transaction::HashedTransaction;
use solana_sdk::hashed_transaction::HashedTransaction;
use solana_sdk::transaction::{Result, Transaction};
use std::borrow::Cow;

View File

@ -1,4 +1,6 @@
use solana_sdk::{hash::Hash, transaction::Transaction};
#![cfg(feature = "full")]
use crate::{hash::Hash, transaction::Transaction};
use std::borrow::Cow;
/// Transaction and the hash of its message

View File

@ -26,6 +26,7 @@ pub mod feature_set;
pub mod genesis_config;
pub mod hard_forks;
pub mod hash;
pub mod hashed_transaction;
pub mod inflation;
pub mod keyed_account;
pub mod log;

View File

@ -33,6 +33,7 @@ solana-cli-config = { path = "../cli-config", version = "=1.8.0" }
solana-client = { path = "../client", version = "=1.8.0" }
solana-core = { path = "../core", version = "=1.8.0" }
solana-download-utils = { path = "../download-utils", version = "=1.8.0" }
solana-entry = { path = "../entry", version = "=1.8.0" }
solana-faucet = { path = "../faucet", version = "=1.8.0" }
solana-genesis-utils = { path = "../genesis-utils", version = "=1.8.0" }
solana-gossip = { path = "../gossip", version = "=1.8.0" }

View File

@ -2620,7 +2620,7 @@ pub fn main() {
solana_perf::perf_libs::init_cuda();
enable_recycler_warming();
}
solana_ledger::entry::init_poh();
solana_entry::entry::init_poh();
solana_runtime::snapshot_utils::remove_tmp_snapshot_archives(&snapshot_output_dir);
let identity_keypair = Arc::new(identity_keypair);