Skip to content

extrnode/solana-geyser-zmq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f85e4f2 · Jul 31, 2023

History

33 Commits
May 19, 2023
May 2, 2023
Jul 31, 2023
May 5, 2023
Jul 31, 2023
Apr 5, 2023
Jul 31, 2023
Jul 20, 2023
Jul 31, 2023
Jul 31, 2023
Jun 19, 2023
Feb 22, 2023
Jun 19, 2023
May 19, 2023

Repository files navigation

Build on Ubuntu 20 badge Build on Ubuntu 22 badge Release badge

Solana Geyser ZMQ

What's a Solana Geyser Plugin?

A Solana Validator can "leak" accounts and transactions data outside the validator. This flow of data is achieved through the The Geyser Plugin Interface.

An external library can plug into that interface by implementing the necessary functions and thus listen for accounts and transactions streams.

That dynamic library is provided to the validator at runtime. The validator can then open that library and call the implemented callbacks or hooks with accounts and transactions data.

The library can then feed on these data and take further actions, such as logging, inserting the data into a DB or a consumer/producer system, etc.

Building

If a specific rust version not used for building, segmentation faults occur during validator start. Current mainnet ver is 1.13.6 so it's recommended to use rust 1.60.0 issue #30140.

    docker run --rm -v $(PWD):/app -w /app rust:1.60.0 cargo b --release

Testing

The dynamic library path is provided to the validator using the --geyser-plugin-config parameter.

For example when using the test validator:

solana-test-validator --geyser-plugin-config config/geyser-plugin-config.json
# or use ./scripts/run.sh

Make sure the path to your geyser plugin dynamic library has a proper path relative to a config file and a proper extenstion - .so or (.dylib on mac)

For example:

{
    "libpath": "../target/release/libsolana_geyser_plugin_scaffold.so",
}