diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0c432192..69a55412 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,7 +61,7 @@ jobs: - name: Install dependencies run: | sudo apt-get update - sudo apt-get install -y libsasl2-dev + sudo apt-get install -y libsasl2-dev protobuf-compiler - name: Check Solana version run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index cf5185fc..930aecf2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,11 +12,25 @@ The minor version will be incremented upon a breaking change and the patch versi ### Fixes +### Features + +### Breaking + +## 2024-06-02 + +- yellowstone-grpc-client-1.15.0+solana.1.18.15 +- yellowstone-grpc-geyser-1.14.2+solana.1.18.15 +- yellowstone-grpc-proto-1.14.0+solana.1.18.15 +- yellowstone-grpc-tools-1.0.0-rc.11+solana.1.18.15 + +### Fixes + - geyser: fix getLatestBlockhash unary method ([#349](https://github.com/rpcpool/yellowstone-grpc/pull/349)) ### Features -### Breaking +- geyser: add optional x_token check in grpc server ([#345](https://github.com/rpcpool/yellowstone-grpc/pull/345)) +- solana: update to 1.18.15 ([#354](https://github.com/rpcpool/yellowstone-grpc/pull/354)) ## 2024-05-21 diff --git a/Cargo.lock b/Cargo.lock index 7e29bfdd..1c2279fd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3856,9 +3856,9 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "1.18.14" +version = "1.18.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1387123a0daab82dbd205c543f8bba0ed5345fc6b8eaa910ecd9dcb7469fc78" +checksum = "52346da8fbbac45fdfbb9c09f7a4e263fabd13f401352e1feedc55e1178a8ba2" dependencies = [ "Inflector", "base64 0.21.7", @@ -3881,9 +3881,9 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "1.18.14" +version = "1.18.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0756e2a78554efdcb997a00a652b20291a823f2415c752adaa0dad7320460c9" +checksum = "2010ba6fe2a1c4270ca3d3ef23ebfd893e3d2c980b9c0fc04451c4ce2f6b3deb" dependencies = [ "bincode", "chrono", @@ -3895,9 +3895,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi" -version = "1.18.14" +version = "1.18.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d353eac7a178cd8a2ceaf5d304719d4a30c1d3f24f303145d5b029b8cc7c35f0" +checksum = "2c00a6aca244dfa904e2c4a26406ba7b0987344ceaec932f3cda0b35eff0babc" dependencies = [ "block-buffer 0.10.4", "bs58", @@ -3920,9 +3920,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.18.14" +version = "1.18.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc87189dcb2d2da407831fc983e4f05e70c58be12b5c713e9a05f873edb42637" +checksum = "bed58b27b9b8877893f69bc5cfd1c62e984315e0229d83cf8a32ad0933c0d6c9" dependencies = [ "proc-macro2", "quote", @@ -3932,9 +3932,9 @@ dependencies = [ [[package]] name = "solana-geyser-plugin-interface" -version = "1.18.14" +version = "1.18.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac6374462b0a0e391e7bd0691439b18aee2f1b79a2d859166af37dd48051d365" +checksum = "98518d17c72801e41ea60c98703e3b0de9867ee45c8f1afb1544406e05115340" dependencies = [ "log", "solana-sdk", @@ -3944,9 +3944,9 @@ dependencies = [ [[package]] name = "solana-logger" -version = "1.18.14" +version = "1.18.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d857a115710eeb1c5ac98a340141f0c49cc31854168767d0c5b855e212632a5" +checksum = "bee2daf61ae582edf9634adf8e5021faf002df0d3f69078ecbcd6c7b41bdf833" dependencies = [ "env_logger 0.9.3", "lazy_static", @@ -3955,9 +3955,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.18.14" +version = "1.18.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71a32fb164205ddff073863f17a45e66fe44f88fa0fee2fa9790aa5cd730b616" +checksum = "148512f384b82cf9e8bfe80503b688340d42a4cc17cfd572b88a6d803a488527" dependencies = [ "log", "solana-sdk", @@ -3965,9 +3965,9 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.18.14" +version = "1.18.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374bb8daec434f2c867091ff7c1c494eb358c5c23a583cc44a5a6134609271c2" +checksum = "55d734099c26f81621bd1aaddb8788908e20fd7fac28fb00402d564964eae4ea" dependencies = [ "crossbeam-channel", "gethostname", @@ -3980,9 +3980,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.18.14" +version = "1.18.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad73ff4d5c8d4943988ef18924f5fbd96881410ab20d5a0bfa32bb44d7d4cfce" +checksum = "4f4908f360900d0a1aa81c7bad7937c78f0825c3f08ff0b22f1de0e43e5946f2" dependencies = [ "ark-bn254", "ark-ec", @@ -4035,9 +4035,9 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "1.18.14" +version = "1.18.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b83375b909adeefd5ab9dc1473456df2b46f9377c8fa0d2447cc5a15a94ca407" +checksum = "47c8ace7f999a8278351ea86ed93f57e7833cb65fb04167a9ba9ea593e995288" dependencies = [ "base64 0.21.7", "bincode", @@ -4063,9 +4063,9 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.18.14" +version = "1.18.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f518a377209223b09a0fb62abd53add4a11313a1e85f535f559fbcc0227117a" +checksum = "c50ec330850953d4971b052ff98c74a8e67e7618b4aed9f4971b8d3b68fcd1cd" dependencies = [ "assert_matches", "base64 0.21.7", @@ -4118,9 +4118,9 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.18.14" +version = "1.18.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2975b2c2ed6f06d2ffbb2e6b3e7fdd9ca6b2570a76d49a2173f393e6e84c9c71" +checksum = "95ef2ea49002d1bf52a4a8509570b2c3b88e7b6d0a131b11bbd637ca1e1df0ff" dependencies = [ "bs58", "proc-macro2", @@ -4137,9 +4137,9 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" [[package]] name = "solana-transaction-status" -version = "1.18.14" +version = "1.18.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9672c191c1a7a82d1472ff15ad2a0812e28a27858814ead611a1374b11a70d7" +checksum = "0439563ffb7471a0b51446f0fff5c8b2108e31248bf7dbab8b9efaa2af3a4c27" dependencies = [ "Inflector", "base64 0.21.7", @@ -4162,9 +4162,9 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.18.14" +version = "1.18.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cefc9878a202bf9606745e56712f7d56878ea31b29f2f89785b4b801b264322" +checksum = "5cafb3df56516086f65e2a08a8cd03f504236f3b5348299abd45415d1d18ba32" dependencies = [ "aes-gcm-siv", "base64 0.21.7", @@ -5498,7 +5498,7 @@ dependencies = [ [[package]] name = "yellowstone-grpc-client" -version = "1.15.0+solana.1.18.14" +version = "1.15.0+solana.1.18.15" dependencies = [ "bytes", "futures", @@ -5534,7 +5534,7 @@ dependencies = [ [[package]] name = "yellowstone-grpc-geyser" -version = "1.14.2+solana.1.18.14" +version = "1.14.2+solana.1.18.15" dependencies = [ "anyhow", "base64 0.21.7", @@ -5567,7 +5567,7 @@ dependencies = [ [[package]] name = "yellowstone-grpc-proto" -version = "1.14.0+solana.1.18.14" +version = "1.14.0+solana.1.18.15" dependencies = [ "anyhow", "bincode", @@ -5582,7 +5582,7 @@ dependencies = [ [[package]] name = "yellowstone-grpc-tools" -version = "1.0.0-rc.11+solana.1.18.14" +version = "1.0.0-rc.11+solana.1.18.15" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 1a0b79f4..64a926da 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,11 @@ [workspace] resolver = "2" members = [ - "examples/rust", # 1.13.0+solana.1.18.14 - "yellowstone-grpc-client", # 1.15.0+solana.1.18.14 - "yellowstone-grpc-geyser", # 1.14.2+solana.1.18.14 - "yellowstone-grpc-proto", # 1.14.0+solana.1.18.14 - "yellowstone-grpc-tools", # 1.0.0-rc.11+solana.1.18.14 + "examples/rust", # 1.13.0+solana.1.18.15 + "yellowstone-grpc-client", # 1.15.0+solana.1.18.15 + "yellowstone-grpc-geyser", # 1.14.2+solana.1.18.15 + "yellowstone-grpc-proto", # 1.14.0+solana.1.18.15 + "yellowstone-grpc-tools", # 1.0.0-rc.11+solana.1.18.15 ] [workspace.package] @@ -56,11 +56,11 @@ serde_json = "1.0.86" serde_with = "3.7.0" serde_yaml = "0.9.25" sha2 = "0.10.7" -solana-account-decoder = "=1.18.14" -solana-geyser-plugin-interface = "=1.18.14" -solana-logger = "=1.18.14" -solana-sdk = "=1.18.14" -solana-transaction-status = "=1.18.14" +solana-account-decoder = "=1.18.15" +solana-geyser-plugin-interface = "=1.18.15" +solana-logger = "=1.18.15" +solana-sdk = "=1.18.15" +solana-transaction-status = "=1.18.15" spl-token-2022 = "0.9.0" thiserror = "1.0" tokio = "1.21.2" @@ -72,8 +72,8 @@ tracing = "0.1.37" tracing-subscriber = "0.3.17" uuid = "1.8.0" vergen = "8.2.1" -yellowstone-grpc-client = { path = "yellowstone-grpc-client", version = "=1.15.0+solana.1.18.14" } -yellowstone-grpc-proto = { path = "yellowstone-grpc-proto", version = "=1.14.0+solana.1.18.14" } +yellowstone-grpc-client = { path = "yellowstone-grpc-client", version = "=1.15.0+solana.1.18.15" } +yellowstone-grpc-proto = { path = "yellowstone-grpc-proto", version = "=1.14.0+solana.1.18.15" } [profile.release] debug = true diff --git a/yellowstone-grpc-client/Cargo.toml b/yellowstone-grpc-client/Cargo.toml index 650ef50a..092393ea 100644 --- a/yellowstone-grpc-client/Cargo.toml +++ b/yellowstone-grpc-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yellowstone-grpc-client" -version = "1.15.0+solana.1.18.14" +version = "1.15.0+solana.1.18.15" authors = { workspace = true } edition = { workspace = true } description = "Yellowstone gRPC Geyser Simple Client" diff --git a/yellowstone-grpc-geyser/Cargo.toml b/yellowstone-grpc-geyser/Cargo.toml index 705f27d7..25c7bf7c 100644 --- a/yellowstone-grpc-geyser/Cargo.toml +++ b/yellowstone-grpc-geyser/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yellowstone-grpc-geyser" -version = "1.14.2+solana.1.18.14" +version = "1.14.2+solana.1.18.15" authors = { workspace = true } edition = { workspace = true } description = "Yellowstone gRPC Geyser Plugin" diff --git a/yellowstone-grpc-geyser/src/grpc.rs b/yellowstone-grpc-geyser/src/grpc.rs index e5d0a600..d4e7097e 100644 --- a/yellowstone-grpc-geyser/src/grpc.rs +++ b/yellowstone-grpc-geyser/src/grpc.rs @@ -776,8 +776,9 @@ impl GrpcService { // Create Server let max_decoding_message_size = config.max_decoding_message_size; + let x_token = XTokenChecker::new(config.x_token.clone()); let service = GeyserServer::new(Self { - config: config.clone(), + config, blocks_meta, subscribe_id: AtomicUsize::new(0), snapshot_rx: Mutex::new(snapshot_rx), @@ -787,7 +788,7 @@ impl GrpcService { .accept_compressed(CompressionEncoding::Gzip) .send_compressed(CompressionEncoding::Gzip) .max_decoding_message_size(max_decoding_message_size); - let service = InterceptedService::new(service, XTokenChecker::new(config.x_token)); + let service = InterceptedService::new(service, x_token); // Run geyser message loop let (messages_tx, messages_rx) = mpsc::unbounded_channel(); @@ -1479,7 +1480,7 @@ impl Interceptor for XTokenChecker { fn call(&mut self, req: Request<()>) -> Result, Status> { if let Some(x_token) = &self.x_token { match req.metadata().get("x-token") { - Some(t) if x_token == t => Ok(req), + Some(token) if x_token == token => Ok(req), _ => Err(Status::unauthenticated("No valid auth token")), } } else { diff --git a/yellowstone-grpc-proto/Cargo.toml b/yellowstone-grpc-proto/Cargo.toml index d299c5ea..da0ecb43 100644 --- a/yellowstone-grpc-proto/Cargo.toml +++ b/yellowstone-grpc-proto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yellowstone-grpc-proto" -version = "1.14.0+solana.1.18.14" +version = "1.14.0+solana.1.18.15" authors = { workspace = true } edition = { workspace = true } description = "Yellowstone gRPC Geyser Protobuf Definitions" diff --git a/yellowstone-grpc-tools/Cargo.toml b/yellowstone-grpc-tools/Cargo.toml index 31a2ed49..a46f654c 100644 --- a/yellowstone-grpc-tools/Cargo.toml +++ b/yellowstone-grpc-tools/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yellowstone-grpc-tools" -version = "1.0.0-rc.11+solana.1.18.14" +version = "1.0.0-rc.11+solana.1.18.15" authors = { workspace = true } edition = { workspace = true } description = "Yellowstone gRPC Tools"