setting solana version v1.15, adding identity in config
This commit is contained in:
parent
1cada13396
commit
d3acc5ac4f
File diff suppressed because it is too large
Load Diff
25
Cargo.toml
25
Cargo.toml
|
@ -27,18 +27,19 @@ serde_yaml = "0.8.23"
|
|||
mango = { git = "https://github.com/blockworks-foundation/mango-v3.git", branch = "mango_bencher_compatible", default-features = false, features = ["no-entrypoint"] }
|
||||
mango-common = { git = "https://github.com/blockworks-foundation/mango-v3.git", branch = "mango_bencher_compatible" }
|
||||
|
||||
solana-client = { git = "https://github.com/solana-labs/solana.git", branch="v1.14" }
|
||||
solana-core = { git = "https://github.com/solana-labs/solana.git", branch="v1.14" }
|
||||
solana-metrics = { git = "https://github.com/solana-labs/solana.git", branch="v1.14" }
|
||||
solana-rpc = { git = "https://github.com/solana-labs/solana.git", branch="v1.14" }
|
||||
solana-runtime = { git = "https://github.com/solana-labs/solana.git", branch="v1.14" }
|
||||
solana-sdk = { git = "https://github.com/solana-labs/solana.git", branch="v1.14" }
|
||||
solana-clap-utils = { git = "https://github.com/solana-labs/solana.git", branch="v1.14" }
|
||||
solana-cli-config = { git = "https://github.com/solana-labs/solana.git", branch="v1.14" }
|
||||
solana-net-utils = { git = "https://github.com/solana-labs/solana.git", branch="v1.14" }
|
||||
solana-version = { git = "https://github.com/solana-labs/solana.git", branch="v1.14" }
|
||||
solana-logger = { git = "https://github.com/solana-labs/solana.git", branch="v1.14" }
|
||||
solana-transaction-status = { git = "https://github.com/solana-labs/solana.git", branch="v1.14" }
|
||||
solana-client = { git = "https://github.com/solana-labs/solana.git", branch="v1.15" }
|
||||
solana-core = { git = "https://github.com/solana-labs/solana.git", branch="v1.15" }
|
||||
solana-metrics = { git = "https://github.com/solana-labs/solana.git", branch="v1.15" }
|
||||
solana-rpc = { git = "https://github.com/solana-labs/solana.git", branch="v1.15" }
|
||||
solana-runtime = { git = "https://github.com/solana-labs/solana.git", branch="v1.15" }
|
||||
solana-sdk = { git = "https://github.com/solana-labs/solana.git", branch="v1.15" }
|
||||
solana-clap-utils = { git = "https://github.com/solana-labs/solana.git", branch="v1.15" }
|
||||
solana-cli-config = { git = "https://github.com/solana-labs/solana.git", branch="v1.15" }
|
||||
solana-net-utils = { git = "https://github.com/solana-labs/solana.git", branch="v1.15" }
|
||||
solana-version = { git = "https://github.com/solana-labs/solana.git", branch="v1.15" }
|
||||
solana-logger = { git = "https://github.com/solana-labs/solana.git", branch="v1.15" }
|
||||
solana-transaction-status = { git = "https://github.com/solana-labs/solana.git", branch="v1.15" }
|
||||
solana-quic-client = { git = "https://github.com/solana-labs/solana.git", branch="v1.15" }
|
||||
|
||||
thiserror = "1.0"
|
||||
solana-program = ">=1.9.0"
|
||||
|
|
22
src/main.rs
22
src/main.rs
|
@ -13,8 +13,9 @@ use solana_bench_mango::{
|
|||
states::{BlockData, PerpMarketCache, TransactionConfirmRecord, TransactionSendRecord},
|
||||
};
|
||||
use solana_client::{
|
||||
connection_cache::ConnectionCache, rpc_client::RpcClient, tpu_client::TpuClient,
|
||||
rpc_client::RpcClient, tpu_client::TpuClient, connection_cache::ConnectionCache,
|
||||
};
|
||||
use solana_quic_client::{QuicPool, QuicConnectionManager, QuicConfig};
|
||||
use solana_sdk::commitment_config::CommitmentConfig;
|
||||
|
||||
use std::{
|
||||
|
@ -23,7 +24,7 @@ use std::{
|
|||
atomic::{AtomicBool, AtomicU64, Ordering},
|
||||
Arc, RwLock,
|
||||
},
|
||||
thread::{Builder, JoinHandle},
|
||||
thread::{Builder, JoinHandle}, net::{IpAddr, Ipv4Addr},
|
||||
};
|
||||
|
||||
fn main() {
|
||||
|
@ -76,15 +77,28 @@ fn main() {
|
|||
))
|
||||
});
|
||||
|
||||
let tpu_client_pool = Arc::new(RotatingQueue::<Arc<TpuClient>>::new(
|
||||
let connection_cache = ConnectionCache::new_with_client_options(
|
||||
4,
|
||||
None,
|
||||
Some((id, IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)))),
|
||||
None,
|
||||
);
|
||||
let quic_connection_cache = if let ConnectionCache::Quic(connection_cache) = connection_cache {
|
||||
Some(connection_cache)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let tpu_client_pool = Arc::new(RotatingQueue::<Arc<TpuClient<QuicPool, QuicConnectionManager, QuicConfig>>>::new(
|
||||
number_of_tpu_clients,
|
||||
|| {
|
||||
let quic_connection_cache = quic_connection_cache.clone();
|
||||
Arc::new(
|
||||
TpuClient::new_with_connection_cache(
|
||||
rpc_clients.get().clone(),
|
||||
&websocket_url,
|
||||
solana_client::tpu_client::TpuClientConfig::default(),
|
||||
Arc::new(ConnectionCache::default()),
|
||||
quic_connection_cache.unwrap(),
|
||||
)
|
||||
.unwrap(),
|
||||
)
|
||||
|
|
|
@ -17,6 +17,7 @@ use mango::{
|
|||
};
|
||||
use solana_client::tpu_client::TpuClient;
|
||||
use solana_program::pubkey::Pubkey;
|
||||
use solana_quic_client::{QuicPool, QuicConnectionManager, QuicConfig};
|
||||
use solana_sdk::{
|
||||
hash::Hash, instruction::Instruction, message::Message, signature::Keypair, signer::Signer,
|
||||
transaction::Transaction,
|
||||
|
@ -119,7 +120,7 @@ pub fn send_mm_transactions(
|
|||
quotes_per_second: u64,
|
||||
perp_market_caches: &Vec<PerpMarketCache>,
|
||||
tx_record_sx: &Sender<TransactionSendRecord>,
|
||||
tpu_client_pool: Arc<RotatingQueue<Arc<TpuClient>>>,
|
||||
tpu_client_pool: Arc<RotatingQueue<Arc<TpuClient<QuicPool, QuicConnectionManager, QuicConfig>>>>,
|
||||
mango_account_pk: Pubkey,
|
||||
mango_account_signer: &Keypair,
|
||||
blockhash: Arc<RwLock<Hash>>,
|
||||
|
@ -158,7 +159,7 @@ pub fn send_mm_transactions_batched(
|
|||
quotes_per_second: u64,
|
||||
perp_market_caches: &Vec<PerpMarketCache>,
|
||||
tx_record_sx: &Sender<TransactionSendRecord>,
|
||||
tpu_client_pool: Arc<RotatingQueue<Arc<TpuClient>>>,
|
||||
tpu_client_pool: Arc<RotatingQueue<Arc<TpuClient<QuicPool, QuicConnectionManager, QuicConfig>>>>,
|
||||
mango_account_pk: Pubkey,
|
||||
mango_account_signer: &Keypair,
|
||||
blockhash: Arc<RwLock<Hash>>,
|
||||
|
@ -219,7 +220,7 @@ pub fn start_market_making_threads(
|
|||
exit_signal: Arc<AtomicBool>,
|
||||
blockhash: Arc<RwLock<Hash>>,
|
||||
current_slot: Arc<AtomicU64>,
|
||||
tpu_client_pool: Arc<RotatingQueue<Arc<TpuClient>>>,
|
||||
tpu_client_pool: Arc<RotatingQueue<Arc<TpuClient<QuicPool, QuicConnectionManager, QuicConfig>>>>,
|
||||
duration: &Duration,
|
||||
quotes_per_second: u64,
|
||||
txs_batch_size: Option<usize>,
|
||||
|
|
Loading…
Reference in New Issue