Skip to content

Commit de41f45

Browse files
committed
Solana and other crate updates
1 parent af91c2f commit de41f45

File tree

8 files changed

+1984
-1136
lines changed

8 files changed

+1984
-1136
lines changed

Cargo.lock

Lines changed: 1967 additions & 1112 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ path = "src/bin/agent.rs"
1010
[dependencies]
1111
anyhow = "1.0.81"
1212
ed25519-dalek = "1.0.1"
13-
serde = { version = "1.0.197", features = ["derive"] }
13+
serde = { version = "1.0.197", features = ["derive", "rc"] }
1414
async-trait = "0.1.79"
1515
warp = { version = "0.3.6", features = ["websocket"] }
1616
tokio = { version = "1.37.0", features = ["full"] }
@@ -23,25 +23,21 @@ jrpc = "0.4.1"
2323
serde_json = "1.0.115"
2424
chrono = "0.4.37"
2525
chrono-tz = "0.8.6"
26-
parking_lot = "0.12.1"
2726
pyth-sdk = "0.8.0"
2827
pyth-sdk-solana = "0.10.4"
29-
solana-account-decoder = "1.18.8"
30-
solana-client = "1.18.8"
31-
solana-pubkey = "2.3.0"
32-
solana-sdk = "1.18.8"
33-
solana-transaction-status = "1.18.26"
28+
solana-account-decoder = "2.2.1"
29+
solana-client = "2.2.1"
30+
solana-pubkey = "2.2.1"
31+
solana-sdk = "2.2.1"
32+
solana-transaction-status = "2.2.1"
3433
bincode = { version = "2.0.1", features = ["serde"] }
35-
rand = "0.8.5"
3634
config = "0.14.0"
3735
thiserror = "1.0.58"
3836
clap = { version = "4.5.4", features = ["derive"] }
3937
humantime-serde = "1.1.1"
4038
serde-this-or-that = "0.4.2"
41-
humantime = "2.1.0"
4239
prometheus-client = "0.22.2"
4340
lazy_static = "1.4.0"
44-
toml_edit = "0.22.9"
4541
winnow = "0.6.5"
4642
proptest = "1.4.0"
4743
reqwest = { version = "0.12.0", features = ["json"] }
@@ -59,14 +55,6 @@ tokio-tungstenite = { version = "0.26.2", features = ["native-tls", "url"] }
5955
http = "1.3.1"
6056
url = { version = "2.5.4", features = ["serde"] }
6157
pyth-lazer-publisher-sdk = "0.1.1"
62-
tokio-util = { version = "0.7.14", features = ["full"] }
63-
64-
[dev-dependencies]
65-
soketto = "0.8.0"
66-
portpicker = "0.1.1"
67-
rand = "0.8.5"
68-
tokio-retry = "0.3.0"
69-
iobuffer = "0.2.0"
7058

7159
[profile.release]
7260
panic = 'abort'

src/agent/market_schedule.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl MarketSchedule {
109109
}
110110
}
111111

112-
fn market_schedule_parser<'s>(input: &mut &'s str) -> ModalResult<MarketSchedule> {
112+
fn market_schedule_parser(input: &mut &str) -> ModalResult<MarketSchedule> {
113113
seq!(
114114
MarketSchedule {
115115
timezone: take_till(0.., ';').verify_map(|s| Tz::from_str(s).ok()),
@@ -157,13 +157,13 @@ pub struct HolidayDaySchedule {
157157
pub kind: ScheduleDayKind,
158158
}
159159

160-
fn two_digit_parser<'s>(input: &mut &'s str) -> ModalResult<u32> {
160+
fn two_digit_parser(input: &mut &str) -> ModalResult<u32> {
161161
take(2usize)
162162
.verify_map(|s| u32::from_str(s).ok())
163163
.parse_next(input)
164164
}
165165

166-
fn holiday_day_schedule_parser<'s>(input: &mut &'s str) -> ModalResult<HolidayDaySchedule> {
166+
fn holiday_day_schedule_parser(input: &mut &str) -> ModalResult<HolidayDaySchedule> {
167167
// day and month are not validated to be correct dates
168168
// if they are invalid, it will be ignored since there
169169
// are no real dates that match the invalid input

src/agent/metrics.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ pub async fn spawn(addr: impl Into<SocketAddr> + 'static) {
6363
.and(warp::path::end())
6464
.and_then(move || async move {
6565
let mut buf = String::new();
66+
#[allow(clippy::needless_borrow)]
6667
let response = encode(&mut buf, &&PROMETHEUS_REGISTRY.lock().await)
6768
.map_err(|e| -> Box<dyn std::error::Error> { e.into() })
6869
.map(|_| Box::new(reply::with_status(buf, StatusCode::OK)))

src/agent/services/exporter.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ where
210210
handles
211211
}
212212

213+
#[allow(clippy::module_inception)]
213214
mod exporter {
214215
use {
215216
super::NetworkState,

src/agent/services/lazer_exporter.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,14 @@ async fn fetch_symbols(history_url: &Url) -> Result<Vec<SymbolResponse>> {
152152

153153
#[instrument(skip(config, state))]
154154
pub fn lazer_exporter(config: Config, state: Arc<state::State>) -> Vec<JoinHandle<()>> {
155-
let mut handles = Vec::new();
156-
handles.push(tokio::spawn(lazer_exporter::lazer_exporter(
155+
let handles = vec![tokio::spawn(lazer_exporter::lazer_exporter(
157156
config.clone(),
158157
state,
159-
)));
158+
))];
160159
handles
161160
}
162161

162+
#[allow(clippy::module_inception)]
163163
mod lazer_exporter {
164164
use {
165165
crate::agent::{

src/agent/services/oracle.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ where
132132
},
133133
filters: None,
134134
with_context: Some(true),
135+
sort_results: None,
135136
};
136137
client.program_subscribe(&program_key, Some(config)).await
137138
}?;

src/agent/state/exporter.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ async fn estimate_compute_unit_price_micro_lamports(
446446
/// - Degrade gracefully if the blockchain RPC node exhibits poor performance. If the RPC node takes a long
447447
/// time to respond, no internal queues grow unboundedly. At any single point in time there are at most
448448
/// (n / batch_size) requests in flight.
449+
#[allow(clippy::too_many_arguments)]
449450
#[instrument(
450451
skip(state, rpc_multi_client, network_state_rx, publish_keypair, staleness_threshold, permissioned_updates),
451452
fields(
@@ -527,6 +528,7 @@ where
527528
Ok(())
528529
}
529530

531+
#[allow(clippy::too_many_arguments)]
530532
#[instrument(
531533
skip(state, rpc_multi_client, network_state, publish_keypair, batch, staleness_threshold),
532534
fields(

0 commit comments

Comments
 (0)