https://github.com/subsquid/yellowstone-geyser-proxy
JSON-RPC proxy for Yellowstone gRPC Geyser plugin
https://github.com/subsquid/yellowstone-geyser-proxy
Last synced: 12 months ago
JSON representation
JSON-RPC proxy for Yellowstone gRPC Geyser plugin
- Host: GitHub
- URL: https://github.com/subsquid/yellowstone-geyser-proxy
- Owner: subsquid
- Created: 2025-04-25T19:11:44.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-06-01T12:28:29.000Z (about 1 year ago)
- Last Synced: 2025-06-01T21:28:20.313Z (about 1 year ago)
- Language: Rust
- Size: 97.7 KB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# yellowstone-geyser-proxy
`sqd-yellowstone-geyser-proxy(1)` allows to receive new Solana blocks via JavaScript friendly [JSON-RPC websocket subscription](https://geth.ethereum.org/docs/interacting-with-geth/rpc/pubsub).
It works as a proxy for [Yellowstone gRPC Geyser plugin](https://github.com/rpcpool/yellowstone-grpc).
At SQD, we use it as a temporary workaround before we migrate our entire data ingestion stack from JavaScript to Rust.
## Why not to use gRPC directly?
* Yellowstone gRPC delivers account ids in a binary form,
but you want base58 encodings most of the time. Base58 encodings are too expensive to produce on JS side.
* Yellowstone gRPC whole block subscription does not allow to exclude vote transactions.
* JavaScript gRPC stack is heavy and ugly.
## Usage
Only single subscription kind is supported, that delivers the whole block data.
* `geyser_blockSubscribe` - subscription method (no parameters)
* `geyser_blockNotification` - data message
* `geyser_blockUnsubscribe` - subscription cancellation.
Format of the data message is `{"slot": , "block": }`,
where `GetBlock` is akin to [getBlock result](https://solana.com/ru/docs/rpc/http/getblock) except:
* Each transaction is annotated with additional `_index` property to identify
its original position within a block (in case vote transactions where excluded).
* All integer fields, that can potentially overflow JavaScript safe integer are replaced with number strings.
## Setup
```
Usage: sqd-yellowstone-geyser-proxy [OPTIONS] --geyser-url
Options:
--geyser-url Yellowstone gRPC service
--geyser-x-token add X-Token header to gRPC requests
--geyser-x-access-token add X-Access-Token header to gRPC requests
--with-votes disable removal of vote transactions
--port [default: 3000]
--mapping-threads number of threads to use for data transformation
```