Go to file
Linus Kendall 802236793c
Fix xtoken length (#105)
* Allow user defined TlsConfig

Let user deifne custom TlsConfig.

* Remove failing x-token lengths

X-Tokens can be different lengths so we should just check that it's longer than 0.
2023-04-10 10:44:56 +02:00
.github/workflows fix release ci (#102) 2023-03-26 22:25:52 -03:00
ci fix release ci (#102) 2023-03-26 22:25:52 -03:00
examples add memcmp/datasize filter to accounts (#101) 2023-03-26 21:40:39 -03:00
yellowstone-grpc-client Fix xtoken length (#105) 2023-04-10 10:44:56 +02:00
yellowstone-grpc-geyser geyser: impl default filters limit in config (#103) 2023-03-27 16:18:31 -03:00
yellowstone-grpc-proto add memcmp/datasize filter to accounts (#101) 2023-03-26 21:40:39 -03:00
.gitignore re-export prost and tonic in proto crate (#100) 2023-03-21 17:56:53 -03:00
Cargo.lock geyser: impl default filters limit in config (#103) 2023-03-27 16:18:31 -03:00
Cargo.toml Allow user defined TlsConfig (#98) 2023-03-21 19:28:46 -03:00
LICENSE Adds Apache 2.0 License (#67) 2023-02-22 23:42:37 +05:30
README.md add memcmp/datasize filter to accounts (#101) 2023-03-26 21:40:39 -03:00
rust-toolchain.toml Update solana =1.15.2 (#79) 2023-03-08 11:50:03 -03:00

README.md

Yellowstone gRPC - a Geyser based gRPC interface for Solana

This repo contains a fully functional gRPC interface for Solana. It is built around Solana's Geyser interface. In this repo we have the plugin as well as sample clients for multiple languages.

It provides the ability to get slots, blocks, transactions, and account update notifications over a standardised path.

For additional documentation, please see: https://docs.triton.one/rpc-pool/grpc-subscriptions

Validator

$ solana-validator --geyser-plugin-config yellowstone-grpc-proto/config.json

Plugin config check

cargo-fmt && cargo run --bin config-check -- --config yellowstone-grpc-proto/config.json

Filters

See yellowstone-grpc-proto/proto/geyser.proto.

Slots

Currently all slots are broadcasted.

Account

Accounts can be filtered by:

  • account — acount Pubkey, match to any Pubkey from the array
  • owner — account owner Pubkey, match to any Pubkey from the array
  • filters — same as getProgramAccounts filters, array of dataSize or Memcmp (bytes, base58, base64 are supported)

If all fields are empty then all accounts are broadcasted. Otherwise fields works as logical AND and values in arrays as logical OR (except values in filters which works as logical AND).

Transactions

  • vote — enable/disable broadcast vote transactions
  • failed — enable/disable broadcast failed transactions
  • account_include — filter transactions which use any account
  • account_exclude — filter transactions which do not use any account

If all fields are empty then all transactions are broadcasted. Otherwise fields works as logical AND and values in arrays as logical OR.

Blocks

Currently all blocks are broadcasted.

Blocks meta

Same as Blocks but without transactions.

Limit filters

It's possible to add limits for filters in config. If filters field is omitted then filters doesn't have any limits.

"grpc": {
   "filters": {
      "accounts": {
         "max": 1,
         "any": false,
         "account_max": 10,
         "account_reject": ["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"],
         "owner_max": 10,
         "owner_reject": ["11111111111111111111111111111111"]
      },
      "slots": {
         "max": 1
      },
      "transactions": {
         "max": 1,
         "any": false,
         "account_include_max": 10,
         "account_include_reject": ["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"],
         "account_exclude_max": 10
      },
      "blocks": {
         "max": 1
      }
   }
}

Examples

License

This project and all source code in this repository is licensed as follows:

Copyright 2023 Triton One Limited

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.