Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geyser: fix config example #168

Merged
merged 3 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ The minor version will be incremented upon a breaking change and the patch versi

### Breaking

## 2023-07-26

- yellowstone-grpc-geyser-1.6.1+solana.1.16.1

### Fix

geyser: fix config example ([#168](https://github.com/rpcpool/yellowstone-grpc/pull/168)).

## 2023-07-22

- yellowstone-grpc-geyser-1.6.0+solana.1.16.1
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
members = [
"examples/rust", # 1.8.0+solana.1.16.1
"yellowstone-grpc-client", # 1.8.0+solana.1.16.1
"yellowstone-grpc-geyser", # 1.6.0+solana.1.16.1
"yellowstone-grpc-geyser", # 1.6.1+solana.1.16.1
"yellowstone-grpc-proto", # 1.8.0+solana.1.16.1
]

Expand Down
2 changes: 1 addition & 1 deletion yellowstone-grpc-geyser/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "yellowstone-grpc-geyser"
version = "1.6.0+solana.1.16.1"
version = "1.6.1+solana.1.16.1"
authors = ["Triton One"]
edition = "2021"
description = "Yellowstone gRPC Geyser Plugin"
Expand Down
6 changes: 4 additions & 2 deletions yellowstone-grpc-geyser/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@
},
"blocks": {
"max": 1,
"any": false,
"account_include_max": 10,
"account_include_reject": ["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"]
"account_include_any": false,
"account_include_reject": ["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"],
"include_transactions": true,
"include_accounts" : false
},
"blocks_meta": {
"max": 1
Expand Down
5 changes: 3 additions & 2 deletions yellowstone-grpc-geyser/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,10 @@ impl Default for ConfigGrpcFiltersTransactions {
pub struct ConfigGrpcFiltersBlocks {
#[serde(deserialize_with = "deserialize_usize_str")]
pub max: usize,
pub any: bool,
#[serde(deserialize_with = "deserialize_usize_str")]
pub account_include_max: usize,
#[serde(alias = "any")]
pub account_include_any: bool,
#[serde(deserialize_with = "deserialize_pubkey_set")]
pub account_include_reject: HashSet<Pubkey>,
pub include_transactions: bool,
Expand All @@ -226,8 +227,8 @@ impl Default for ConfigGrpcFiltersBlocks {
fn default() -> Self {
Self {
max: usize::MAX,
any: true,
account_include_max: usize::MAX,
account_include_any: true,
account_include_reject: HashSet::new(),
include_transactions: true,
include_accounts: true,
Expand Down
5 changes: 4 additions & 1 deletion yellowstone-grpc-geyser/src/filters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,10 @@ impl FilterBlocks {

let mut this = Self::default();
for (name, filter) in configs {
ConfigGrpcFilters::check_any(filter.account_include.is_empty(), limit.any)?;
ConfigGrpcFilters::check_any(
filter.account_include.is_empty(),
limit.account_include_any,
)?;
ConfigGrpcFilters::check_pubkey_max(
filter.account_include.len(),
limit.account_include_max,
Expand Down
Loading