Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
41 changes: 41 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
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.93.1"
channel = "1.95.0"
components = ["clippy", "rustfmt"]
targets = []
profile = "minimal"
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 = { git = "https://github.com/rpcpool/yellowstone-shmem.git", branch = "main" }
yellowstone-shmem-common = { git = "https://github.com/rpcpool/yellowstone-shmem.git", branch = "main" }

[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
59 changes: 50 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 All @@ -28,21 +25,21 @@ pub struct Config {
pub tokio: ConfigTokio,
pub grpc: ConfigGrpc,
#[serde(default)]
pub shmem: Option<ConfigShmem>,
#[serde(default)]
pub prometheus: Option<ConfigPrometheus>,
/// Collect client filters, processed slot and make it available on prometheus port `/debug_clients`
#[serde(default)]
pub debug_clients_http: bool,
}

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 +261,14 @@ impl<'de> Deserialize<'de> for GrpcAddresses {
}
}

#[derive(Debug, thiserror::Error)]
pub enum ConfigError {
#[error(transparent)]
Io(#[from] std::io::Error),
#[error(transparent)]
JsonParse(#[from] serde_json::Error),
}

#[derive(Debug, Clone, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct ConfigGrpc {
Expand Down Expand Up @@ -509,6 +514,42 @@ pub struct ConfigPrometheus {
pub address: SocketAddr,
}

#[derive(Debug, Clone, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct ConfigShmem {
/// 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`
pub path: PathBuf,

/// 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 snapshot_path: Option<PathBuf>,

/// Interval in seconds between shmem health reports.
/// Set to 0 to disable diagnostics entirely.
#[serde(default = "ConfigShmem::default_health_interval_secs")]
pub health_interval_secs: u64,

/// Interval in seconds between ring restart checks.
#[serde(default = "ConfigShmem::default_restart_check_interval_secs")]
pub restart_check_interval_secs: u64,
}

impl ConfigShmem {
fn default_health_interval_secs() -> u64 {
10
}

pub fn default_restart_check_interval_secs() -> u64 {
5
}
}

#[derive(Deserialize)]
#[serde(untagged)]
enum ValueIntStr<'a, T> {
Expand Down
Loading