Skip to content

Commit f7187ef

Browse files
committed
upgraded allow deps
1 parent d78291f commit f7187ef

File tree

13 files changed

+1341
-1800
lines changed

13 files changed

+1341
-1800
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 66 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -17,78 +17,77 @@ bs58 = "0.5.1"
1717
borsh = "1.5.1"
1818
bytes = "1.10.0"
1919
clap = { version = "4.5.2", features = ["cargo", "derive", "env"] }
20-
derivative = "2.2.0"
2120
derive_more = { version = "2.0.1", features = ["display"] }
22-
etcd-client = "0.14.0"
2321
futures = "0.3.30"
2422
hostname = "0.4.0"
2523
humantime-serde = "1.1.1"
2624
hyper = "1.5.0"
27-
jsonrpsee = { version = "0.24.7", features = [
25+
jsonrpsee = { version = "0.26.0", features = [
2826
"http-client",
2927
"macros",
3028
"server",
3129
] }
3230
lazy_static = "1.4.0"
33-
lru = "0.12.3"
3431
maplit = "1.0.2"
3532
pin-project = "1.1.5"
36-
prometheus = "0.13.3"
37-
prost = "0.13.3"
38-
prost-types = "0.13.3"
33+
prometheus = "0.14.0"
34+
prost = "0.14.0"
35+
prost-types = "0.14.0"
3936
quinn = "0.11.6"
4037
quinn-proto = "0.11.6"
41-
rand = "0.8.5"
38+
rand = "0.9.0"
4239
rustls = { version = "0.23.15", default-features = false }
4340
semver = "1.0.22"
4441
serde = "1.0.215"
4542
serde_json = "1.0.116"
4643
serde_yaml = "0.9.25"
4744

4845
# Agave Crates
49-
solana-client = "2"
50-
solana-connection-cache = "2"
51-
solana-net-utils = "2"
52-
solana-quic-client = "2"
53-
solana-rpc-client-api = "2"
54-
solana-streamer = "2"
55-
solana-tpu-client = "2"
56-
solana-version = "2"
57-
solana-rpc-client = "2"
58-
solana-transaction-status-client-types = "2"
59-
solana-system-interface = "1"
60-
solana-bincode = "2"
61-
solana-tls-utils = "2"
46+
solana-client = "2.0.0"
47+
solana-connection-cache = "2.0.0"
48+
solana-net-utils = "2.0.0"
49+
solana-quic-client = "2.0.0"
50+
solana-rpc-client-api = "2.0.0"
51+
solana-streamer = "2.0.0"
52+
solana-tpu-client = "2.0.0"
53+
solana-version = "2.0.0"
54+
solana-rpc-client = "2.0.0"
55+
solana-transaction-status-client-types = "2.0.0"
56+
solana-system-interface = "1.0.0"
57+
solana-bincode = "2.0.0"
58+
solana-tls-utils = "2.0.0"
6259
# --> Anza - Solana SDK (decoupled from agave)
63-
solana-program = "2"
60+
solana-program = "2.0.0"
6461
# TEMPORARY
6562
reqwest = { version = "0.12.15", features = ["json"] }
6663
retry = "2.0.0"
67-
solana-instruction = "2"
68-
solana-pubkey = "2"
69-
solana-keypair = "2"
70-
solana-account = "2"
71-
solana-clock = "2"
72-
solana-hash = "2"
73-
solana-epoch-schedule = "2"
74-
solana-quic-definitions = "2"
75-
solana-signature = { version = "2", features = ["rand"] }
76-
solana-signer = "2"
77-
solana-transaction = "2"
78-
solana-epoch-info = "2"
79-
solana-commitment-config = "2"
80-
solana-transaction-error = "2"
81-
solana-message = "2"
82-
solana-compute-budget-interface = "2"
83-
solana-native-token = "2"
84-
solana-nonce = "2"
85-
solana-packet = "2"
86-
thiserror = "1.0.58"
64+
solana-instruction = "2.0.0"
65+
solana-pubkey = "2.0.0"
66+
solana-keypair = "2.0.0"
67+
solana-account = "2.0.0"
68+
solana-clock = "2.0.0"
69+
solana-hash = "2.0.0"
70+
solana-epoch-schedule = "2.0.0"
71+
solana-quic-definitions = "2.0.0"
72+
solana-signature = { version = "2.0.0", features = ["rand"] }
73+
solana-signer = "2.0.0"
74+
solana-sdk-ids = "2.0.0"
75+
solana-transaction = "2.0.0"
76+
solana-epoch-info = "2.0.0"
77+
solana-commitment-config = "2.0.0"
78+
solana-transaction-error = "2.0.0"
79+
solana-message = "2.0.0"
80+
solana-compute-budget-interface = "2.0.0"
81+
solana-native-token = "2.0.0"
82+
solana-nonce = "2.0.0"
83+
solana-packet = "2.0.0"
84+
thiserror = "2.0.0"
8785
tokio = { version = "1.36.0", features = ["rt-multi-thread", "macros"] }
86+
tonic-prost = { version = "0.14.0" }
8887
tokio-stream = "0.1.15"
89-
tonic = { version = "0.12.3", features = ["tls-native-roots"] }
90-
tonic-health = "0.12.3"
91-
tower = "0.4.13"
88+
tonic = { version = "0.14.0", features = ["tls-native-roots"] }
89+
tonic-health = "0.14.0"
90+
tower = "0.5.0"
9291
tracing = "0.1.40"
9392
tracing-subscriber = { version = "0.3.1", features = [
9493
"ansi",
@@ -97,10 +96,12 @@ tracing-subscriber = { version = "0.3.1", features = [
9796
] }
9897
uuid = { version = "1.11.0", features = ["v4", "serde"] }
9998

100-
yellowstone-grpc-client = "7"
101-
yellowstone-grpc-proto = "7"
102-
yellowstone-shield-store = "~0.5.2"
103-
yellowstone-vixen = "0.2.0"
99+
yellowstone-grpc-client = "9.0.0"
100+
yellowstone-grpc-proto = "9.0.0"
101+
# yellowstone-shield-store = "~0.5.2"
102+
yellowstone-shield-store = { git = "https://github.com/rpcpool/yellowstone-shield.git", branch = "26-unpinned-crates" }
103+
yellowstone-vixen = "0.5.0"
104+
yellowstone-vixen-yellowstone-grpc-source = { version = "0.3.0" }
104105
tokio-util = "0.7.16"
105106

106107
[[bin]]
@@ -112,7 +113,8 @@ anyhow = "1.0.69"
112113
cargo-lock = "10.0.1"
113114
git-version = "0.3.9"
114115
protobuf-src = "1.1.0"
115-
tonic-build = "0.12.3"
116+
tonic-build = "0.14.0"
117+
tonic-prost-build = "0.14.0"
116118
vergen = { version = "9.0.1", features = ["build", "rustc"] }
117119

118120
[lints.clippy]
@@ -125,14 +127,20 @@ codegen-units = 1
125127
lto = true
126128

127129
[patch.crates-io]
128-
solana-rpc-client = { git = "https://github.com/rpcpool/solana-public.git", tag = "v2.2.19-triton-public" }
129-
solana-rpc-client-api = { git = "https://github.com/rpcpool/solana-public.git", tag = "v2.2.19-triton-public" }
130-
solana-account-decoder-client-types = { git = "https://github.com/rpcpool/solana-public.git", tag = "v2.2.19-triton-public" }
131-
solana-client = { git = "https://github.com/rpcpool/solana-public.git", tag = "v2.2.19-triton-public" }
132-
solana-net-utils = { git = "https://github.com/rpcpool/solana-public.git", tag = "v2.2.19-triton-public" }
133-
solana-streamer = { git = "https://github.com/rpcpool/solana-public.git", tag = "v2.2.19-triton-public" }
134-
solana-transaction-context = { git = "https://github.com/rpcpool/solana-public.git", tag = "v2.2.19-triton-public" }
135-
solana-transaction-status-client-types = { git = "https://github.com/rpcpool/solana-public.git", tag = "v2.2.19-triton-public" }
130+
solana-rpc-client = { git = "https://github.com/rpcpool/solana-public.git", tag = "v2.3.8-triton-public" }
131+
solana-rpc-client-api = { git = "https://github.com/rpcpool/solana-public.git", tag = "v2.3.8-triton-public" }
132+
solana-account-decoder = { git = "https://github.com/rpcpool/solana-public.git", tag = "v2.3.8-triton-public" }
133+
solana-account-decoder-client-types = { git = "https://github.com/rpcpool/solana-public.git", tag = "v2.3.8-triton-public" }
134+
solana-client = { git = "https://github.com/rpcpool/solana-public.git", tag = "v2.3.8-triton-public" }
135+
solana-streamer = { git = "https://github.com/rpcpool/solana-public.git", tag = "v2.3.8-triton-public" }
136+
solana-transaction-context = { git = "https://github.com/rpcpool/solana-public.git", tag = "v2.3.8-triton-public" }
137+
solana-transaction-status = { git = "https://github.com/rpcpool/solana-public.git", tag = "v2.3.8-triton-public" }
138+
solana-transaction-status-client-types = { git = "https://github.com/rpcpool/solana-public.git", tag = "v2.3.8-triton-public" }
139+
140+
solana-net-utils = { git = "https://github.com/rpcpool/solana-public.git", tag = "v2.3.8-triton-public" }
141+
solana-tpu-client = { git = "https://github.com/rpcpool/solana-public.git", tag = "v2.3.8-triton-public" }
142+
solana-quic-client = { git = "https://github.com/rpcpool/solana-public.git", tag = "v2.3.8-triton-public" }
143+
136144

137145
[target.'cfg(not(target_env = "msvc"))'.dependencies]
138146
tikv-jemallocator = "0.6"

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn main() -> anyhow::Result<()> {
2525

2626
// TODO: Audit that the environment access only happens in single-threaded code.
2727
unsafe { std::env::set_var("PROTOC", protobuf_src::protoc()) };
28-
tonic_build::configure()
28+
tonic_prost_build::configure()
2929
.compile_protos(&["proto/jet.proto", "proto/lewis.proto"], &["proto"])?;
3030

3131
Ok(())

deny.toml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,6 @@ ignore = [
99
# web-time not maintained
1010
"RUSTSEC-2024-0384",
1111

12-
# derivative unmaintained warning
13-
"RUSTSEC-2024-0388",
14-
1512
# ed25519-dalek 1.0.1
1613
"RUSTSEC-2022-0093",
17-
18-
# ring vulnerability - coming from Solana dependencies
19-
"RUSTSEC-2025-0009",
20-
21-
# protobuf issue
22-
"RUSTSEC-2024-0437",
23-
24-
# paste
25-
"RUSTSEC-2024-0436",
2614
]

src/bin/gentx.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use {
1414
solana_keypair::{Keypair, read_keypair_file},
1515
solana_message::{VersionedMessage, v0},
1616
solana_native_token::LAMPORTS_PER_SOL,
17-
solana_program::system_instruction,
1817
solana_pubkey::Pubkey,
1918
solana_signature::Signature,
2019
solana_signer::Signer,
@@ -348,7 +347,7 @@ async fn main() -> anyhow::Result<()> {
348347
instructions.push(ComputeBudgetInstruction::set_compute_unit_price(price));
349348
}
350349
let lamports = 5_000 + index;
351-
instructions.push(system_instruction::transfer(
350+
instructions.push(solana_system_interface::instruction::transfer(
352351
&wallet_pubkey,
353352
&wallet_pubkey,
354353
lamports,

src/bin/jet.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ async fn run_jet(config: ConfigJet) -> anyhow::Result<()> {
273273
{
274274
let policy_store = PolicyStore::build()
275275
.config(config.upstream.clone().into())
276-
.run(&local)
276+
.run()
277277
.await?;
278278

279279
Arc::new(policy_store) as Arc<dyn TransactionPolicyStore + Send + Sync>

src/config.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use {
2626
},
2727
tokio::{fs, time::Duration},
2828
yellowstone_shield_store::{PolicyStoreConfig, PolicyStoreRpcConfig},
29-
yellowstone_vixen::config::YellowstoneConfig,
29+
yellowstone_vixen_yellowstone_grpc_source::YellowstoneGrpcConfig,
3030
};
3131

3232
fn deserialize_pubkey<'de, D>(deserializer: D) -> Result<Pubkey, D::Error>
@@ -224,10 +224,14 @@ impl From<ConfigUpstream> for PolicyStoreConfig {
224224
) -> Self {
225225
Self {
226226
rpc: PolicyStoreRpcConfig { endpoint: rpc },
227-
grpc: YellowstoneConfig {
227+
grpc: YellowstoneGrpcConfig {
228228
endpoint,
229229
x_token,
230230
timeout: 60,
231+
commitment_level: Some(yellowstone_vixen::CommitmentLevel::Finalized),
232+
max_decoding_message_size: Some(100_000_000),
233+
from_slot: None,
234+
accept_compression: None,
231235
},
232236
}
233237
}

src/grpc_jet.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ impl GrpcServer {
430430
Ok(_) => {
431431
if let Some(gateway_timestamp) = timestamp {
432432
let latency = ms_since_epoch().saturating_sub(gateway_timestamp);
433-
metrics::jet::observe_forwarded_txn_latency(latency as f64);
433+
metrics::jet::observe_forwarded_txn_latency(latency as f64, my_identity);
434434
}
435435
increment_send_transaction_success();
436436
}

src/metrics.rs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ pub mod jet {
424424

425425
pub fn incr_quic_gw_worker_tx_process_cnt(remote_peer: Pubkey, status: &str) {
426426
QUIC_GW_WORKER_TX_PROCESS_CNT
427-
.with_label_values(&[&remote_peer.to_string(), status])
427+
.with_label_values(&[remote_peer.to_string().as_str(), status])
428428
.inc_by(1);
429429
}
430430

@@ -592,9 +592,9 @@ pub mod jet {
592592
SEND_TRANSACTION_SUCCESS.inc();
593593
}
594594

595-
pub fn observe_forwarded_txn_latency(duration: f64) {
595+
pub fn observe_forwarded_txn_latency(duration: f64, identity: Pubkey) {
596596
FORWADED_TRANSACTION_LATENCY
597-
.with_label_values(&[])
597+
.with_label_values(&[identity.to_string()])
598598
.observe(duration);
599599
}
600600

@@ -754,25 +754,29 @@ pub mod jet {
754754

755755
pub fn quic_send_attempts_inc(leader: Pubkey, address: SocketAddr, status: &str) {
756756
QUIC_SEND_ATTEMPTS
757-
.with_label_values(&[&leader.to_string(), &address.to_string(), status])
757+
.with_label_values(&[
758+
leader.to_string().as_str(),
759+
&address.to_string().as_str(),
760+
status,
761+
])
758762
.inc();
759763
}
760764

761765
pub fn gateway_set_connected(endpoints: &[String], endpoint: String) {
762766
for endpoint in endpoints {
763767
GATEWAY_CONNECTED
764-
.with_label_values(&[endpoint.as_ref()])
768+
.with_label_values(&[endpoint.as_str()])
765769
.set(0);
766770
}
767771
GATEWAY_CONNECTED
768-
.with_label_values(&[endpoint.as_ref()])
772+
.with_label_values(&[endpoint.as_str()])
769773
.set(1);
770774
}
771775

772776
pub fn gateway_set_disconnected(endpoints: &[String]) {
773777
for endpoint in endpoints {
774778
GATEWAY_CONNECTED
775-
.with_label_values(&[endpoint.as_ref()])
779+
.with_label_values(&[endpoint.as_str()])
776780
.set(0);
777781
}
778782
}

src/rpc.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use {
55
hyper::{Request, Response, StatusCode},
66
jsonrpsee::{
77
core::http_helpers::Body,
8-
server::{ServerBuilder, ServerHandle},
8+
server::{ServerBuilder, ServerConfigBuilder, ServerHandle},
99
types::error::{ErrorObject, ErrorObjectOwned, INVALID_PARAMS_CODE},
1010
},
1111
rpc_admin::JetIdentityUpdater,
@@ -103,9 +103,11 @@ impl RpcServer {
103103
use rpc_solana_like::RpcServer;
104104

105105
let rpc_server_impl = Self::create_solana_like_rpc_server_impl(tx_handler);
106-
107-
ServerBuilder::new()
106+
let server_config = ServerConfigBuilder::default()
108107
.max_request_body_size(MAX_REQUEST_BODY_SIZE)
108+
.build();
109+
ServerBuilder::new()
110+
.set_config(server_config)
109111
.build(addr)
110112
.await
111113
.map(|server| server.start(rpc_server_impl.into_rpc()))
@@ -223,7 +225,7 @@ pub mod rpc_admin {
223225
"set_identity_from_bytes with require_tower is not supported".to_owned(),
224226
));
225227
}
226-
let keypair = Keypair::from_bytes(&identity_keypair).map_err(|err| {
228+
let keypair = Keypair::try_from(identity_keypair.as_slice()).map_err(|err| {
227229
invalid_params(format!(
228230
"Failed to read identity keypair from provided byte array: {err}"
229231
))

0 commit comments

Comments
 (0)