Skip to content
Open
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6178367
str-509: wire shmem plugin into _create_plugin entry point
Ozodimgba May 7, 2026
1bde881
str-509: wire run_shmem_reader into grpc service startup
Ozodimgba May 7, 2026
e30ebae
str-509: fix transaction slot from dcache entry
Ozodimgba May 7, 2026
3603bfa
feat(shmem): cleaner delegation pattern, set_config injection
Ozodimgba May 11, 2026
268d980
correct mcache_capacity typo in set_config call
Ozodimgba May 11, 2026
ed0af96
populate account_keys from proto transaction message
Ozodimgba May 11, 2026
26a58e0
fix up configurables
Ozodimgba May 11, 2026
69760d1
fix(shmem): update to generic ShmemClient<D>
Ozodimgba May 13, 2026
a39a695
feat(shmem): wire DirectCopyCodec, bridge thread reader, shmem entry …
Ozodimgba May 18, 2026
bd1d36b
perf(shmem): batch futex wake + timestamp once per drain batch
Ozodimgba May 20, 2026
3f626c2
bench(codec): clean up codec bench, add arc alloc isolation
Ozodimgba May 20, 2026
7122894
refactor(shmem): use concrete ProstGeyserCodec type in Plugin and cre…
Ozodimgba May 20, 2026
a1c635d
migrate geyser_loop from mpsc channel to shmem client
Ozodimgba Jun 29, 2026
76a4314
shmem geyser_loop test coverage: all message types and routing
Ozodimgba Jul 1, 2026
6deb35e
str-509: update decoder for header, remove is_startup from decode path
Ozodimgba Jul 3, 2026
07f2879
add logs for diagonistic during development
Ozodimgba Jul 5, 2026
a529b96
panic when ring file changes
Ozodimgba Jul 7, 2026
cfc8d48
add ring diagnostic in real time
Ozodimgba Jul 9, 2026
63d3689
wire snapshot reader into grpc server, replace crossbeam channel with…
Ozodimgba Jul 9, 2026
8400eaf
refactor: decouple geyser_loop from shmem with BatchStream trait
Ozodimgba Jul 13, 2026
a98e4fe
feat(grpc): stream startup accounts from snapshot ring per-client
Ozodimgba Jul 19, 2026
23addff
fix(grpc): drop misleading unsafe in decoder + log check_region io er…
Ozodimgba Jul 20, 2026
9aed7eb
refactor(grpc): ShmemBatchStream takes optional restart-check closure…
Ozodimgba Jul 20, 2026
93f665f
this error + crate source
Ozodimgba Jul 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ vergen = "9.0.6"
wincode = "0.4.4"

# Agave Monorepo
agave-geyser-plugin-interface = "4.0.0"
solana-account-decoder = "4.0.0"
agave-geyser-plugin-interface = "~4.0.0-beta.2"
solana-account-decoder = "~4.0.0-rc.0"
Comment on lines +100 to +101

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your PR must be outdated. master is now on 4.1

solana-logger = "3.0.0"
solana-storage-proto = { version = "4.0.0", features = ["agave-unstable-api"] }
solana-transaction-context = "4.0.0"
Expand Down
12 changes: 9 additions & 3 deletions yellowstone-grpc-geyser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ keywords = { workspace = true }
publish = { workspace = true }

[lib]
crate-type = ["cdylib", "rlib"]
crate-type = ["rlib"]

[[bin]]
name = "yellowstone-grpc-geyser"
path = "src/main.rs"

[[bin]]
name = "config-check"
Expand Down Expand Up @@ -48,7 +52,7 @@ rayon = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "fs"] }
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "fs", "signal"] }
tokio-util = { workspace = true, features = ["rt"]}
tokio-rustls = { workspace = true, features = ["aws-lc-rs"] }
tokio-stream = { workspace = true }
Expand Down Expand Up @@ -87,6 +91,8 @@ prost_011 = { workspace = true, optional = true }
yellowstone-grpc-proto = { workspace = true, features = ["tonic", "account-data-as-bytes"] }
yellowstone-block-machine = { workspace = true, default-features = false }
yellowstone-grpc-tools = { workspace = true }
yellowstone-shmem-client = { path = "../../yellowstone-shmem/crates/yellowstone-shmem-client" }
yellowstone-shmem-common = { path = "../../yellowstone-shmem/crates/yellowstone-shmem-common" }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this won't compile on anyone computer.


[target.'cfg(any(target_os = "linux", target_os = "windows"))'.dependencies]
# wrapped in mod cpu_core_affinity
Expand All @@ -97,7 +103,6 @@ name = "encode"
harness = false
required-features = ["bench"]


[build-dependencies]
anyhow = { workspace = true }
cargo-lock = { workspace = true }
Expand All @@ -116,6 +121,7 @@ solana-signature = { workspace = true }
solana-signer = { workspace = true }
solana-storage-proto = { workspace = true }
solana-transaction = { workspace = true, features = ["bincode", "blake3"] }
yellowstone-conduit = { git = "https://github.com/rpcpool/yellowstone-conduit.git", branch = "main" }

[lints]
workspace = true
8 changes: 3 additions & 5 deletions yellowstone-grpc-geyser/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
},
"grpc": {
"address": "0.0.0.0:10000",
"tls_config": {
"cert_path": "",
"key_path": ""
},
"shmem_path": "/dev/shm/yellowstone-shmem",
"tls_config": null,
"compression": {
"accept": ["gzip", "zstd"],
"send": ["gzip", "zstd"]
Expand Down Expand Up @@ -44,7 +42,7 @@
"data_slice_max": 2
},
"slots": {
"max": 1
"max": 10
},
"transactions": {
"max": 1,
Expand Down
6 changes: 6 additions & 0 deletions yellowstone-grpc-geyser/plugin-config.json
Comment thread
Ozodimgba marked this conversation as resolved.
Outdated
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"libpath": "/workspaces/devpool/yellowstone-grpc/target/release/libyellowstone_grpc_geyser.so",
"grpc": {
"shmem_path": "/dev/shm/yellowstone-shmem"
}
}
65 changes: 56 additions & 9 deletions yellowstone-grpc-geyser/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
use {
crate::plugin::filter::limits::FilterLimits,
agave_geyser_plugin_interface::geyser_plugin_interface::{
GeyserPluginError, Result as PluginResult,
},
bytesize::ByteSize,
serde::{de, Deserialize, Deserializer},
std::{
Expand Down Expand Up @@ -35,14 +32,12 @@ pub struct Config {
}

impl Config {
fn load_from_str(config: &str) -> PluginResult<Self> {
serde_json::from_str(config).map_err(|error| GeyserPluginError::ConfigFileReadError {
msg: error.to_string(),
})
fn load_from_str(config: &str) -> Result<Self, ConfigError> {
Ok(serde_json::from_str(config)?)
}

pub fn load_from_file<P: AsRef<Path>>(file: P) -> PluginResult<Self> {
let config = read_to_string(file).map_err(GeyserPluginError::ConfigFileOpenError)?;
pub fn load_from_file<P: AsRef<Path>>(file: P) -> Result<Self, ConfigError> {
let config = read_to_string(file)?;
Self::load_from_str(&config)
}
}
Expand Down Expand Up @@ -264,6 +259,35 @@ impl<'de> Deserialize<'de> for GrpcAddresses {
}
}

#[derive(Debug)]
pub enum ConfigError {
Io(std::io::Error),
Parse(serde_json::Error),
}

impl std::fmt::Display for ConfigError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::Io(e) => write!(f, "config file error: {e}"),
Self::Parse(e) => write!(f, "config parse error: {e}"),
}
}
}
Comment thread
Ozodimgba marked this conversation as resolved.
Outdated

impl std::error::Error for ConfigError {}

impl From<std::io::Error> for ConfigError {
fn from(e: std::io::Error) -> Self {
Self::Io(e)
}
}

impl From<serde_json::Error> for ConfigError {
fn from(e: serde_json::Error) -> Self {
Self::Parse(e)
}
}

#[derive(Debug, Clone, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct ConfigGrpc {
Expand Down Expand Up @@ -383,6 +407,25 @@ pub struct ConfigGrpc {

#[serde(default)]
pub listen: Option<Vec<ListenConfig>>,

/// Path to the yellowstone-shmem shared memory file.
/// When set, the grpc service reads geyser events from the shmem ring
/// instead of the in-process plugin channel.
/// Example: `/dev/shm/yellowstone-shmem`
#[serde(default)]
pub shmem_path: Option<String>,

/// Path to the shmem geyser plugin snapshot mmap file.
/// When set, the grpc service reads snapshot from the from the mmap file
/// instead of the in-process plugin channel.
/// Example: `/dev/shm/yellowstone-shmem-snapshot`
#[serde(default)]
pub shmem_snapshot_path: Option<String>,

/// Interval in seconds between shmem health reports.
/// Set to 0 to disable diagnostics entirely.
#[serde(default = "ConfigGrpc::default_shmem_health_interval_secs")]
pub shmem_health_interval_secs: u64,
}
Comment thread
Ozodimgba marked this conversation as resolved.
Outdated

#[derive(Debug, Clone, Deserialize)]
Expand Down Expand Up @@ -445,6 +488,10 @@ impl ConfigGrpc {
const fn default_replay_stored_slots() -> u64 {
150
}

fn default_shmem_health_interval_secs() -> u64 {
10
}
}

#[derive(Debug, Clone, Deserialize)]
Expand Down
Loading