Move gossip modules into solana-gossip crate (#17352)
* Move gossip modules to solana-gossip * Update Protocol abi digest due to move * Move gossip benches and hook up CI * Remove unneeded Result entries * Single use statements
This commit is contained in:
@ -21,8 +21,9 @@ solana-config-program = { path = "../programs/config", version = "=1.7.0" }
|
||||
solana-core = { path = "../core", version = "=1.7.0" }
|
||||
solana-client = { path = "../client", version = "=1.7.0" }
|
||||
solana-download-utils = { path = "../download-utils", version = "=1.7.0" }
|
||||
solana-faucet = { path = "../faucet", version = "=1.7.0" }
|
||||
solana-exchange-program = { path = "../programs/exchange", version = "=1.7.0" }
|
||||
solana-faucet = { path = "../faucet", version = "=1.7.0" }
|
||||
solana-gossip = { path = "../gossip", version = "=1.7.0" }
|
||||
solana-ledger = { path = "../ledger", version = "=1.7.0" }
|
||||
solana-logger = { path = "../logger", version = "=1.7.0" }
|
||||
solana-runtime = { path = "../runtime", version = "=1.7.0" }
|
||||
|
@ -1,7 +1,7 @@
|
||||
use solana_client::thin_client::ThinClient;
|
||||
use solana_core::contact_info::ContactInfo;
|
||||
use solana_core::validator::Validator;
|
||||
use solana_core::validator::ValidatorConfig;
|
||||
use solana_gossip::{cluster_info::Node, contact_info::ContactInfo};
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
use solana_sdk::signature::Keypair;
|
||||
use std::path::PathBuf;
|
||||
@ -44,10 +44,10 @@ pub trait Cluster {
|
||||
&mut self,
|
||||
pubkey: &Pubkey,
|
||||
cluster_validator_info: &mut ClusterValidatorInfo,
|
||||
) -> (solana_core::cluster_info::Node, Option<ContactInfo>);
|
||||
) -> (Node, Option<ContactInfo>);
|
||||
fn restart_node_with_context(
|
||||
cluster_validator_info: ClusterValidatorInfo,
|
||||
restart_context: (solana_core::cluster_info::Node, Option<ContactInfo>),
|
||||
restart_context: (Node, Option<ContactInfo>),
|
||||
) -> ClusterValidatorInfo;
|
||||
fn add_node(&mut self, pubkey: &Pubkey, cluster_validator_info: ClusterValidatorInfo);
|
||||
fn exit_restart_node(&mut self, pubkey: &Pubkey, config: ValidatorConfig);
|
||||
|
@ -6,10 +6,10 @@ use log::*;
|
||||
use rand::{thread_rng, Rng};
|
||||
use rayon::prelude::*;
|
||||
use solana_client::thin_client::create_client;
|
||||
use solana_core::consensus::VOTE_THRESHOLD_DEPTH;
|
||||
use solana_core::validator::ValidatorExit;
|
||||
use solana_core::{
|
||||
cluster_info::VALIDATOR_PORT_RANGE, consensus::VOTE_THRESHOLD_DEPTH, contact_info::ContactInfo,
|
||||
gossip_service::discover_cluster,
|
||||
use solana_gossip::{
|
||||
cluster_info::VALIDATOR_PORT_RANGE, contact_info::ContactInfo, gossip_service::discover_cluster,
|
||||
};
|
||||
use solana_ledger::{
|
||||
blockstore::Blockstore,
|
||||
|
@ -6,11 +6,11 @@ use crate::{
|
||||
use itertools::izip;
|
||||
use log::*;
|
||||
use solana_client::thin_client::{create_client, ThinClient};
|
||||
use solana_core::{
|
||||
use solana_core::validator::{Validator, ValidatorConfig, ValidatorStartProgress};
|
||||
use solana_gossip::{
|
||||
cluster_info::{Node, VALIDATOR_PORT_RANGE},
|
||||
contact_info::ContactInfo,
|
||||
gossip_service::discover_cluster,
|
||||
validator::{Validator, ValidatorConfig, ValidatorStartProgress},
|
||||
};
|
||||
use solana_ledger::create_new_tmp_ledger;
|
||||
use solana_runtime::genesis_utils::{
|
||||
@ -628,7 +628,7 @@ impl Cluster for LocalCluster {
|
||||
&mut self,
|
||||
pubkey: &Pubkey,
|
||||
cluster_validator_info: &mut ClusterValidatorInfo,
|
||||
) -> (solana_core::cluster_info::Node, Option<ContactInfo>) {
|
||||
) -> (Node, Option<ContactInfo>) {
|
||||
// Update the stored ContactInfo for this node
|
||||
let node = Node::new_localhost_with_pubkey(&pubkey);
|
||||
cluster_validator_info.info.contact_info = node.info.clone();
|
||||
|
@ -13,14 +13,16 @@ use solana_client::{
|
||||
};
|
||||
use solana_core::{
|
||||
broadcast_stage::BroadcastStageType,
|
||||
cluster_info::{self, VALIDATOR_PORT_RANGE},
|
||||
consensus::{Tower, SWITCH_FORK_THRESHOLD, VOTE_THRESHOLD_DEPTH},
|
||||
crds_value::{self, CrdsData, CrdsValue},
|
||||
gossip_service::discover_cluster,
|
||||
optimistic_confirmation_verifier::OptimisticConfirmationVerifier,
|
||||
validator::ValidatorConfig,
|
||||
};
|
||||
use solana_download_utils::{download_snapshot, DownloadProgressRecord};
|
||||
use solana_gossip::{
|
||||
cluster_info::{self, VALIDATOR_PORT_RANGE},
|
||||
crds_value::{self, CrdsData, CrdsValue},
|
||||
gossip_service::discover_cluster,
|
||||
};
|
||||
use solana_ledger::{
|
||||
ancestor_iterator::AncestorIterator,
|
||||
blockstore::{Blockstore, PurgeType},
|
||||
@ -1393,7 +1395,7 @@ fn test_mainnet_beta_cluster_type() {
|
||||
|
||||
let client = create_client(
|
||||
cluster.entry_point_info.client_facing_addr(),
|
||||
solana_core::cluster_info::VALIDATOR_PORT_RANGE,
|
||||
VALIDATOR_PORT_RANGE,
|
||||
);
|
||||
|
||||
// Programs that are available at epoch 0
|
||||
|
Reference in New Issue
Block a user