Skip to content

split bin and lib targets of solana-faucet out to separate crates #6326

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

Open
wants to merge 3 commits 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
37 changes: 24 additions & 13 deletions Cargo.lock

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

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ members = [
"dos",
"download-utils",
"entry",
"faucet",
"faucet-bin",
"faucet-interface",
"feature-set",
"fee",
"genesis",
Expand Down Expand Up @@ -434,7 +435,7 @@ solana-epoch-rewards = "2.2.1"
solana-epoch-rewards-hasher = "2.2.1"
solana-epoch-schedule = "2.2.1"
solana-example-mocks = "2.2.1"
solana-faucet = { path = "faucet", version = "=2.3.0" }
solana-faucet-interface = { path = "faucet-interface", version = "=2.3.0" }
solana-feature-gate-client = "0.0.2"
solana-feature-gate-interface = "2.2.2"
solana-fee-calculator = "2.2.1"
Expand Down
2 changes: 1 addition & 1 deletion accounts-cluster-bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ spl-token = { workspace = true, features = ["no-entrypoint"] }
[dev-dependencies]
solana-accounts-db = { workspace = true }
solana-core = { workspace = true, features = ["dev-context-only-utils"] }
solana-faucet = { workspace = true }
solana-faucet-interface = { workspace = true }
solana-local-cluster = { workspace = true }
solana-native-token = { workspace = true }
solana-poh-config = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion accounts-cluster-bench/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1410,7 +1410,7 @@ pub mod test {
accounts_index::{AccountIndex, AccountSecondaryIndexes},
},
solana_core::validator::ValidatorConfig,
solana_faucet::faucet::run_local_faucet,
solana_faucet_interface::faucet::run_local_faucet,
solana_local_cluster::{
local_cluster::{ClusterConfig, LocalCluster},
validator_configs::make_identical_validator_configs,
Expand Down
2 changes: 1 addition & 1 deletion bench-tps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ solana-commitment-config = { workspace = true }
solana-compute-budget-interface = { workspace = true }
solana-connection-cache = { workspace = true }
solana-core = { workspace = true, features = ["dev-context-only-utils"] }
solana-faucet = { workspace = true }
solana-faucet-interface = { workspace = true }
solana-fee-calculator = { workspace = true }
solana-genesis = { workspace = true }
solana-genesis-config = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion bench-tps/tests/bench_tps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use {
solana_commitment_config::CommitmentConfig,
solana_connection_cache::connection_cache::NewConnectionConfig,
solana_core::validator::ValidatorConfig,
solana_faucet::faucet::run_local_faucet,
solana_faucet_interface::faucet::run_local_faucet,
solana_fee_calculator::FeeRateGovernor,
solana_keypair::Keypair,
solana_local_cluster::{
Expand Down
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ tiny-bip39 = { workspace = true }

[dev-dependencies]
assert_matches = { workspace = true }
solana-faucet = { workspace = true }
solana-faucet-interface = { workspace = true }
solana-nonce-account = { workspace = true }
solana-presigner = { workspace = true }
solana-rpc = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/address_lookup_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use {
cli::{process_command, CliCommand, CliConfig},
},
solana_cli_output::{CliAddressLookupTable, CliAddressLookupTableCreated, OutputFormat},
solana_faucet::faucet::run_local_faucet,
solana_faucet_interface::faucet::run_local_faucet,
solana_keypair::Keypair,
solana_native_token::LAMPORTS_PER_SOL,
solana_pubkey::Pubkey,
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/cluster_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use {
test_utils::check_ready,
},
solana_commitment_config::CommitmentConfig,
solana_faucet::faucet::run_local_faucet,
solana_faucet_interface::faucet::run_local_faucet,
solana_fee_structure::FeeStructure,
solana_keypair::Keypair,
solana_native_token::sol_to_lamports,
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/nonce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use {
},
solana_cli_output::{parse_sign_only_reply_string, OutputFormat},
solana_commitment_config::CommitmentConfig,
solana_faucet::faucet::run_local_faucet,
solana_faucet_interface::faucet::run_local_faucet,
solana_hash::Hash,
solana_keypair::{keypair_from_seed, Keypair},
solana_native_token::sol_to_lamports,
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use {
solana_client::rpc_config::RpcSendTransactionConfig,
solana_commitment_config::CommitmentConfig,
solana_compute_budget_interface::ComputeBudgetInstruction,
solana_faucet::faucet::run_local_faucet,
solana_faucet_interface::faucet::run_local_faucet,
solana_fee_calculator::FeeRateGovernor,
solana_keypair::Keypair,
solana_loader_v3_interface::state::UpgradeableLoaderState,
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/request_airdrop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use {
solana_cli::cli::{process_command, CliCommand, CliConfig},
solana_commitment_config::CommitmentConfig,
solana_faucet::faucet::run_local_faucet,
solana_faucet_interface::faucet::run_local_faucet,
solana_keypair::Keypair,
solana_native_token::sol_to_lamports,
solana_rpc_client::rpc_client::RpcClient,
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/stake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use {
solana_cli_output::{parse_sign_only_reply_string, OutputFormat},
solana_commitment_config::CommitmentConfig,
solana_epoch_schedule::EpochSchedule,
solana_faucet::faucet::run_local_faucet,
solana_faucet_interface::faucet::run_local_faucet,
solana_fee_calculator::FeeRateGovernor,
solana_fee_structure::FeeStructure,
solana_keypair::{keypair_from_seed, Keypair},
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use {
solana_cli_output::{parse_sign_only_reply_string, OutputFormat},
solana_commitment_config::CommitmentConfig,
solana_compute_budget_interface::ComputeBudgetInstruction,
solana_faucet::faucet::run_local_faucet,
solana_faucet_interface::faucet::run_local_faucet,
solana_fee_structure::FeeStructure,
solana_keypair::{keypair_from_seed, Keypair},
solana_message::Message,
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/validator_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use {
cli::{process_command, request_and_confirm_airdrop, CliCommand, CliConfig},
},
solana_commitment_config::CommitmentConfig,
solana_faucet::faucet::run_local_faucet,
solana_faucet_interface::faucet::run_local_faucet,
solana_keypair::{keypair_from_seed, Keypair},
solana_rpc_client::rpc_client::RpcClient,
solana_signer::Signer,
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/vote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use {
},
solana_cli_output::{parse_sign_only_reply_string, OutputFormat},
solana_commitment_config::CommitmentConfig,
solana_faucet::faucet::run_local_faucet,
solana_faucet_interface::faucet::run_local_faucet,
solana_keypair::Keypair,
solana_rpc_client::rpc_client::RpcClient,
solana_rpc_client_nonce_utils::blockhash_query::{self, BlockhashQuery},
Expand Down
2 changes: 1 addition & 1 deletion dos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ solana-bench-tps = { workspace = true }
solana-client = { workspace = true }
solana-connection-cache = { workspace = true }
solana-core = { workspace = true }
solana-faucet = { workspace = true }
solana-faucet-interface = { workspace = true }
solana-gossip = { workspace = true }
solana-hash = { workspace = true }
solana-instruction = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion dos/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ pub mod test {
use {
super::*,
solana_core::validator::ValidatorConfig,
solana_faucet::faucet::run_local_faucet,
solana_faucet_interface::faucet::run_local_faucet,
solana_local_cluster::{
cluster::Cluster,
local_cluster::{ClusterConfig, LocalCluster},
Expand Down
28 changes: 28 additions & 0 deletions faucet-bin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[package]
name = "solana-faucet-bin"
description = "Provides the `solana-faucet` binary"
version = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
edition = { workspace = true }

[dependencies]
clap = { workspace = true }
log = { workspace = true }
solana-clap-utils = { workspace = true }
solana-cli-config = { workspace = true }
solana-faucet-interface = { workspace = true }
solana-keypair = "=2.2.1"
solana-logger = "=2.3.1"
solana-metrics = { workspace = true }
solana-version = { workspace = true }
tokio = { workspace = true, features = ["full"] }

[[bin]]
name = "solana-faucet"
path = "src/main.rs"

[lints]
workspace = true
2 changes: 1 addition & 1 deletion faucet/src/bin/faucet.rs → faucet-bin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use {
clap::{crate_description, crate_name, values_t, App, Arg},
log::*,
solana_clap_utils::input_parsers::{lamports_of_sol, value_of},
solana_faucet::{
solana_faucet_interface::{
faucet::{run_faucet, Faucet, FAUCET_PORT},
socketaddr,
},
Expand Down
File renamed without changes.
35 changes: 35 additions & 0 deletions faucet-interface/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[package]
name = "solana-faucet-interface"
description = "Solana Faucet"
documentation = "https://docs.rs/solana-faucet-interface"
version = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
edition = { workspace = true }

[dependencies]
bincode = { workspace = true }
crossbeam-channel = { workspace = true }
log = { workspace = true }
serde = { workspace = true }
serde_derive = { workspace = true }
solana-hash = { workspace = true }
solana-instruction = { workspace = true }
solana-keypair = { workspace = true }
solana-message = { workspace = true }
solana-metrics = { workspace = true }
solana-native-token = { workspace = true }
solana-packet = { workspace = true }
solana-pubkey = { workspace = true, features = ["rand"] }
solana-signer = { workspace = true }
solana-system-interface = { workspace = true }
solana-system-transaction = { workspace = true }
solana-transaction = { workspace = true }
spl-memo = { workspace = true, features = ["no-entrypoint"] }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["full"] }

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use {
solana_faucet::faucet::{request_airdrop_transaction, run_local_faucet},
solana_faucet_interface::faucet::{request_airdrop_transaction, run_local_faucet},
solana_hash::Hash,
solana_keypair::Keypair,
solana_message::Message,
Expand Down
Loading
Loading