Skip to content

Commit 883e1b2

Browse files
committed
chore: remove directed stake target
1 parent 13a25dd commit 883e1b2

File tree

9 files changed

+3
-50
lines changed

9 files changed

+3
-50
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/src/resolvers/query_resolver.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,6 @@ impl QueryResolver {
600600
running_jito: v.running_jito,
601601
running_bam: v.running_bam,
602602
jito_sol_active_lamports: None,
603-
jito_pool_directed_stake_target: v.jito_directed_stake_target,
604603
}
605604
})
606605
.collect(),
@@ -682,7 +681,6 @@ impl QueryResolver {
682681
running_jito: v.running_jito,
683682
running_bam: v.running_bam,
684683
jito_sol_active_lamports: Some(v.target_pool_active_lamports),
685-
jito_pool_directed_stake_target: v.jito_directed_stake_target,
686684
}
687685
})
688686
.collect(),

api/src/schemas/validator.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ pub struct ValidatorEntry {
4040
/// Active stake lamports delegated to this validator from the JitoSOL stake-pool
4141
#[serde(skip_serializing_if = "Option::is_none")]
4242
pub jito_sol_active_lamports: Option<u64>,
43-
44-
/// Indicates whether this validator is a target for directed stake from the JitoSOL stake-pool.
45-
pub jito_pool_directed_stake_target: Option<bool>,
4643
}
4744

4845
#[derive(Serialize, Deserialize, Clone, Default)]

core/src/db_models/validators.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ pub struct Validator {
2828
pub epoch_credits: Option<u64>,
2929
pub identity_account: Option<String>,
3030

31-
/// Whether or not jito directed stake target validator
32-
pub jito_directed_stake_target: Option<bool>,
33-
3431
pub mev_commission_bps: Option<u16>,
3532
pub mev_revenue_lamports: u64,
3633
pub priority_fee_commission_bps: Option<u16>,
@@ -111,7 +108,6 @@ impl Validator {
111108
vote_credit_proportion: on_chain_data.vote_credit_proportion,
112109
www_url: validators_app_entry.www_url.clone(),
113110
inflation_rewards_lamports: on_chain_data.inflation_rewards_lamports,
114-
jito_directed_stake_target: Some(on_chain_data.jito_directed_stake_target),
115111
}
116112
}
117113

core/src/fetcher.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use solana_client::{nonblocking::rpc_client::RpcClient, rpc_response::RpcVoteAcc
1313
use solana_pubkey::Pubkey;
1414
use spl_stake_pool::state::ValidatorStakeInfo;
1515
use spl_stake_pool_cli::client::get_validator_list;
16-
use stakenet_sdk::utils::accounts::{get_all_validator_history_accounts, get_directed_stake_meta};
16+
use stakenet_sdk::utils::accounts::get_all_validator_history_accounts;
1717
use validator_history::ValidatorHistory;
1818

1919
use crate::{
@@ -66,9 +66,6 @@ pub struct ChainData {
6666
pub inflation_rewards_lamports: u64,
6767
pub priority_fee_commission_bps: u16,
6868
pub priority_fee_revenue_lamports: u64,
69-
70-
/// Jito Directed Stake Target
71-
pub jito_directed_stake_target: bool,
7269
}
7370

7471
pub fn get_tip_distribution_program_id(cluster: &Cluster) -> Pubkey {
@@ -126,15 +123,13 @@ pub fn get_priority_fee_distribution_program_id() -> solana_pubkey::Pubkey {
126123
///
127124
/// - If BAM validator set exists and not empty: check if validator identity is in the set
128125
/// - Otherwise: fall back to client_type check from validator history
129-
#[allow(clippy::too_many_arguments)]
130126
pub async fn fetch_chain_data(
131127
validators: &[ValidatorsAppResponseEntry],
132128
bam_validator_set: HashSet<String>,
133129
rpc_client: Arc<RpcClient>,
134130
cluster: &Cluster,
135131
epoch: u64,
136132
validator_list_pubkey: &Pubkey,
137-
steward_config_pubkey: &Pubkey,
138133
) -> Result<HashMap<Pubkey, ChainData>, Error> {
139134
// Fetch on-chain data
140135
let tip_distributions =
@@ -161,9 +156,6 @@ pub async fn fetch_chain_data(
161156
let validator_histories =
162157
fetch_validator_history_accounts(&rpc_client, validator_history_program_id).await?;
163158

164-
let directed_stake_meta =
165-
get_directed_stake_meta(rpc_client, steward_config_pubkey, &jito_steward::id()).await?;
166-
167159
Ok(HashMap::from_iter(validators.iter().map(|v| {
168160
let vote_account = v.vote_account;
169161
let maybe_tip_distribution_account = tip_distributions.get(&vote_account);
@@ -228,11 +220,6 @@ pub async fn fetch_chain_data(
228220
let inflation_rewards_lamports =
229221
inflation_rate / epochs_per_year * staked_amount * vote_credit_proportion;
230222

231-
let jito_directed_stake_target = directed_stake_meta
232-
.targets
233-
.iter()
234-
.any(|target| target.vote_pubkey.eq(&v.vote_account));
235-
236223
let data = ChainData {
237224
mev_commission_bps,
238225
mev_revenue_lamports,
@@ -244,7 +231,6 @@ pub async fn fetch_chain_data(
244231
inflation_rewards_lamports: inflation_rewards_lamports as u64,
245232
priority_fee_commission_bps,
246233
priority_fee_revenue_lamports,
247-
jito_directed_stake_target,
248234
};
249235

250236
(vote_account, data)

writer-service/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ solana-clap-utils = { workspace = true }
2929
solana-client = { workspace = true }
3030
solana-metrics = { workspace = true }
3131
solana-program = { workspace = true }
32-
solana-pubkey = { workspace = true }
3332
solana-sdk = { workspace = true }
3433
spl-stake-pool = { workspace = true }
3534
spl-stake-pool-cli = { workspace = true }

writer-service/src/lib.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ impl KobeWriterService {
6666
tip_distribution_program_id: String,
6767
priority_fee_distribution_program_id: String,
6868
mainnet_gcp_server_names: Vec<String>,
69-
steward_config: Pubkey,
7069
bam_api_base_url: Option<String>,
7170
) -> Result<Self> {
7271
let mongodb_client = db::setup_mongo_client(mongo_connection_uri).await?;
@@ -90,13 +89,8 @@ impl KobeWriterService {
9089
.await
9190
.expect("Failed to initialize Validators App client");
9291

93-
let stake_pool_manager = StakePoolManager::new(
94-
rpc_client,
95-
validators_app_client,
96-
bam_api_base_url,
97-
cluster,
98-
steward_config,
99-
);
92+
let stake_pool_manager =
93+
StakePoolManager::new(rpc_client, validators_app_client, bam_api_base_url, cluster);
10094

10195
Ok(Self {
10296
db,

writer-service/src/main.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use kobe_writer_service::{result::Result, KobeWriterService};
55
use log::{error, info, set_boxed_logger, set_max_level, LevelFilter};
66
use solana_clap_utils::input_validators::is_url_or_moniker;
77
use solana_metrics::set_host_id;
8-
use solana_pubkey::Pubkey;
98
use tokio::runtime::Runtime;
109

1110
#[derive(Parser)]
@@ -59,14 +58,6 @@ struct Args {
5958
)]
6059
priority_fee_distribution_program_id: String,
6160

62-
/// Steward config pubkey
63-
#[arg(
64-
long,
65-
env,
66-
default_value = "jitoVjT9jRUyeXHzvCwzPgHj7yWNRhLcUoXtes4wtjv"
67-
)]
68-
steward_config_pubkey: Pubkey,
69-
7061
/// Mainnet gcp server names
7162
#[arg(long, env, value_delimiter = ',')]
7263
mainnet_gcp_server_names: Vec<String>,
@@ -120,7 +111,6 @@ fn main() -> Result<()> {
120111
args.tip_distribution_program_id,
121112
args.priority_fee_distribution_program_id,
122113
args.mainnet_gcp_server_names,
123-
args.steward_config_pubkey,
124114
args.bam_api_base_url,
125115
)
126116
.await

writer-service/src/stake_pool_manager.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ pub struct StakePoolManager {
3232

3333
/// Cluster [Mainnet, Testnet, Devnet]
3434
pub cluster: Cluster,
35-
36-
/// Steward config pubkey
37-
steward_config: Pubkey,
3835
}
3936

4037
impl StakePoolManager {
@@ -43,14 +40,12 @@ impl StakePoolManager {
4340
validators_app_client: Client,
4441
bam_api_base_url: Option<String>,
4542
cluster: Cluster,
46-
steward_config: Pubkey,
4743
) -> Self {
4844
let mut manager = Self {
4945
rpc_client: Arc::new(rpc_client),
5046
validators_app_client,
5147
bam_api_client: None,
5248
cluster,
53-
steward_config,
5449
};
5550

5651
if let Some(bam_api_base_url) = bam_api_base_url {
@@ -91,7 +86,6 @@ impl StakePoolManager {
9186
&self.cluster,
9287
epoch,
9388
validator_list_address,
94-
&self.steward_config,
9589
)
9690
.await?;
9791

0 commit comments

Comments
 (0)