From 83821a206a5c82b351da33d8efa850973993665a Mon Sep 17 00:00:00 2001 From: aoikurokawa Date: Sat, 13 Jun 2026 02:58:50 +0900 Subject: [PATCH 1/4] fix: skip tx is null --- core/src/rpc_utils.rs | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/core/src/rpc_utils.rs b/core/src/rpc_utils.rs index d847523..4647f18 100644 --- a/core/src/rpc_utils.rs +++ b/core/src/rpc_utils.rs @@ -1,8 +1,9 @@ +use log::warn; use solana_client::nonblocking::rpc_client::RpcClient; use solana_client::rpc_config::RpcTransactionConfig; use solana_clock::Slot; use solana_commitment_config::CommitmentConfig; -use solana_rpc_client_api::client_error::Error as RpcError; +use solana_rpc_client_api::client_error::{Error as RpcError, ErrorKind as RpcErrorKind}; use solana_signature::Signature; use solana_transaction_status::{EncodedConfirmedTransactionWithStatusMeta, UiTransactionEncoding}; use std::iter::{Map, Take}; @@ -45,14 +46,31 @@ async fn get_signatures_internal( let mut temp_txs = vec![]; for signature in transaction_signatures.iter() { - let tx = rpc_client + match rpc_client .get_transaction_with_config(signature, config) - .await?; - temp_txs.push(tx); + .await + { + Ok(tx) => temp_txs.push(tx), + Err(e) if is_null_transaction(&e) => { + warn!("getTransaction returned null for {signature}, skipping"); + continue; + } + Err(e) => return Err(e), + } } Ok(temp_txs) } +/// Returns true when an RPC error is the serde failure produced by a `null` +/// `getTransaction` response (`invalid type: null, expected struct +/// EncodedConfirmedTransactionWithStatusMeta`). +fn is_null_transaction(err: &RpcError) -> bool { + match &err.kind { + RpcErrorKind::SerdeJson(e) => e.to_string().contains("invalid type: null"), + _ => false, + } +} + pub async fn retry_get_slot(rpc_client: &RpcClient) -> Result { Retry::spawn(retry(), || rpc_client.get_slot()).await } From 87f16194bcf77351d8cf763914e6554f396f543f Mon Sep 17 00:00:00 2001 From: aoikurokawa Date: Sat, 13 Jun 2026 03:01:32 +0900 Subject: [PATCH 2/4] fix: commitment level --- steward-writer-service/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/steward-writer-service/src/main.rs b/steward-writer-service/src/main.rs index 1c8f3dc..f5d2eaf 100644 --- a/steward-writer-service/src/main.rs +++ b/steward-writer-service/src/main.rs @@ -196,7 +196,7 @@ async fn listen( before, until: Some(latest_signature), limit: Some(NUM_TRANSACTIONS), - commitment: Some(CommitmentConfig::confirmed()), + commitment: Some(CommitmentConfig::finalized()), }, ) .await From 2c66ee7d859b55a0b4c0f5a935accddc8a362338 Mon Sep 17 00:00:00 2001 From: aoikurokawa Date: Sat, 13 Jun 2026 03:11:41 +0900 Subject: [PATCH 3/4] fix: review --- core/src/rpc_utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/rpc_utils.rs b/core/src/rpc_utils.rs index 4647f18..ba8bf7c 100644 --- a/core/src/rpc_utils.rs +++ b/core/src/rpc_utils.rs @@ -52,7 +52,7 @@ async fn get_signatures_internal( { Ok(tx) => temp_txs.push(tx), Err(e) if is_null_transaction(&e) => { - warn!("getTransaction returned null for {signature}, skipping"); + warn!("getTransaction returned null for {signature} ({e}), skipping"); continue; } Err(e) => return Err(e), From 52297da802b4d8ee6e402441ab48bbfb128c897e Mon Sep 17 00:00:00 2001 From: aoikurokawa Date: Sat, 13 Jun 2026 03:28:13 +0900 Subject: [PATCH 4/4] fix: bump up --- Cargo.lock | 2 +- steward-writer-service/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 88208c5..8df90d4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3225,7 +3225,7 @@ dependencies = [ [[package]] name = "kobe-steward-writer-service" -version = "1.0.0" +version = "1.0.1" dependencies = [ "anchor-client", "clap 4.5.40", diff --git a/steward-writer-service/Cargo.toml b/steward-writer-service/Cargo.toml index 0b6e1a7..4c6a451 100644 --- a/steward-writer-service/Cargo.toml +++ b/steward-writer-service/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "kobe-steward-writer-service" description = "Kobe Steward Writer Service is a specialized data collection service that monitors and records Jito Steward program events" -version = "1.0.0" +version = "1.0.1" authors = { workspace = true } repository = { workspace = true } homepage = { workspace = true }