Skip to content

Commit

Permalink
solana: relax dependencies (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
fanatid committed Oct 3, 2024
1 parent ccfd827 commit 50068e2
Show file tree
Hide file tree
Showing 13 changed files with 84 additions and 75 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ The minor version will be incremented upon a breaking change and the patch versi

### Features

- solana: relax dependencies ([#430](https://github.com/rpcpool/yellowstone-grpc/pull/430))

### Breaking

## 2024-09-12
Expand Down
36 changes: 13 additions & 23 deletions Cargo.lock

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

30 changes: 17 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[workspace]
resolver = "2"
members = [
"examples/rust", # 1.14.1+solana.2.0.10
"yellowstone-grpc-client", # 1.16.2+solana.2.0.10
"yellowstone-grpc-geyser", # 1.16.3+solana.2.0.10
"yellowstone-grpc-proto", # 1.15.0+solana.2.0.10
"yellowstone-grpc-tools", # 1.0.0-rc.12+solana.2.0.10
"examples/rust", # 1.14.1
"yellowstone-grpc-client", # 1.16.2
"yellowstone-grpc-geyser", # 1.16.3
"yellowstone-grpc-proto", # 1.15.0
"yellowstone-grpc-tools", # 1.0.0-rc.12
]

[workspace.package]
Expand All @@ -17,10 +17,9 @@ license = "AGPL-3.0"
keywords = ["solana"]

[workspace.dependencies]
agave-geyser-plugin-interface = "=2.0.10"
agave-geyser-plugin-interface = "~2.0.10"
anyhow = "1.0.62"
async-trait = "0.1.73"
atty = "0.2.14"
backoff = "0.4.0"
base64 = "0.22.1"
bincode = "1.3.3"
Expand Down Expand Up @@ -56,10 +55,10 @@ serde = "1.0.145"
serde_json = "1.0.86"
serde_yaml = "0.9.25"
sha2 = "0.10.7"
solana-account-decoder = "=2.0.10"
solana-logger = "=2.0.10"
solana-sdk = "=2.0.10"
solana-transaction-status = "=2.0.10"
solana-account-decoder = "~2.0.10"
solana-logger = "~2.0.10"
solana-sdk = "~2.0.10"
solana-transaction-status = "~2.0.10"
spl-token-2022 = "4.0.0"
thiserror = "1.0"
tokio = "1.21.2"
Expand All @@ -71,8 +70,13 @@ tracing = "0.1.37"
tracing-subscriber = "0.3.17"
uuid = "1.8.0"
vergen = "9.0.0"
yellowstone-grpc-client = { path = "yellowstone-grpc-client", version = "=1.16.2+solana.2.0.10" }
yellowstone-grpc-proto = { path = "yellowstone-grpc-proto", version = "=1.15.0+solana.2.0.10", default-features = false }
yellowstone-grpc-client = { path = "yellowstone-grpc-client", version = "1.16.2" }
yellowstone-grpc-proto = { path = "yellowstone-grpc-proto", version = "1.15.0", default-features = false }

[workspace.lints.clippy]
clone_on_ref_ptr = "deny"
missing_const_for_fn = "deny"
trivially_copy_pass_by_ref = "deny"

[profile.release]
lto = true
Expand Down
45 changes: 23 additions & 22 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,39 @@ all-features = true

[advisories]
ignore = [
# atty 0.2.14
# Advisory: https://rustsec.org/advisories/RUSTSEC-2021-0145
# On windows, `atty` dereferences a potentially unaligned pointer.
"RUSTSEC-2021-0145",

# ed25519-dalek 1.0.1
# Advisory: https://rustsec.org/advisories/RUSTSEC-2022-0093
# Versions of `ed25519-dalek` prior to v2.0 model private and public keys as
# separate types which can be assembled into a `Keypair`, and also provide APIs
# for serializing and deserializing 64-byte private/public keypairs.
"RUSTSEC-2022-0093",

# borsh 0.9.3
# Advisory: https://rustsec.org/advisories/RUSTSEC-2023-0033
# Affected versions of borsh cause undefined behavior when zero-sized-types (ZST)
# Affected versions of borsh cause undefined behavior when zero-sized-types (ZST)
# are parsed and the Copy/Clone traits are not implemented/derived.
# For instance if 1000 instances of a ZST are deserialized, and the ZST is not copy
# (this can be achieved through a singleton), then accessing/writing to deserialized
# For instance if 1000 instances of a ZST are deserialized, and the ZST is not copy
# (this can be achieved through a singleton), then accessing/writing to deserialized
# data will cause a segmentation fault.
# borsh 0.10.3
# Advisory: https://rustsec.org/advisories/RUSTSEC-2023-0033
# Affected versions of borsh cause undefined behavior when zero-sized-types (ZST)
# Affected versions of borsh cause undefined behavior when zero-sized-types (ZST)
# are parsed and the Copy/Clone traits are not implemented/derived.
# For instance if 1000 instances of a ZST are deserialized, and the ZST is not copy
# (this can be achieved through a singleton), then accessing/writing to deserialized
# For instance if 1000 instances of a ZST are deserialized, and the ZST is not copy
# (this can be achieved through a singleton), then accessing/writing to deserialized
# data will cause a segmentation fault.
"RUSTSEC-2023-0033",

# ed25519-dalek 1.0.1
# Advisory: https://rustsec.org/advisories/RUSTSEC-2022-0093
# Versions of `ed25519-dalek` prior to v2.0 model private and public keys as
# separate types which can be assembled into a `Keypair`, and also provide APIs
# for serializing and deserializing 64-byte private/public keypairs.
"RUSTSEC-2022-0093",
# proc-macro-error 1.0.4
# proc-macro-error's maintainer seems to be unreachable, with no commits for 2 years, no releases pushed for 4 years, and no activity on the GitLab repo or response to email.
"RUSTSEC-2024-0370",

# atty 0.2.14
# Advisory: https://rustsec.org/advisories/RUSTSEC-2021-0145
# On windows, `atty` dereferences a potentially unaligned pointer.
"RUSTSEC-2021-0145",

# curve25519-dalek 3.2.1
# Advisory: https://rustsec.org/advisories/RUSTSEC-2024-0344
# Timing variability of any kind is problematic when working with potentially secret values such as
# elliptic curve scalars, and such issues can potentially leak private keys and other secrets. Such a
# problem was recently discovered in `curve25519-dalek`.
"RUSTSEC-2024-0344",
# The maintainer of `atty` has [published](https://github.com/softprops/atty/commit/5bfdbe9e48c6ca6a4909e8d5b04f5e843a257e93) an official notice that the crate is no longer under development, and that users should instead rely on the functionality in the standard library's [`IsTerminal`](https://doc.rust-lang.org/std/io/trait.IsTerminal.html) trait.
"RUSTSEC-2024-0375",
]
5 changes: 4 additions & 1 deletion examples/rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "yellowstone-grpc-client-simple"
version = "1.14.1+solana.2.0.10"
version = "1.14.1"
authors = { workspace = true }
edition = { workspace = true }
homepage = { workspace = true }
Expand Down Expand Up @@ -31,3 +31,6 @@ tokio = { workspace = true, features = ["rt-multi-thread"] }
tonic = { workspace = true }
yellowstone-grpc-client = { workspace = true }
yellowstone-grpc-proto = { workspace = true, default-features = true }

[lints]
workspace = true
5 changes: 4 additions & 1 deletion yellowstone-grpc-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "yellowstone-grpc-client"
version = "1.16.2+solana.2.0.10"
version = "1.16.2"
authors = { workspace = true }
edition = { workspace = true }
description = "Yellowstone gRPC Geyser Simple Client"
Expand All @@ -20,3 +20,6 @@ yellowstone-grpc-proto = { workspace = true }

[dev-dependencies]
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }

[lints]
workspace = true
4 changes: 2 additions & 2 deletions yellowstone-grpc-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl GeyserGrpcClient<()> {
}

impl<F: Interceptor> GeyserGrpcClient<F> {
pub fn new(
pub const fn new(
health: HealthClient<InterceptedService<Channel, F>>,
geyser: GeyserClient<InterceptedService<Channel, F>>,
) -> Self {
Expand Down Expand Up @@ -224,7 +224,7 @@ pub struct GeyserGrpcBuilder {

impl GeyserGrpcBuilder {
// Create new builder
fn new(endpoint: Endpoint) -> Self {
const fn new(endpoint: Endpoint) -> Self {
Self {
endpoint,
x_token: None,
Expand Down
5 changes: 4 additions & 1 deletion yellowstone-grpc-geyser/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "yellowstone-grpc-geyser"
version = "1.16.3+solana.2.0.10"
version = "1.16.3"
authors = { workspace = true }
edition = { workspace = true }
description = "Yellowstone gRPC Geyser Plugin"
Expand Down Expand Up @@ -50,3 +50,6 @@ anyhow = { workspace = true }
cargo-lock = { workspace = true }
git-version = { workspace = true }
vergen = { workspace = true, features = ["build", "rustc"] }

[lints]
workspace = true
4 changes: 0 additions & 4 deletions yellowstone-grpc-geyser/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
#![deny(clippy::clone_on_ref_ptr)]
#![deny(clippy::missing_const_for_fn)]
#![deny(clippy::trivially_copy_pass_by_ref)]

pub mod config;
pub mod filters;
pub mod grpc;
Expand Down
5 changes: 4 additions & 1 deletion yellowstone-grpc-proto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "yellowstone-grpc-proto"
version = "1.15.0+solana.2.0.10"
version = "1.15.0"
authors = { workspace = true }
edition = { workspace = true }
description = "Yellowstone gRPC Geyser Protobuf Definitions"
Expand All @@ -26,3 +26,6 @@ tonic-build = { workspace = true }
[features]
convert = ["dep:solana-account-decoder", "dep:solana-sdk", "dep:solana-transaction-status"]
default = ["convert"]

[lints]
workspace = true
5 changes: 5 additions & 0 deletions yellowstone-grpc-proto/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#![allow(clippy::large_enum_variant)]

pub mod geyser {
#![allow(clippy::clone_on_ref_ptr)]
#![allow(clippy::missing_const_for_fn)]

tonic::include_proto!("geyser");
}

pub mod solana {
#![allow(clippy::missing_const_for_fn)]

pub mod storage {
pub mod confirmed_block {
tonic::include_proto!("solana.storage.confirmed_block");
Expand Down
6 changes: 4 additions & 2 deletions yellowstone-grpc-tools/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "yellowstone-grpc-tools"
version = "1.0.0-rc.12+solana.2.0.10"
version = "1.0.0-rc.12"
authors = { workspace = true }
edition = { workspace = true }
description = "Yellowstone gRPC Tools"
Expand All @@ -21,7 +21,6 @@ required-features = ["kafka"]
[dependencies]
anyhow = { workspace = true }
async-trait = { workspace = true }
atty = { workspace = true }
clap = { workspace = true, features = ["derive"] }
const-hex = { workspace = true, optional = true }
futures = { workspace = true }
Expand Down Expand Up @@ -68,3 +67,6 @@ vergen = { workspace = true, features = ["build", "rustc"] }
default = ["google-pubsub", "kafka"]
google-pubsub = ["google-cloud-googleapis", "google-cloud-pubsub"]
kafka = ["const-hex", "rdkafka", "sha2"]

[lints]
workspace = true
7 changes: 2 additions & 5 deletions yellowstone-grpc-tools/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
#![deny(clippy::clone_on_ref_ptr)]
#![deny(clippy::missing_const_for_fn)]
#![deny(clippy::trivially_copy_pass_by_ref)]

pub mod config;
#[cfg(feature = "google-pubsub")]
pub mod google_pubsub;
Expand All @@ -13,6 +9,7 @@ pub mod version;

use {
futures::future::{BoxFuture, FutureExt},
std::io::{self, IsTerminal},
tokio::signal::unix::{signal, SignalKind},
tracing_subscriber::{
filter::{EnvFilter, LevelFilter},
Expand All @@ -22,7 +19,7 @@ use {
};

pub fn setup_tracing() -> anyhow::Result<()> {
let is_atty = atty::is(atty::Stream::Stdout) && atty::is(atty::Stream::Stderr);
let is_atty = io::stdout().is_terminal() && io::stderr().is_terminal();
let io_layer = tracing_subscriber::fmt::layer().with_ansi(is_atty);
let level_layer = EnvFilter::builder()
.with_default_directive(LevelFilter::INFO.into())
Expand Down

0 comments on commit 50068e2

Please sign in to comment.