Skip to content
248 changes: 96 additions & 152 deletions Cargo.lock

Large diffs are not rendered by default.

64 changes: 32 additions & 32 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,36 +20,36 @@ keywords = ["solana"]
publish = false

[workspace.dependencies]
affinity = "0.1.2"
affinity = "~0.1.2"
agave-geyser-plugin-interface = "~2.3.0"
anyhow = "1.0.62"
backoff = "0.4.0"
base64 = "0.22.1"
bincode = "1.3.3"
bs58 = "0.5.1"
bytes = "1.3.0"
cargo-lock = "10.0.1"
chrono = "0.4.26"
clap = "4.3.0"
criterion = "0.5.1"
crossbeam-channel = "0.5.8"
env_logger = "0.11.3"
futures = "0.3.24"
git-version = "0.3.5"
hex = "0.4.3"
hostname = "0.4.0"
http = "1.1.0"
http-body-util = "0.1.2"
humantime-serde = "1.1.1"
hyper = "1.4.1"
hyper-util = "0.1.7"
indicatif = "0.17.9"
backoff = "~0.4.0"
base64 = "~0.22.1"
bincode = "1"
bs58 = "~0.5.1"
bytes = "1"
cargo-lock = "10"
chrono = "~0.4.26"
clap = "4"
criterion = "~0.5.1"
crossbeam-channel = "~0.5.8"
env_logger = "~0.11.3"
futures = "~0.3.24"
git-version = "~0.3.5"
hex = "~0.4.3"
hostname = "~0.4.0"
http = "~1.1.0"
http-body-util = "~0.1.2"
humantime-serde = "~1.1.1"
hyper = "~1.4.1"
hyper-util = "~0.1.7"
indicatif = "~0.17.9"
lazy_static = "1.4.0"
local-ip-address = "0.6.1"
log = "0.4.17"
local-ip-address = "~0.6.1"
log = "~0.4.17"
maplit = "1.0.2"
prometheus = "0.13.2"
prost = "0.13.1"
prost = "~0.13.1"
prost-types = "0.13.3"
prost_011 = { package = "prost", version = "0.11.9" }
protobuf-src = "1.1.0"
Expand All @@ -70,15 +70,15 @@ solana-transaction = "~2.2.1"
solana-transaction-context = "~2.3.0"
solana-transaction-error = "~2.2.1"
solana-transaction-status = "~2.3.0"
smallvec = "1.13.2"
smallvec = "1"
spl-token-2022 = "8.0.0"
thiserror = "1.0.63"
tokio = "1.21.2"
thiserror = "1"
tokio = "1"
tokio-stream = "0.1.11"
tonic = "0.12.1"
tonic-build = "0.12.1"
tonic-health = "0.12.1"
vergen = "9.0.0"
tonic = "~0.13.1"
tonic-build = "~0.13.1"
tonic-health = "~0.13.1"
vergen = "9"
yellowstone-grpc-client = { path = "yellowstone-grpc-client", version = "8.0.0" }
yellowstone-grpc-proto = { path = "yellowstone-grpc-proto", version = "8.0.0", default-features = false }

Expand Down
1 change: 0 additions & 1 deletion examples/rust/src/bin/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,6 @@ async fn main() -> anyhow::Result<()> {
.inspect_err(|error| error!("failed to connect: {error}"))
})
.await
.map_err(Into::into)
}

async fn geyser_health_watch(mut client: GeyserGrpcClient<impl Interceptor>) -> anyhow::Result<()> {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion yellowstone-grpc-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ publish = true
bytes = { workspace = true }
futures = { workspace = true }
thiserror ={ workspace = true }
tonic = { workspace = true, features = ["tls", "tls-roots"] }
tonic = { workspace = true, features = ["tls-native-roots"] }
tonic-health = { workspace = true }
yellowstone-grpc-proto = { workspace = true, features = ["tonic", "tonic-compression"] }

Expand Down
2 changes: 1 addition & 1 deletion yellowstone-grpc-geyser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spl-token-2022 = { workspace = true, features = ["no-entrypoint"] }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "fs"] }
tokio-stream = { workspace = true }
tonic = { workspace = true, features = ["gzip", "zstd", "tls", "tls-roots"] }
tonic = { workspace = true, features = ["gzip", "zstd", "tls-native-roots"] }
tonic-health = { workspace = true }
yellowstone-grpc-proto = { workspace = true, features = ["convert", "plugin"] }

Expand Down
35 changes: 17 additions & 18 deletions yellowstone-grpc-geyser/src/grpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use {
},
tokio_stream::wrappers::ReceiverStream,
tonic::{
service::interceptor::interceptor,
service::interceptor,
transport::{
server::{Server, TcpIncoming},
Identity, ServerTlsConfig,
Expand Down Expand Up @@ -252,7 +252,7 @@ struct MessageId {
}

impl MessageId {
fn next(&mut self) -> u64 {
const fn next(&mut self) -> u64 {
self.id = self.id.checked_add(1).expect("message id overflow");
self.id
}
Expand Down Expand Up @@ -357,12 +357,9 @@ impl GrpcService {
Arc<Notify>,
)> {
// Bind service address
let incoming = TcpIncoming::new(
config.address,
true, // tcp_nodelay
Some(Duration::from_secs(20)), // tcp_keepalive
)
.map_err(|error| anyhow::anyhow!(error))?;
let incoming = TcpIncoming::bind(config.address)?
.with_nodelay(Some(true))
.with_keepalive(Some(Duration::from_secs(20)));

// Snapshot channel
let (snapshot_tx, snapshot_rx) = match config.snapshot_plugin_channel_capacity {
Expand Down Expand Up @@ -483,20 +480,22 @@ impl GrpcService {
let shutdown_grpc = Arc::clone(&shutdown);
tokio::spawn(async move {
// gRPC Health check service
let (mut health_reporter, health_service) = health_reporter();
let (health_reporter, health_service) = health_reporter();
health_reporter.set_serving::<GeyserServer<Self>>().await;

server_builder
.layer(interceptor(move |request: Request<()>| {
if let Some(x_token) = &config.x_token {
match request.metadata().get("x-token") {
Some(token) if x_token == token => Ok(request),
_ => Err(Status::unauthenticated("No valid auth token")),
.layer(interceptor::InterceptorLayer::new(
move |request: Request<()>| {
if let Some(x_token) = &config.x_token {
match request.metadata().get("x-token") {
Some(token) if x_token == token => Ok(request),
_ => Err(Status::unauthenticated("No valid auth token")),
}
} else {
Ok(request)
}
} else {
Ok(request)
}
}))
},
))
.add_service(health_service)
.add_service(service)
.serve_with_incoming_shutdown(incoming, shutdown_grpc.notified())
Expand Down
5 changes: 3 additions & 2 deletions yellowstone-grpc-proto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,9 @@ pub mod convert_to {
rewards,
loaded_addresses,
return_data,
compute_units_consumed,
cost_units } = meta;
compute_units_consumed,
cost_units,
} = meta;
let err = create_transaction_error(status);
let inner_instructions_none = inner_instructions.is_none();
let inner_instructions = inner_instructions
Expand Down
1 change: 1 addition & 0 deletions yellowstone-grpc-proto/src/plugin/filter/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,7 @@ mod tests {
loaded_addresses: LoadedAddresses::default(),
return_data: None,
compute_units_consumed: None,
cost_units: None,
});
let sig = sanitized_transaction.signature();
let account_keys = sanitized_transaction
Expand Down
1 change: 1 addition & 0 deletions yellowstone-grpc-proto/src/plugin/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,7 @@ pub enum Message {
}

impl Message {
#[allow(clippy::missing_const_for_fn)]
pub fn get_slot(&self) -> u64 {
match self {
Self::Slot(msg) => msg.slot,
Expand Down
Loading