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

use quinn 0.11.x #140

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
2,385 changes: 1,252 additions & 1,133 deletions Cargo.lock

Large diffs are not rendered by default.

37 changes: 22 additions & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ axum = "0.5.17"
bincode = "1.3.3"
bytes = "1.4.0"
cached = "0.42.0"
chrono = "0.4.24"
chrono = "0.4.38"
clap = { version = "4", features = ["derive", "env"] }
crossbeam-channel = "0.5.8"
dashmap = "5.4.0"
Expand Down Expand Up @@ -57,20 +57,22 @@ serde = { version = "1.0.160", features = ["derive"] }
serde_json = "1.0.96"
serde_yaml = "0.9.32"
sha2 = "0.10.6"
solana-address-lookup-table-program = "=1.18.18"
solana-client = "=1.18.18"
solana-core = "=1.18.18"
solana-gossip = "=1.18.18"
solana-measure = "=1.18.18"
solana-metrics = "=1.18.18"
solana-net-utils = "=1.18.18"
solana-perf = "=1.18.18"
solana-program = "=1.18.18"
solana-rayon-threadlimit = "=1.18.18"
solana-runtime = "=1.18.18"
solana-sdk = "=1.18.18"
solana-streamer = "=1.18.18"
solana-validator = "=1.18.18"
solana-address-lookup-table-program = {git = "https://github.com/lijunwangs/solana.git", rev = "25c5322911d8284ded379b4c1d114e6f378707a9"}
solana-client = {git = "https://github.com/lijunwangs/solana.git", rev = "25c5322911d8284ded379b4c1d114e6f378707a9"}
solana-core = {git = "https://github.com/lijunwangs/solana.git", rev = "25c5322911d8284ded379b4c1d114e6f378707a9"}
solana-gossip = {git = "https://github.com/lijunwangs/solana.git", rev = "25c5322911d8284ded379b4c1d114e6f378707a9"}
solana-measure = {git = "https://github.com/lijunwangs/solana.git", rev = "25c5322911d8284ded379b4c1d114e6f378707a9"}
solana-metrics = {git = "https://github.com/lijunwangs/solana.git", rev = "25c5322911d8284ded379b4c1d114e6f378707a9"}
solana-net-utils = {git = "https://github.com/lijunwangs/solana.git", rev = "25c5322911d8284ded379b4c1d114e6f378707a9"}
solana-perf = {git = "https://github.com/lijunwangs/solana.git", rev = "25c5322911d8284ded379b4c1d114e6f378707a9"}
solana-program = {git = "https://github.com/lijunwangs/solana.git", rev = "25c5322911d8284ded379b4c1d114e6f378707a9"}
solana-rayon-threadlimit = {git = "https://github.com/lijunwangs/solana.git", rev = "25c5322911d8284ded379b4c1d114e6f378707a9"}
solana-runtime = {git = "https://github.com/lijunwangs/solana.git", rev = "25c5322911d8284ded379b4c1d114e6f378707a9"}
solana-sdk = {git = "https://github.com/lijunwangs/solana.git", rev = "25c5322911d8284ded379b4c1d114e6f378707a9"}
solana-streamer = {git = "https://github.com/lijunwangs/solana.git", rev = "25c5322911d8284ded379b4c1d114e6f378707a9"}
solana-unified-scheduler-logic = {git = "https://github.com/lijunwangs/solana.git", rev = "25c5322911d8284ded379b4c1d114e6f378707a9"}
agave-validator = {git = "https://github.com/lijunwangs/solana.git", rev = "25c5322911d8284ded379b4c1d114e6f378707a9"}
solana-zk-token-sdk = {git = "https://github.com/lijunwangs/solana.git", rev = "25c5322911d8284ded379b4c1d114e6f378707a9"}
thiserror = "1.0.40"
tikv-jemallocator = { version = "0.4", features = ["profiling"] }
tokio = { version = "1.29.1", features = ["full"] }
Expand All @@ -86,3 +88,8 @@ lto = "thin"
# enable debug symbols for profiling the heap using jeprof
# example: jeprof --web target/release/jito-transaction-relayer jeprof.3085546.9823.i24.heap
#debug = true

[patch.crates-io]

solana-program = {git = "https://github.com/lijunwangs/solana.git", rev = "25c5322911d8284ded379b4c1d114e6f378707a9"}
solana-zk-token-sdk = {git = "https://github.com/lijunwangs/solana.git", rev = "25c5322911d8284ded379b4c1d114e6f378707a9"}
8 changes: 6 additions & 2 deletions block_engine/src/block_engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ use prost_types::Timestamp;
use solana_core::banking_trace::BankingPacketBatch;
use solana_metrics::{datapoint_error, datapoint_info};
use solana_sdk::{
address_lookup_table::AddressLookupTableAccount, pubkey::Pubkey, signature::Signer,
address_lookup_table::AddressLookupTableAccount, pubkey::Pubkey,
reserved_account_keys::ReservedAccountKeys,
signature::Signer,
signer::keypair::Keypair, transaction::VersionedTransaction,
};
use thiserror::Error;
Expand Down Expand Up @@ -723,12 +725,14 @@ fn is_aoi_in_static_keys(
accounts_of_interest: &mut TimedCache<Pubkey, u8>,
programs_of_interest: &mut TimedCache<Pubkey, u8>,
) -> bool {
let reserved_account_keys = ReservedAccountKeys::new_all_activated().active;

tx.message
.static_account_keys()
.iter()
.enumerate()
.any(|(idx, acc)| {
(tx.message.is_maybe_writable(idx) && accounts_of_interest.cache_get(acc).is_some())
(tx.message.is_maybe_writable(idx, Some(&reserved_account_keys)) && accounts_of_interest.cache_get(acc).is_some())
// note: can't detect CPIs without execution, so aggressively forward txs than contain account in POI
|| programs_of_interest.cache_get(acc).is_some()
})
Expand Down
9 changes: 6 additions & 3 deletions core/src/tpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use solana_core::{
};
use solana_sdk::{pubkey::Pubkey, signature::Keypair};
use solana_streamer::{
nonblocking::quic::{DEFAULT_MAX_STREAMS_PER_MS, DEFAULT_WAIT_FOR_CHUNK_TIMEOUT},
nonblocking::quic::{DEFAULT_MAX_CONNECTIONS_PER_IPADDR_PER_MINUTE, DEFAULT_MAX_STREAMS_PER_MS, DEFAULT_WAIT_FOR_CHUNK_TIMEOUT},
quic::spawn_server,
streamer::StakedNodes,
};
Expand Down Expand Up @@ -82,17 +82,18 @@ impl Tpu {
.into_iter()
.map(|sock| {
spawn_server(
"solQuicTpu",
"quic_streamer_tpu",
sock,
keypair,
*tpu_ip,
tpu_sender.clone(),
exit.clone(),
MAX_QUIC_CONNECTIONS_PER_PEER,
staked_nodes.clone(),
max_staked_quic_connections,
max_unstaked_quic_connections,
DEFAULT_MAX_STREAMS_PER_MS,
DEFAULT_MAX_CONNECTIONS_PER_IPADDR_PER_MINUTE,
DEFAULT_WAIT_FOR_CHUNK_TIMEOUT,
Duration::from_millis(DEFAULT_TPU_COALESCE_MS),
)
Expand All @@ -106,17 +107,18 @@ impl Tpu {
.into_iter()
.map(|sock| {
spawn_server(
"solQuicTpuFwd",
"quic_streamer_tpu_forwards",
sock,
keypair,
*tpu_fwd_ip,
tpu_forwards_sender.clone(),
exit.clone(),
MAX_QUIC_CONNECTIONS_PER_PEER,
staked_nodes.clone(),
max_staked_quic_connections.saturating_add(max_unstaked_quic_connections),
0, // Prevent unstaked nodes from forwarding transactions
DEFAULT_MAX_STREAMS_PER_MS,
DEFAULT_MAX_CONNECTIONS_PER_IPADDR_PER_MINUTE,
DEFAULT_WAIT_FOR_CHUNK_TIMEOUT,
Duration::from_millis(DEFAULT_TPU_COALESCE_MS),
)
Expand All @@ -133,6 +135,7 @@ impl Tpu {
let sigverify_stage = SigVerifyStage::new(
tpu_receiver,
TransactionSigVerifier::new(banking_packet_sender),
"solSigVerTpu",
"tpu-verifier",
);

Expand Down
2 changes: 1 addition & 1 deletion jito-protos/protos
Submodule protos updated 4 files
+5 −18 README.md
+0 −245 json_rpc/http.md
+0 −1 packet.proto
+41 −9 searcher.proto
1 change: 0 additions & 1 deletion jito-protos/src/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ pub fn packet_to_proto_packet(p: &Packet) -> Option<ProtoPacket> {
repair: p.meta().repair(),
simple_vote_tx: p.meta().is_simple_vote_tx(),
tracer_packet: p.meta().is_tracer_packet(),
from_staked_node: p.meta().is_from_staked_node(),
}),
sender_stake: 0,
}),
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.75.0"
channel = "1.80.1"
2 changes: 1 addition & 1 deletion transaction-relayer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ solana-net-utils = { workspace = true }
solana-perf = { workspace = true }
solana-program = { workspace = true }
solana-sdk = { workspace = true }
solana-validator = { workspace = true }
agave-validator = { workspace = true }
tikv-jemallocator = { workspace = true }
tokio = { workspace = true }
tokio-stream = { workspace = true }
Expand Down
6 changes: 3 additions & 3 deletions transaction-relayer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ use jito_transaction_relayer::forwarder::start_forward_and_delay_thread;
use jwt::{AlgorithmType, PKeyWithDigest};
use log::{debug, error, info, warn};
use openssl::{hash::MessageDigest, pkey::PKey};
use solana_address_lookup_table_program::state::AddressLookupTable;
use solana_sdk::address_lookup_table::state::AddressLookupTable;
use solana_metrics::{datapoint_error, datapoint_info};
use solana_net_utils::multi_bind_in_range;
use solana_sdk::{
address_lookup_table_account::AddressLookupTableAccount,
address_lookup_table::AddressLookupTableAccount,
pubkey::Pubkey,
signature::{read_keypair_file, Signer},
};
use solana_validator::admin_rpc_service::StakedNodesOverrides;
use agave_validator::admin_rpc_service::StakedNodesOverrides;
use tikv_jemallocator::Jemalloc;
use tokio::{runtime::Builder, signal, sync::mpsc::channel};
use tonic::transport::Server;
Expand Down