{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"codeGuideFiles":[],"seo":{"title":"Rakurai Spark Geyser","description":"Learn how to work with Staking API for managing deposits, withdrawals, and stake pool information."},"dynamicMarkdocComponents":[],"metadata":{"type":"markdown"},"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"rakurai-spark-geyser"},"children":["Rakurai Spark Geyser"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"introduction"},"children":["Introduction"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Rakurai Spark Geyser is a Solana validator plugin that streams validator events to external systems using ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ZeroMQ"]},". It acts as a lightweight forwarding layer that receives updates from the validator through the Geyser plugin interface and publishes them to downstream services such as market data systems, order"," ","management engines, or cluster infrastructure."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The plugin is designed to be ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["extremely lightweight"]},", focusing on:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Low-latency event forwarding"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Minimal processing inside validator"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This ensures the plugin ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["does not impact validator performance"]},", including:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Block time"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Vote latency"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Rewards"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Memory usage"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"zeromq-patterns"},"children":["ZeroMQ Patterns"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Supported patterns:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PubSub"]}," → PUB socket for broadcast"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PushPull"]}," → PUSH socket for load-balanced consumers"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Supported transports:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tcp://"]}," for network communication"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ipc://"]}," for local UNIX socket communication"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Examples:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PubSub_tcp://0.0.0.0:4444"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PushPull_ipc:///tmp/account.sock"]}]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Roles:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["PubSub:"]}," Geyser acts as ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["server"]},". Ensure TCP ports are open for clients."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["PushPull:"]}," Geyser acts as ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["client"]},", connecting to an existing socket."]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"configuration"},"children":["Configuration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The plugin is configured using a JSON ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/assets/config.0a507ec8ab6be10a5b74107b5f68b066ea27cbf43db84fb440348126d776aafe.59811757.json"},"children":["configuration file"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Configuration defines:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Which ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["message types"]}," are enabled"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Which ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["consumers"]}," receive them"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ZMQ socket addresses"]}," (PubSub or PushPull)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Socket ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["high water mark (HWM) limits"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Optional socket logging interval"]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note:"]}," Each message type can be routed to multiple consumers."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sample-config"},"children":["Sample Config"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"log_level\": \"info\",\n  \"zmq_sockets\": {\n    \"account\": {\n      \"Mds\": \"PubSub_tcp://0.0.0.0:4444\",\n      \"Cluster\": \"PushPull_ipc:///tmp/account.sock\"\n    },\n    \"transaction\": {\n      \"Oms\": \"PushPull_ipc:///tmp/tx_queue\"\n    },\n    \"slot\": {\n      \"Cluster\": \"PubSub_tcp://0.0.0.0:5555\"\n    },\n    \"block\": {\n      \"Mds\": \"PushPull_ipc:///tmp/block_queue\",\n      \"Cluster\": \"PushPull_ipc:///tmp/block_queue\"\n    }\n  },\n  \"libpath\": \"./libspark_geyser_plugin-{VERSION}.so\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"consumers"},"children":["Consumers"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The plugin supports three categories of downstream consumers:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Mds"]},": Market Data Servers consuming real-time blockchain updates"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Oms"]},": Order Management Systems reacting to transaction events"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Cluster"]},": Internal infrastructure services (monitoring, indexing, analytics)"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"message-types"},"children":["Message Types"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The plugin streams several validator event types:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Tick"]}," → validator timing events"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Slot"]}," → slot lifecycle updates"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Account"]}," → account state changes"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Transaction"]}," → executed transaction information"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Entry"]}," → ledger entries produced by the validator"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["BlockMeta"]}," → metadata describing a completed block"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Block"]}," → full block data constructed from transactions and metadata"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["AccAndTx"]}," → combined transaction + related account updates"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"event-flow"},"children":["Event Flow"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The validator emits runtime events"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The plugin receives events via Geyser callbacks"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Events are converted into internal message objects"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Messages are queued and processed asynchronously"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Messages are serialized and published to configured ZMQ sockets"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"socket-monitor"},"children":["Socket Monitor"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each ZMQ socket optionally includes a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["socket monitor"]}," that tracks"," ","connection state in real-time."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The monitor observes:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Client connected"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Client disconnected"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Socket closed"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This helps avoid sending messages to disconnected sockets and logs connectivity issues."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"quick-start-to-run-geyser"},"children":["Quick Start to Run Geyser"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Follow these steps to run Rakurai Spark Geyser with your Solana validator:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Enable Geyser plugins"]},": Ensure your validator is running with the flag ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--geyser-plugin-always-enabled"]},". If not, restart your validator with this flag."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Update Configuration"]},": Edit the JSON ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/assets/config.0a507ec8ab6be10a5b74107b5f68b066ea27cbf43db84fb440348126d776aafe.59811757.json"},"children":["configuration file"]}," with your desired message types, consumers, and ZMQ socket addresses."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Load the Plugin"]},":"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Start the validator with the Geyser plugin:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"  --geyser-plugin-config /path/to/geyser/config.json\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Alternative: you can also load geyser plugin at runtime"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"  agave-validator -l /path/to/ledger plugin load /path/to/geyser/config.json\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Unload the Plugin"]},":"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["To unload pulgin you must specifiy the name of plugin you want to unlaod:"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["List all loaded plugins: ```"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"  agave-validator -l /path/to/ledger plugin list\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Unlaod the required plugin"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"  agave-validator -l /path/to/ledger plugin unload SparkGeyserPlugin\n","lang":"bash"},"children":[]}]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note:"]}," For ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["PubSub"]}," sockets, Geyser acts as a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["server"]},". Ensure the TCP ports in your configuration are open and accessible."," ","For ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["PushPull"]}," sockets, Geyser acts as a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["client"]},", connecting to an existing socket."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"runtime-load/unload"},"children":["Runtime Load/Unload"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Geyser plugins can be ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["loaded or unloaded at runtime"]}," without restarting the validator, giving flexibility for maintenance or configuration changes."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"example-writer-and-reader"},"children":["Example: Writer and Reader"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"writer"},"children":["Writer"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# Publish Dummy account updates to a Pub/Sub socket\ncargo run --release --bin spark_writer PubSub_tcp://127.0.0.1:4444\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"reader"},"children":["Reader"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# Subscribe to any type updates\ncargo run --release --bin spark_reader PubSub_tcp://127.0.0.1:4444\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]}]},"headings":[{"value":"Rakurai Spark Geyser","id":"rakurai-spark-geyser","depth":1},{"value":"Introduction","id":"introduction","depth":2},{"value":"ZeroMQ Patterns","id":"zeromq-patterns","depth":2},{"value":"Configuration","id":"configuration","depth":2},{"value":"Sample Config","id":"sample-config","depth":3},{"value":"Consumers","id":"consumers","depth":2},{"value":"Message Types","id":"message-types","depth":2},{"value":"Event Flow","id":"event-flow","depth":2},{"value":"Socket Monitor","id":"socket-monitor","depth":2},{"value":"Quick Start to Run Geyser","id":"quick-start-to-run-geyser","depth":2},{"value":"Runtime Load/Unload","id":"runtime-load/unload","depth":3},{"value":"Example: Writer and Reader","id":"example-writer-and-reader","depth":2},{"value":"Writer","id":"writer","depth":3},{"value":"Reader","id":"reader","depth":3}],"frontmatter":{"seo":{"title":"Rakurai Spark Geyser"}},"lastModified":"2026-04-13T10:11:16.000Z"},"slug":"/docs/services/rakurai_jito_private/spark-geyser/readme","userData":{"isAuthenticated":false,"teams":["anonymous"]}}