Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove solana-sdk from most of send-transaction-service #4359

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion programs/sbf/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion send-transaction-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,30 @@ itertools = { workspace = true }
log = { workspace = true }
solana-client = { workspace = true }
solana-connection-cache = { workspace = true }
solana-hash = { workspace = true }
solana-keypair = { workspace = true }
solana-measure = { workspace = true }
solana-metrics = { workspace = true }
solana-nonce-account = { workspace = true }
solana-pubkey = { workspace = true }
solana-quic-client = { workspace = true }
solana-runtime = { workspace = true }
solana-sdk = { workspace = true }
solana-signature = { workspace = true }
solana-time-utils = { workspace = true }
solana-tpu-client-next = { workspace = true }
tokio = { workspace = true, features = ["full"] }
tokio-util = { workspace = true }

[dev-dependencies]
solana-account = { workspace = true }
solana-fee-calculator = { workspace = true }
solana-logger = { workspace = true }
solana-nonce = { workspace = true }
solana-runtime = { workspace = true, features = ["dev-context-only-utils"] }
solana-sdk = { workspace = true }
solana-sdk-ids = { workspace = true }
solana-signer = { workspace = true }
solana-system-transaction = { workspace = true }

[features]
dev-context-only-utils = []
Expand Down
33 changes: 17 additions & 16 deletions send-transaction-service/src/send_transaction_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ use {
crossbeam_channel::{Receiver, RecvTimeoutError},
itertools::Itertools,
log::*,
solana_hash::Hash,
solana_nonce_account as nonce_account,
solana_pubkey::Pubkey,
solana_runtime::{bank::Bank, bank_forks::BankForks},
solana_sdk::{
hash::Hash, nonce_account, pubkey::Pubkey, saturating_add_assign, signature::Signature,
},
solana_signature::Signature,
std::{
collections::{
hash_map::{Entry, HashMap},
Expand Down Expand Up @@ -271,7 +272,8 @@ impl SendTransactionService {
break;
} else {
transaction_info.last_sent_time = Some(last_sent_time);
saturating_add_assign!(transactions_added_to_retry, 1);
transactions_added_to_retry =
transactions_added_to_retry.saturating_add(1);
entry.or_insert(transaction_info);
}
}
Expand Down Expand Up @@ -480,14 +482,13 @@ mod test {
transaction_client::{ConnectionCacheClient, TpuClientNextClient},
},
crossbeam_channel::{bounded, unbounded},
solana_sdk::{
account::AccountSharedData,
genesis_config::create_genesis_config,
nonce::{self, state::DurableNonce},
pubkey::Pubkey,
signature::Signer,
system_program, system_transaction,
},
solana_account::AccountSharedData,
solana_nonce::{self as nonce, state::DurableNonce},
solana_pubkey::Pubkey,
solana_sdk::genesis_config::create_genesis_config,
solana_sdk_ids::system_program,
solana_signer::Signer,
solana_system_transaction as system_transaction,
std::ops::Sub,
tokio::runtime::Handle,
};
Expand Down Expand Up @@ -570,7 +571,7 @@ mod test {
solana_logger::setup();

let (mut genesis_config, mint_keypair) = create_genesis_config(4);
genesis_config.fee_rate_governor = solana_sdk::fee_calculator::FeeRateGovernor::new(0, 0);
genesis_config.fee_rate_governor = solana_fee_calculator::FeeRateGovernor::new(0, 0);
let (_, bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config);

let leader_forward_count = 1;
Expand Down Expand Up @@ -866,7 +867,7 @@ mod test {
solana_logger::setup();

let (mut genesis_config, mint_keypair) = create_genesis_config(4);
genesis_config.fee_rate_governor = solana_sdk::fee_calculator::FeeRateGovernor::new(0, 0);
genesis_config.fee_rate_governor = solana_fee_calculator::FeeRateGovernor::new(0, 0);
let (_, bank_forks) = Bank::new_with_bank_forks_for_tests(&genesis_config);
let leader_forward_count = 1;
let config = Config::default();
Expand All @@ -888,7 +889,7 @@ mod test {

let nonce_address = Pubkey::new_unique();
let durable_nonce = DurableNonce::from_blockhash(&Hash::new_unique());
let nonce_state = nonce::state::Versions::new(nonce::State::Initialized(
let nonce_state = nonce::versions::Versions::new(nonce::state::State::Initialized(
nonce::state::Data::new(Pubkey::default(), durable_nonce, 42),
));
let nonce_account =
Expand Down Expand Up @@ -1158,7 +1159,7 @@ mod test {
transaction.last_sent_time = Some(Instant::now().sub(Duration::from_millis(4000)));
}
let new_durable_nonce = DurableNonce::from_blockhash(&Hash::new_unique());
let new_nonce_state = nonce::state::Versions::new(nonce::State::Initialized(
let new_nonce_state = nonce::versions::Versions::new(nonce::state::State::Initialized(
nonce::state::Data::new(Pubkey::default(), new_durable_nonce, 42),
));
let nonce_account =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use {
solana_sdk::timing::AtomicInterval,
solana_time_utils::AtomicInterval,
std::sync::atomic::{AtomicU64, Ordering},
};

Expand Down
2 changes: 1 addition & 1 deletion send-transaction-service/src/transaction_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use {
log::warn,
solana_client::connection_cache::{ConnectionCache, Protocol},
solana_connection_cache::client_connection::ClientConnection as TpuConnection,
solana_keypair::Keypair,
solana_measure::measure::Measure,
solana_sdk::signature::Keypair,
solana_tpu_client_next::{
connection_workers_scheduler::{
ConnectionWorkersSchedulerConfig, Fanout, TransactionStatsAndReceiver,
Expand Down
7 changes: 6 additions & 1 deletion svm/examples/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading