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

update sol deps #28

Closed
wants to merge 3 commits into from
Closed
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
739 changes: 640 additions & 99 deletions Cargo.lock

Large diffs are not rendered by default.

28 changes: 20 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ crossbeam-channel = "0.5.8"
futures-util = "0.3.28"
geyser-grpc-plugin-client = { path = "client" }
jito-geyser-protos = { path = "proto" }

jito-solana-account-decoder = { git = "https://github.com/jito-foundation/jito-solana.git", rev = "2a7dcc95483c50172545756685f842124d0d8032", package = "solana-account-decoder" }
jito-solana-geyser-plugin-interface = { git = "https://github.com/jito-foundation/jito-solana.git", rev = "2a7dcc95483c50172545756685f842124d0d8032", package = "solana-geyser-plugin-interface" }
jito-solana-logger = { git = "https://github.com/jito-foundation/jito-solana.git", rev = "2a7dcc95483c50172545756685f842124d0d8032", package = "solana-logger" }
jito-solana-metrics = { git = "https://github.com/jito-foundation/jito-solana.git", rev = "2a7dcc95483c50172545756685f842124d0d8032", package = "solana-metrics" }
jito-solana-program = { git = "https://github.com/jito-foundation/jito-solana.git", rev = "2a7dcc95483c50172545756685f842124d0d8032", package = "solana-program" }
jito-solana-sdk = { git = "https://github.com/jito-foundation/jito-solana.git", rev = "2a7dcc95483c50172545756685f842124d0d8032", package = "solana-sdk" }
jito-solana-transaction-status = { git = "https://github.com/jito-foundation/jito-solana.git", rev = "2a7dcc95483c50172545756685f842124d0d8032", package = "solana-transaction-status" }
jito-solana-vote-program = { git = "https://github.com/jito-foundation/jito-solana.git", rev = "2a7dcc95483c50172545756685f842124d0d8032", package = "solana-vote-program" }

log = "0.4"
lru = "0.8" # keep old version due to MSRV of 1.60
once_cell = "1.17.1"
Expand All @@ -35,14 +45,16 @@ rand = "0.8"
serde = "1.0.160"
serde_derive = "1.0.160"
serde_json = "1.0.96"
solana-account-decoder = "1.16.5"
solana-geyser-plugin-interface = "1.16.5"
solana-logger = "1.16.5"
solana-metrics = "1.16.5"
solana-program = "1.16.5"
solana-sdk = "1.16.5"
solana-transaction-status = "1.16.5"
solana-vote-program = "1.16.5"

solana-account-decoder = "1.16.14"
solana-geyser-plugin-interface = "1.16.14"
solana-logger = "1.16.14"
solana-metrics = "1.16.14"
solana-program = "1.16.14"
solana-sdk = "1.16.14"
solana-transaction-status = "1.16.14"
solana-vote-program = "1.16.14"

thiserror = "1.0.40"
tokio = { version = "~1.14.1", features = ["rt-multi-thread"] }
tokio-stream = "0.1"
Expand Down
4 changes: 4 additions & 0 deletions client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ edition = { workspace = true }

[dependencies]
jito-geyser-protos = { workspace = true }
jito-solana-sdk = { workspace = true, optional = true }
log = { workspace = true }
lru = { workspace = true }
prost = { workspace = true }
Expand All @@ -21,3 +22,6 @@ tonic = { workspace = true, features = ["tls"] }

[build-dependencies]
tonic-build = { workspace = true }

[features]
jito-solana = ["jito-solana-sdk"]
6 changes: 6 additions & 0 deletions client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ pub mod geyser_consumer;
pub mod interceptor;
pub mod types;

#[cfg(not(feature = "jito-solana"))]
extern crate solana_sdk;

#[cfg(feature = "jito-solana")]
extern crate jito_solana_sdk as solana_sdk;

use std::{
str::FromStr,
sync::{atomic::AtomicBool, Arc},
Expand Down
6 changes: 6 additions & 0 deletions proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ description = "Jito's Solana geyser protobufs and helper libraries"

[dependencies]
bincode = { workspace = true }
jito-solana-account-decoder = { workspace = true, optional = true }
jito-solana-sdk = { workspace = true, optional = true }
jito-solana-transaction-status = { workspace = true, optional = true }
prost = { workspace = true }
prost-types = { workspace = true }
serde = { workspace = true }
Expand All @@ -18,3 +21,6 @@ tonic = { workspace = true }

[build-dependencies]
tonic-build = { workspace = true }

[features]
jito-solana = ["jito-solana-account-decoder", "jito-solana-sdk", "jito-solana-transaction-status"]
1 change: 1 addition & 0 deletions proto/proto/transaction_by_addr.proto
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ enum TransactionErrorType {
MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED = 32;
INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT = 33;
RESANITIZATION_NEEDED = 34;
UNBALANCED_TRANSACTION = 36;
}

message InstructionError {
Expand Down
3 changes: 3 additions & 0 deletions proto/src/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,9 @@ impl From<TransactionError> for tx_by_addr::TransactionError {
}
TransactionError::ResanitizationNeeded => {
tx_by_addr::TransactionErrorType::ResanitizationNeeded
},
TransactionError::UnbalancedTransaction => {
tx_by_addr::TransactionErrorType::UnbalancedTransaction
}
} as i32,
instruction_error: match transaction_error {
Expand Down
14 changes: 14 additions & 0 deletions proto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ use solana_transaction_status::{
InnerInstructions, Reward, RewardType, TransactionStatusMeta, TransactionTokenBalance,
};

#[cfg(not(feature = "jito-solana"))]
extern crate solana_account_decoder;
#[cfg(not(feature = "jito-solana"))]
extern crate solana_sdk;
#[cfg(not(feature = "jito-solana"))]
extern crate solana_transaction_status;

#[cfg(feature = "jito-solana")]
extern crate jito_solana_account_decoder as solana_account_decoder;
#[cfg(feature = "jito-solana")]
extern crate jito_solana_sdk as solana_sdk;
#[cfg(feature = "jito-solana")]
extern crate jito_solana_transaction_status as solana_transaction_status;

pub mod convert;

// NOTE: Jito added
Expand Down
11 changes: 10 additions & 1 deletion server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ crate-type = ["cdylib", "rlib"]
bs58 = { workspace = true }
crossbeam-channel = { workspace = true }
futures-util = { workspace = true }
jito-geyser-protos = { workspace = true }
jito-geyser-protos = { workspace = true }
jito-solana-geyser-plugin-interface = { workspace = true, optional = true }
jito-solana-logger = { workspace = true, optional = true }
jito-solana-metrics = { workspace = true, optional = true }
jito-solana-program = { workspace = true, optional = true }
jito-solana-sdk = { workspace = true, optional = true }
jito-solana-vote-program = { workspace = true, optional = true }
log = { workspace = true }
once_cell = { workspace = true }
prost = { workspace = true }
Expand All @@ -38,3 +44,6 @@ tonic-build = { workspace = true }

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[features]
jito-solana = ["jito-solana-geyser-plugin-interface", "jito-solana-logger", "jito-solana-metrics", "jito-solana-program", "jito-solana-sdk", "jito-solana-vote-program"]
26 changes: 26 additions & 0 deletions server/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
pub mod geyser_grpc_plugin;
pub mod server;
pub(crate) mod subscription_stream;

#[cfg(not(feature = "jito-solana"))]
extern crate solana_geyser_plugin_interface;
#[cfg(not(feature = "jito-solana"))]
extern crate solana_logger;
#[cfg(not(feature = "jito-solana"))]
extern crate solana_metrics;
#[cfg(not(feature = "jito-solana"))]
extern crate solana_program;
#[cfg(not(feature = "jito-solana"))]
extern crate solana_sdk;
#[cfg(not(feature = "jito-solana"))]
extern crate solana_vote_program;

#[cfg(feature = "jito-solana")]
extern crate jito_solana_geyser_plugin_interface as solana_geyser_plugin_interface;
#[cfg(feature = "jito-solana")]
extern crate jito_solana_logger as solana_logger;
#[cfg(feature = "jito-solana")]
extern crate jito_solana_metrics as solana_metrics;
#[cfg(feature = "jito-solana")]
extern crate jito_solana_program as solana_program;
#[cfg(feature = "jito-solana")]
extern crate jito_solana_sdk as solana_sdk;
#[cfg(feature = "jito-solana")]
extern crate jito_solana_vote_program as solana_vote_program;
Loading