Skip to content

Commit

Permalink
geyser: fix config example (#168)
Browse files Browse the repository at this point in the history
* add full block notification with no account defined.

Signed-off-by: Kirill Fomichev <[email protected]>

* rename ConfigGrpcFiltersBlocks any field to account_include_any

Signed-off-by: Kirill Fomichev <[email protected]>

* bump 1.6.1

Signed-off-by: Kirill Fomichev <[email protected]>

---------

Signed-off-by: Kirill Fomichev <[email protected]>
Co-authored-by: musitdev <[email protected]>
  • Loading branch information
fanatid and musitdev authored Jul 27, 2023
1 parent 5ae7536 commit 1e2e3bb
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 8 deletions.
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

0 comments on commit 1e2e3bb

Please sign in to comment.