diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bdd1542..2c7b0edb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,10 +14,23 @@ The minor version will be incremented upon a breaking change and the patch versi ### Features -- client: add `GeyserGrpcClient::subscribe_once2` ([#195](https://github.com/rpcpool/yellowstone-grpc/pull/195)). - ### Breaking +## 2023-10-10 + +- yellowstone-grpc-client-1.11.1+solana.1.16.16 +- yellowstone-grpc-geyser-1.9.1+solana.1.16.16 +- yellowstone-grpc-kafka-1.0.0-rc.3+solana.1.16.16 +- yellowstone-grpc-proto-1.10.0+solana.1.16.16 + +### Fixes + +- geyser: use `entry_count` from `ReplicaBlockInfoV3` ([#186](https://github.com/rpcpool/yellowstone-grpc/pull/186)). + +### Features + +- client: add `GeyserGrpcClient::subscribe_once2` ([#195](https://github.com/rpcpool/yellowstone-grpc/pull/195)). + ## 2023-10-09 - yellowstone-grpc-kafka-1.0.0-rc.3+solana.1.16.15 diff --git a/Cargo.lock b/Cargo.lock index aff08596..b7d4725b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3219,9 +3219,8 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "1.16.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "850d5d9dc8fa6ea42f4e61c78e296bbbce5a3531ff4cb3c58ef36ee31781049c" +version = "1.16.16" +source = "git+https://github.com/rpcpool/solana-public.git?tag=v1.16.16-geyser-block-v3#922d06aab6b6d4e866ddb1cef31362b249bf2576" dependencies = [ "Inflector", "base64 0.21.4", @@ -3235,17 +3234,17 @@ dependencies = [ "solana-address-lookup-table-program", "solana-config-program", "solana-sdk", - "spl-token 3.5.0", - "spl-token-2022 0.6.1", + "spl-token", + "spl-token-2022", + "spl-token-metadata-interface", "thiserror", "zstd", ] [[package]] name = "solana-address-lookup-table-program" -version = "1.16.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7f867cde478a078d4c4ceb113f4f9ac7e29c2efea98f80a2b30cdcd7be83c5" +version = "1.16.16" +source = "git+https://github.com/rpcpool/solana-public.git?tag=v1.16.16-geyser-block-v3#922d06aab6b6d4e866ddb1cef31362b249bf2576" dependencies = [ "bincode", "bytemuck", @@ -3264,9 +3263,8 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "1.16.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6f9f2201c7e526581511fa6525e281518be5cabaee82bd5b29fe4b78744148d" +version = "1.16.16" +source = "git+https://github.com/rpcpool/solana-public.git?tag=v1.16.16-geyser-block-v3#922d06aab6b6d4e866ddb1cef31362b249bf2576" dependencies = [ "bincode", "chrono", @@ -3278,9 +3276,8 @@ dependencies = [ [[package]] name = "solana-frozen-abi" -version = "1.16.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "361cc834e5fbbe1a73f1d904fcb8ab052a665e5be6061bd1ba7ab478d7d17c9c" +version = "1.16.16" +source = "git+https://github.com/rpcpool/solana-public.git?tag=v1.16.16-geyser-block-v3#922d06aab6b6d4e866ddb1cef31362b249bf2576" dependencies = [ "ahash 0.8.3", "blake3", @@ -3311,9 +3308,8 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.16.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "575d875dc050689f9f88c542e292e295e2f081d4e96e0df297981e45cbad8824" +version = "1.16.16" +source = "git+https://github.com/rpcpool/solana-public.git?tag=v1.16.16-geyser-block-v3#922d06aab6b6d4e866ddb1cef31362b249bf2576" dependencies = [ "proc-macro2", "quote", @@ -3323,9 +3319,8 @@ dependencies = [ [[package]] name = "solana-geyser-plugin-interface" -version = "1.16.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "268db758cb4193ccf70c85459bfd0e8e5eb7a13b3ee876106d07fada04290a17" +version = "1.16.16" +source = "git+https://github.com/rpcpool/solana-public.git?tag=v1.16.16-geyser-block-v3#922d06aab6b6d4e866ddb1cef31362b249bf2576" dependencies = [ "log", "solana-sdk", @@ -3335,9 +3330,8 @@ dependencies = [ [[package]] name = "solana-logger" -version = "1.16.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00faf7aa6a3f47c542bd45d2d7f13af9a382d993e647976a676fe1b0eec4eb2" +version = "1.16.16" +source = "git+https://github.com/rpcpool/solana-public.git?tag=v1.16.16-geyser-block-v3#922d06aab6b6d4e866ddb1cef31362b249bf2576" dependencies = [ "env_logger 0.9.3", "lazy_static", @@ -3346,9 +3340,8 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.16.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e19c6e1b35df3c212619a7995ae3576fa92ab15ecfc065899f21385cbe45c95" +version = "1.16.16" +source = "git+https://github.com/rpcpool/solana-public.git?tag=v1.16.16-geyser-block-v3#922d06aab6b6d4e866ddb1cef31362b249bf2576" dependencies = [ "log", "solana-sdk", @@ -3356,9 +3349,8 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.16.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10e62760a5f87d836169eb3bb446bae174181db07d2c8016be36de49c04fd432" +version = "1.16.16" +source = "git+https://github.com/rpcpool/solana-public.git?tag=v1.16.16-geyser-block-v3#922d06aab6b6d4e866ddb1cef31362b249bf2576" dependencies = [ "crossbeam-channel", "gethostname", @@ -3370,9 +3362,8 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.16.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9863ff5c6e828015bec331c26fb53e48352a264a9be682e7e078d2c3b3e93b46" +version = "1.16.16" +source = "git+https://github.com/rpcpool/solana-public.git?tag=v1.16.16-geyser-block-v3#922d06aab6b6d4e866ddb1cef31362b249bf2576" dependencies = [ "ark-bn254", "ark-ec", @@ -3425,9 +3416,8 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "1.16.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05813d4d2e141ab4449cf684cc5b05512dfaabb7251561c5bb1ccf1e4221b210" +version = "1.16.16" +source = "git+https://github.com/rpcpool/solana-public.git?tag=v1.16.16-geyser-block-v3#922d06aab6b6d4e866ddb1cef31362b249bf2576" dependencies = [ "base64 0.21.4", "bincode", @@ -3453,9 +3443,8 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.16.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "621e6973766420162541b26e7974783d32d5471571610da30c5bb0b6263046c9" +version = "1.16.16" +source = "git+https://github.com/rpcpool/solana-public.git?tag=v1.16.16-geyser-block-v3#922d06aab6b6d4e866ddb1cef31362b249bf2576" dependencies = [ "assert_matches", "base64 0.21.4", @@ -3506,9 +3495,8 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.16.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd177a74fb3a0a362f1292c027d668eff609ac189f08b78158324587a0a4f8d1" +version = "1.16.16" +source = "git+https://github.com/rpcpool/solana-public.git?tag=v1.16.16-geyser-block-v3#922d06aab6b6d4e866ddb1cef31362b249bf2576" dependencies = [ "bs58", "proc-macro2", @@ -3519,14 +3507,13 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "1.16.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8aed485ddb4268b4e4ec64012016cd54ba3a4142377a99706fc3ab7768eb2bea" +version = "1.16.16" +source = "git+https://github.com/rpcpool/solana-public.git?tag=v1.16.16-geyser-block-v3#922d06aab6b6d4e866ddb1cef31362b249bf2576" dependencies = [ "Inflector", "base64 0.21.4", "bincode", - "borsh 0.9.3", + "borsh 0.10.3", "bs58", "lazy_static", "log", @@ -3537,17 +3524,17 @@ dependencies = [ "solana-address-lookup-table-program", "solana-sdk", "spl-associated-token-account", - "spl-memo 3.0.1", - "spl-token 3.5.0", - "spl-token-2022 0.6.1", + "spl-memo", + "spl-token", + "spl-token-2022", "thiserror", ] [[package]] name = "solana-zk-token-sdk" -version = "1.16.15" +version = "1.16.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61aabdec9fe1b311dce5d21fa5bd58fbaa985e8003e0d0aedf3795113aacc1ea" +checksum = "5d1fe77918563768a65fd5d6cd2fa06cf0aeb11e529a1ef8c230b0fe018600e3" dependencies = [ "aes-gcm-siv", "base64 0.21.4", @@ -3599,17 +3586,17 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spl-associated-token-account" -version = "1.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978dba3bcbe88d0c2c58366c254d9ea41c5f73357e72fc0bdee4d6b5fc99c8f4" +checksum = "385e31c29981488f2820b2022d8e731aae3b02e6e18e2fd854e4c9a94dc44fc3" dependencies = [ "assert_matches", - "borsh 0.9.3", - "num-derive 0.3.3", + "borsh 0.10.3", + "num-derive 0.4.0", "num-traits", "solana-program", - "spl-token 3.5.0", - "spl-token-2022 0.6.1", + "spl-token", + "spl-token-2022", "thiserror", ] @@ -3648,15 +3635,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "spl-memo" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd0dc6f70db6bacea7ff25870b016a65ba1d1b6013536f08e4fd79a8f9005325" -dependencies = [ - "solana-program", -] - [[package]] name = "spl-memo" version = "4.0.0" @@ -3718,21 +3696,6 @@ dependencies = [ "spl-type-length-value", ] -[[package]] -name = "spl-token" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e85e168a785e82564160dcb87b2a8e04cee9bfd1f4d488c729d53d6a4bd300d" -dependencies = [ - "arrayref", - "bytemuck", - "num-derive 0.3.3", - "num-traits", - "num_enum 0.5.11", - "solana-program", - "thiserror", -] - [[package]] name = "spl-token" version = "4.0.0" @@ -3748,24 +3711,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "spl-token-2022" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0043b590232c400bad5ee9eb983ced003d15163c4c5d56b090ac6d9a57457b47" -dependencies = [ - "arrayref", - "bytemuck", - "num-derive 0.3.3", - "num-traits", - "num_enum 0.5.11", - "solana-program", - "solana-zk-token-sdk", - "spl-memo 3.0.1", - "spl-token 3.5.0", - "thiserror", -] - [[package]] name = "spl-token-2022" version = "0.9.0" @@ -3779,9 +3724,9 @@ dependencies = [ "num_enum 0.7.0", "solana-program", "solana-zk-token-sdk", - "spl-memo 4.0.0", + "spl-memo", "spl-pod", - "spl-token 4.0.0", + "spl-token", "spl-token-metadata-interface", "spl-transfer-hook-interface", "spl-type-length-value", @@ -4652,7 +4597,7 @@ dependencies = [ [[package]] name = "yellowstone-grpc-client" -version = "1.11.0+solana.1.16.15" +version = "1.11.1+solana.1.16.16" dependencies = [ "bytes", "futures", @@ -4666,7 +4611,7 @@ dependencies = [ [[package]] name = "yellowstone-grpc-client-simple" -version = "1.10.0+solana.1.16.15" +version = "1.10.0+solana.1.16.16" dependencies = [ "anyhow", "backoff", @@ -4689,7 +4634,7 @@ dependencies = [ [[package]] name = "yellowstone-grpc-geyser" -version = "1.9.0+solana.1.16.15" +version = "1.9.1+solana.1.16.16" dependencies = [ "anyhow", "base64 0.21.4", @@ -4709,7 +4654,7 @@ dependencies = [ "solana-logger", "solana-sdk", "solana-transaction-status", - "spl-token-2022 0.9.0", + "spl-token-2022", "tokio", "tokio-stream", "tonic", @@ -4720,7 +4665,7 @@ dependencies = [ [[package]] name = "yellowstone-grpc-kafka" -version = "1.0.0-rc.3+solana.1.16.15" +version = "1.0.0-rc.3+solana.1.16.16" dependencies = [ "anyhow", "async-trait", @@ -4752,7 +4697,7 @@ dependencies = [ [[package]] name = "yellowstone-grpc-proto" -version = "1.10.0+solana.1.16.15" +version = "1.10.0+solana.1.16.16" dependencies = [ "anyhow", "bincode", diff --git a/Cargo.toml b/Cargo.toml index fb1065d1..82bdc025 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,21 @@ [workspace] members = [ - "examples/rust", # 1.10.0+solana.1.16.15 - "yellowstone-grpc-client", # 1.11.0+solana.1.16.15 - "yellowstone-grpc-geyser", # 1.9.0+solana.1.16.15 - "yellowstone-grpc-kafka", # 1.0.0-rc.2+solana.1.16.15 - "yellowstone-grpc-proto", # 1.10.0+solana.1.16.15 + "examples/rust", # 1.10.0+solana.1.16.16 + "yellowstone-grpc-client", # 1.11.1+solana.1.16.16 + "yellowstone-grpc-geyser", # 1.9.0+solana.1.16.16 + "yellowstone-grpc-kafka", # 1.0.0-rc.3+solana.1.16.16 + "yellowstone-grpc-proto", # 1.10.0+solana.1.16.16 ] [profile.release] debug = true lto = true codegen-units = 1 + +[patch.crates-io] +solana-account-decoder = { git = "https://github.com/rpcpool/solana-public.git", tag = "v1.16.16-geyser-block-v3" } +solana-geyser-plugin-interface = { git = "https://github.com/rpcpool/solana-public.git", tag = "v1.16.16-geyser-block-v3" } +solana-logger = { git = "https://github.com/rpcpool/solana-public.git", tag = "v1.16.16-geyser-block-v3" } +solana-program = { git = "https://github.com/rpcpool/solana-public.git", tag = "v1.16.16-geyser-block-v3" } +solana-sdk = { git = "https://github.com/rpcpool/solana-public.git", tag = "v1.16.16-geyser-block-v3" } +solana-transaction-status = { git = "https://github.com/rpcpool/solana-public.git", tag = "v1.16.16-geyser-block-v3" } diff --git a/README.md b/README.md index ef3b3a3f..453c0839 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ For additional documentation, please see: https://docs.triton.one/rpc-pool/grpc ### Validator +Current plugin version (`+solana.1.16.x`) use validator with backported `ReplicaBlockInfoV3` to Geyser interface — https://github.com/solana-labs/solana/pull/33359. As result it's not compatible with original validator from Solana Labs and would not work. You need to compile validator from the source code and can find patched releases in `Triton One` Solana fork: https://github.com/rpcpool/solana-public/tree/v1.16.16-geyser-block-v3. + ```bash $ solana-validator --geyser-plugin-config yellowstone-grpc-geyser/config.json ``` diff --git a/examples/rust/Cargo.toml b/examples/rust/Cargo.toml index cc0e7932..af3f6f56 100644 --- a/examples/rust/Cargo.toml +++ b/examples/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yellowstone-grpc-client-simple" -version = "1.10.0+solana.1.16.15" +version = "1.10.0+solana.1.16.16" authors = ["Triton One"] edition = "2021" publish = false @@ -21,8 +21,8 @@ hex = "0.4.3" log = { version = "0.4.14", features = ["std"] } maplit = "1.0.2" serde_json = "1.0.86" -solana-sdk = "=1.16.15" -solana-transaction-status = "=1.16.15" +solana-sdk = "=1.16.16" +solana-transaction-status = "=1.16.16" tokio = { version = "1.32.0", features = ["rt-multi-thread", "macros", "time"] } yellowstone-grpc-client = { path = "../../yellowstone-grpc-client" } yellowstone-grpc-proto = { path = "../../yellowstone-grpc-proto" } diff --git a/examples/rust/src/bin/tx-blocktime.rs b/examples/rust/src/bin/tx-blocktime.rs index 0a172a4f..6dac868e 100644 --- a/examples/rust/src/bin/tx-blocktime.rs +++ b/examples/rust/src/bin/tx-blocktime.rs @@ -115,7 +115,7 @@ async fn main() -> anyhow::Result<()> { Some(UpdateOneof::Transaction(tx)) => { let entry = messages.entry(tx.slot).or_default(); let sig = Signature::try_from(tx.transaction.unwrap().signature.as_slice()) - .expect("valid signature") + .expect("valid signature from transaction") .to_string(); if let Some(timestamp) = entry.0 { info!("received txn {} at {}", sig, timestamp); diff --git a/yellowstone-grpc-client/Cargo.toml b/yellowstone-grpc-client/Cargo.toml index 75580212..6b0daed8 100644 --- a/yellowstone-grpc-client/Cargo.toml +++ b/yellowstone-grpc-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yellowstone-grpc-client" -version = "1.11.0+solana.1.16.15" +version = "1.11.1+solana.1.16.16" authors = ["Triton One"] edition = "2021" description = "Yellowstone gRPC Geyser Simple Client" @@ -16,7 +16,7 @@ http = "0.2.8" thiserror = "1.0" tonic = { version = "0.10.2", features = ["gzip", "tls", "tls-roots"] } tonic-health = "0.10.2" -yellowstone-grpc-proto = { path = "../yellowstone-grpc-proto", version = "1.10.0+solana.1.16.14" } +yellowstone-grpc-proto = { path = "../yellowstone-grpc-proto", version = "1.10.0+solana.1.16.16" } [dev-dependencies] tokio = { version = "1.32.0", features = ["macros"] } diff --git a/yellowstone-grpc-geyser/Cargo.toml b/yellowstone-grpc-geyser/Cargo.toml index b4eb02db..7d062730 100644 --- a/yellowstone-grpc-geyser/Cargo.toml +++ b/yellowstone-grpc-geyser/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yellowstone-grpc-geyser" -version = "1.9.0+solana.1.16.15" +version = "1.9.1+solana.1.16.16" authors = ["Triton One"] edition = "2021" description = "Yellowstone gRPC Geyser Plugin" @@ -25,10 +25,10 @@ log = "0.4.17" prometheus = "0.13.2" serde = { version = "1.0.145", features = ["derive"] } serde_json = "1.0.86" -solana-geyser-plugin-interface = "=1.16.15" -solana-logger = "=1.16.15" -solana-sdk = "=1.16.15" -solana-transaction-status = "=1.16.15" +solana-geyser-plugin-interface = "=1.16.16" +solana-logger = "=1.16.16" +solana-sdk = "=1.16.16" +solana-transaction-status = "=1.16.16" spl-token-2022 = "0.9.0" tokio = { version = "1.32.0", features = ["rt-multi-thread", "macros", "time", "fs"] } tokio-stream = "0.1.11" diff --git a/yellowstone-grpc-geyser/src/grpc.rs b/yellowstone-grpc-geyser/src/grpc.rs index 2ce0dd4b..db2ea87f 100644 --- a/yellowstone-grpc-geyser/src/grpc.rs +++ b/yellowstone-grpc-geyser/src/grpc.rs @@ -7,7 +7,7 @@ use { }, log::{error, info}, solana_geyser_plugin_interface::geyser_plugin_interface::{ - ReplicaAccountInfoV3, ReplicaBlockInfoV2, ReplicaEntryInfo, ReplicaTransactionInfoV2, + ReplicaAccountInfoV3, ReplicaBlockInfoV3, ReplicaEntryInfo, ReplicaTransactionInfoV2, SlotStatus, }, solana_sdk::{ @@ -279,10 +279,11 @@ pub struct MessageBlockMeta { pub block_time: Option, pub block_height: Option, pub executed_transaction_count: u64, + pub entries_count: u64, } -impl<'a> From<&'a ReplicaBlockInfoV2<'a>> for MessageBlockMeta { - fn from(blockinfo: &'a ReplicaBlockInfoV2<'a>) -> Self { +impl<'a> From<&'a ReplicaBlockInfoV3<'a>> for MessageBlockMeta { + fn from(blockinfo: &'a ReplicaBlockInfoV3<'a>) -> Self { Self { parent_slot: blockinfo.parent_slot, slot: blockinfo.slot, @@ -292,6 +293,7 @@ impl<'a> From<&'a ReplicaBlockInfoV2<'a>> for MessageBlockMeta { block_time: blockinfo.block_time, block_height: blockinfo.block_height, executed_transaction_count: blockinfo.executed_transaction_count, + entries_count: blockinfo.entry_count, } } } @@ -632,8 +634,7 @@ struct SlotMessages { block_meta: Option, transactions: Vec, accounts_dedup: HashMap, // (write_version, message_index) - entries_parent_updated: bool, - entries_received: bool, + entries: Vec, sealed: bool, confirmed_at: Option, finalized_at: Option, @@ -643,17 +644,16 @@ impl SlotMessages { pub fn try_seal(&mut self) -> Option { if !self.sealed { if let Some(block_meta) = &self.block_meta { - let transactions_count = block_meta.executed_transaction_count as usize; - if transactions_count == self.transactions.len() && self.entries_received { + if self.transactions.len() == block_meta.executed_transaction_count as usize + && self.entries.len() == block_meta.entries_count as usize + { let transactions = std::mem::take(&mut self.transactions); + let entries = std::mem::take(&mut self.entries); let mut accounts = Vec::with_capacity(self.messages.len()); - let mut entries = Vec::with_capacity(self.messages.len()); for item in self.messages.iter().flatten() { - match item { - Message::Account(account) => accounts.push(account.account.clone()), - Message::Entry(entry) => entries.push(entry.clone()), - _ => {} + if let Message::Account(account) = item { + accounts.push(account.account.clone()); } } @@ -810,16 +810,17 @@ impl GrpcService { let msg_txn_count = slot_messages.transactions.len(); if block_txn_count != msg_txn_count { reasons.push("InvalidTxnCount"); - error!("failed reconstruct #{slot} -- tx count: {block_txn_count} vs {msg_txn_count}"); - } + error!("failed to reconstruct #{slot} -- tx count: {block_txn_count} vs {msg_txn_count}"); + } + let block_entries_count = block_meta.entries_count as usize; + let msg_entries_count = slot_messages.entries.len(); + if block_entries_count != msg_entries_count { + reasons.push("InvalidEntriesCount"); + error!("failed to reconstruct #{slot} -- entries count: {block_entries_count} vs {msg_entries_count}"); + } } else { reasons.push("NoBlockMeta"); } - if !slot_messages.entries_received { - reasons.push("MissedEntries"); - let msg_entries_count = slot_messages.messages.iter().filter(|x| matches!(x, Some(Message::Entry(_)))).count(); - error!("failed reconstruct #{slot} -- entries: {msg_entries_count}"); - } let reason = reasons.join(","); prom::update_invalid_blocks(format!("failed reconstruct {reason}")); @@ -895,20 +896,9 @@ impl GrpcService { slot_messages.accounts_dedup.insert(msg.account.pubkey, (write_version, msg_index)); } } - // Entries can come after block meta or last transaction - Message::Entry(msg) if !slot_messages.entries_parent_updated => { - slot_messages.entries_parent_updated = true; - - let mut iter = messages.iter_mut().peekable(); - while let Some((_slot, slot_messages)) = iter.next() { - if let Some((slot_peek, _slot_messages)) = iter.peek() { - if **slot_peek == msg.slot { - slot_messages.entries_received = true; - sealed_block_msg = slot_messages.try_seal(); - break; - } - } - } + Message::Entry(msg) => { + slot_messages.entries.push(msg.clone()); + sealed_block_msg = slot_messages.try_seal(); } _ => {} } diff --git a/yellowstone-grpc-geyser/src/plugin.rs b/yellowstone-grpc-geyser/src/plugin.rs index 3296f551..6eaf7df9 100644 --- a/yellowstone-grpc-geyser/src/plugin.rs +++ b/yellowstone-grpc-geyser/src/plugin.rs @@ -203,10 +203,13 @@ impl GeyserPlugin for Plugin { ReplicaBlockInfoVersions::V0_0_1(_info) => { unreachable!("ReplicaBlockInfoVersions::V0_0_1 is not supported") } - ReplicaBlockInfoVersions::V0_0_2(info) => info, + ReplicaBlockInfoVersions::V0_0_2(_info) => { + unreachable!("ReplicaBlockInfoVersions::V0_0_2 is not supported") + } + ReplicaBlockInfoVersions::V0_0_3(info) => info, }; - let message = Message::BlockMeta((blockinfo).into()); + let message = Message::BlockMeta(blockinfo.into()); inner.send_message(message); Ok(()) diff --git a/yellowstone-grpc-kafka/Cargo.toml b/yellowstone-grpc-kafka/Cargo.toml index fca877b9..b91d2f16 100644 --- a/yellowstone-grpc-kafka/Cargo.toml +++ b/yellowstone-grpc-kafka/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yellowstone-grpc-kafka" -version = "1.0.0-rc.3+solana.1.16.15" +version = "1.0.0-rc.3+solana.1.16.16" authors = ["Triton One"] edition = "2021" description = "Yellowstone gRPC Kafka Producer/Dedup/Consumer" diff --git a/yellowstone-grpc-proto/Cargo.toml b/yellowstone-grpc-proto/Cargo.toml index 39ef06c7..b96ae49c 100644 --- a/yellowstone-grpc-proto/Cargo.toml +++ b/yellowstone-grpc-proto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yellowstone-grpc-proto" -version = "1.10.0+solana.1.16.15" +version = "1.10.0+solana.1.16.16" authors = ["Triton One"] edition = "2021" description = "Yellowstone gRPC Geyser Protobuf Definitions" @@ -12,9 +12,9 @@ keywords = ["solana"] [dependencies] bincode = "1.3.3" prost = "0.12.1" -solana-account-decoder = "=1.16.15" -solana-sdk = "=1.16.15" -solana-transaction-status = "=1.16.15" +solana-account-decoder = "=1.16.16" +solana-sdk = "=1.16.16" +solana-transaction-status = "=1.16.16" tonic = "0.10.2" [build-dependencies]